Answer the question
In order to leave comments, you need to log in
How to display the category_id value for a product in the featured module?
How to display the category_id value for a product in the featured module?
The main page has a featured module. How to set links for products to different output templates in it, depending on their category_id?
I understand that the category_id value is taken from the address bar if you are on the category page. And how to get the category_id on the main page for products?
$path = '';
$parts = explode('_', (string)$this->request->get['path']);
$category_id = (int)array_pop($parts);
Для чего нужно значение
if($category_id == 59){
$data['products'][] = array(
'href' => $this->url->link('common/govyadina', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'] . $url)
);
Answer the question
In order to leave comments, you need to log in
pip install 'requests[security]'
or
sudo apt-get install python-dev libffi-dev libssl-dev
that's right, that's right
$parts = explode('_', (string)$this->request->get['path']);
$category_id = (int)array_pop($parts);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question