Post by seers » Fri Feb 08, 2019 9:30 pm


I am running OC and looking for a way to show category description only on the category first page and hide it on 1, 2, 3 pages and so on.

I have to edit the category.twig file, but I am not famililar with the syntax.

I have found some code in the forum but it is for the older versions of OC.

Thank you in advance.



Fri Nov 23, 2018 6:17 pm

Post by boicute.14 » Thu Feb 14, 2019 12:00 pm

first, you must have page variable on controller.

Code: Select all

		if (isset($this->request->get['page'])) {
			$page = $this->request->get['page'];
		} else {
			$page = 1;
and add $data['page'] = $page after
find {% if description %} in category.twig and edit {% if description and (page == 1) %} to display description when page == 1

Opencart Developer|Thiết kế website|Thiết kế website tại Đồng Nai



Sat Oct 22, 2016 2:08 pm
Who is online

Users browsing this forum: No registered users and 7 guests