R
R
Roman2016-01-30 11:17:56
opencart
Roman, 2016-01-30 11:17:56

How to make a condition and check if a page belongs to a category on Opencart?

I decided to make a separate menu for each category in the opencart store: proof1 , proof2
I divided the child subcategories into separate blocks and even figured out how to display them separately in the right categories, but when I go to another subcategory or to the product page, my method does not work ! =(((
If anyone knows Wordpress, there is such an option, a condition for a post to belong to a category, and it works everywhere (on the post page, in sub-headings and sub-sub-headings) ... The same thing is needed here Help, please, I don't want to give up the idea...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
halfhope, 2016-02-03
@halfhope

if(isset($this->request->get['path'])){
    $categories = explode('_', $this->request->get['path']);
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question