Определить - страница категории или товара

22.10.2023 12:29
#1
Revutsky
Joomshopping forum user no avatar
Name: Alex Revutsky
16.02.2022
Posts: 29
Quote
Определить - страница категории или товара

Модуль с кодом PHP/HTML. Расположен на странице категории.
Как определить, какая страница текущая - категории или товара.
Классы в <body> одинаковые. Надо убирать часть информации в модуле, в зависимости от типа страницы.

 
22.10.2023 15:17
#2
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25955
Quote
Aw: Определить - страница категории или товара

$jinput = \JFactory::getApplication()->input;
$task = $jinput->get('task');
$controller = $jinput->get("controller");
if (!$controller) $controller = $jinput->get("view");
$category_id = $jinput->getInt('category_id', 0);
$product_id = $jinput->getInt('product_id', 0);

Смотрите параметры
$task,$controller, $category_id, $product_id


Last change: 22.10.2023 15:18
 
24.10.2023 09:47
#3
Revutsky
Joomshopping forum user no avatar
Name: Alex Revutsky
16.02.2022
Posts: 29
Quote
Aw: Определить - страница категории или товара

Спасибо!

 


Copyrights MAXXmarketing GmbH. Alle Rechte vorbehalten
Durch die Nutzung dieser Website stimme ich zu, dass Cookies zur optimalen Gestaltung der Website sowie zur Analyse der Nutzung der Website verwendet werden. Weiterführende Informationen finden Sie hier. OK, einverstanden.