A
A
AndrewSHkod2021-01-09 21:07:24
opencart
AndrewSHkod, 2021-01-09 21:07:24

How to save category information in ocfilter?

Hello.
On the category page, if we select some item from the osfilter, then the information about the category (description and picture) disappears and the landing page information appears (if any).
How can I make sure that category information is saved somewhere (category_id is enough for me).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AndrewSHkod, 2021-01-10
@AndrewSHkod

Made.
Suddenly someone will need.
There is a main file system\library\ocfilter.php : here are all the functions we need.
private $category_id is essentially the Id we need, which can be obtained with the $this->getCategoryId() function.
What do we need to do.
Find the getPageHeadingTitle function.
And the last return $heading_title is replaced by
$category_info = $this->model_catalog_category->getCategory($this->getCategoryId());
return html_entity_decode($category_info["name"], ENT_QUOTES, 'UTF-8');
this.
And then we find getPageDescription and replace the last return $description with
if($description){
return $description;
}
$this->load->model('catalog/category');
$category_info = $this->model_catalog_category->getCategory($this->getCategoryId());
return html_entity_decode($category_info["description"], ENT_QUOTES, 'UTF-8');
I hope someone will help.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question