core/api/modules/tovar_cat/tk-ligat.ru.php

23 lines
708 B
PHP
Raw Permalink Normal View History

2023-01-02 21:33:36 +05:00
<?php
2023-02-08 16:59:59 +05:00
/* ----------------------------------------------------------------------
05.02.2023
Костыль против пустоты, если в категории нет товара,
переходим в первую подкатегорию
---------------------------------------------------------------------- */
2023-07-12 20:02:20 +05:00
//if (!$childrenTovar){
2023-02-08 16:59:59 +05:00
//echo "SELECT `id` FROM `tovar_category` WHERE `category`=" . $pieces[0] . " ORDER BY `title` LIMIT 1";
2023-07-12 20:02:20 +05:00
// $redir_id=\DB::getValue( "SELECT `id` FROM `tovar_category` WHERE `category`=? AND `status`=1 ORDER BY `title` LIMIT 1", $pieces[0] );
2023-05-03 14:51:58 +05:00
// if ($redir_id)header( 'Location: /tovar_cat/' . $redir_id . '-1.html' );
2023-02-08 16:59:59 +05:00
2023-07-12 20:02:20 +05:00
//}
2023-02-08 16:59:59 +05:00
2023-01-02 21:33:36 +05:00
?>