1
Tips and Tricks / Re: Forward past the category page to the product page
« on: February 15, 2014, 05:20:38 AM »This is the solution from another system, but the code is almost identical.
Code:
Quote
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';
}
Replace with this:
Quote
$this->data['continue'] = $this->url->link('common/home');
if (!isset($this->request->get['route']) || (isset($this->request->get['route']) && (isset($this->request->get['path']) && $this->request->get['path']==='61_73' ))){
$this->redirect($this->url->link('product/product&path=61_73&product_id=58', '', 'SSL'));
}else 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';
}
This is the code in public_html\core\lib\template.php - Line 33:
Quote
if (file_exists(DIR_TEMPLATE . $this->config->get('config_storefront_template') . '/template/'. $filename)) {
$filename = $this->config->get('config_storefront_template') . '/template/'. $filename;
} else {
$filename = 'default/template/'. $filename;
}
Can anyone help with the decision, according to the example?