Post by gebruiktspeelgoed » Mon Dec 14, 2015 12:02 am

Hi There,

I would like to have an costum category page.

I opened catalog/controller/product/category.php

and changed this

Code: Select all

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/category.tpl')) {
    $this->template = $this->config->get('config_template') . '/template/product/category.tpl';
} else {
    $this->template = 'default/template/product/category.tpl';
}
into this

Code: Select all

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/category_' . $category_id . '.tpl')) {
    $this->template = $this->config->get('config_template') . '/template/product/category_' . $category_id . '.tpl';
} elseif (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/category.tpl')) {
    $this->template = $this->config->get('config_template') . '/template/product/category.tpl';
} else {
    $this->template = 'default/template/product/category.tpl';
}
Then i copied catalog\view\theme\theme521\template\product\category.tpl and renamed it to category_acties.tpl corresponding to the seo category name i gave to my category page.

Can you help me out? do i miss something? is there another way?

Edit: the above code is from an older opencart version and don't work on 2.0 Who has the solution?


Posts

Joined
Sat Dec 05, 2015 3:49 am
Who is online

Users browsing this forum: No registered users and 4 guests