I
I
iminby2018-07-18 08:27:35
opencart
iminby, 2018-07-18 08:27:35

How to display text only in certain opencart categories?

Tell me how to display a certain text in a certain category by id .
Opencart 2+

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
web-mechanic, 2018-07-18
@amfetamine

it is better to set it through the admin panel
, if you still need it directly with a crutch, then pass the category_id to the template:
$parts = explode('_',$this->request->get['route']);
$data['category_id'] = array_pop($parts);
and in the template output by
<?php if (in_array($category_id, array(all required category id separated by commas))) { ?>
test
<?php } ?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question