Answer the question
In order to leave comments, you need to log in
OpenCart page checker is it a product?
Tell me, is there any way / method to check if the current page is a product in header.tpl, footer.tpl? For example: `if (is_product) { // do something }`
if (isset($this->request->get['product_id'])) {
echo 111;
}
Answer the question
In order to leave comments, you need to log in
But such a story works even with the included CNC
Controllercatalog/controller/common/header.php
if (isset($this->request->get['product_id'])){
$data['is_product_page'] = 'Страница продукта с ID - ' . $this->request->get['product_id'];
}
catalog/view/theme/default/template/common/header.(twig/tpl)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question