In OC2 I replace this line in the product.php config file:
$this->response->setOutput($this->load->view('product/product', $data));
With the below
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/' . $template)) {
$this->setData($data, 'pco_color_selector_style', '');
$this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/product/' . $template, $data));
} else {
$this->setData($data, 'pco_color_selector_style', '');
$this->response->setOutput($this->load->view('default/template/product/product.tpl', $data));
}
To allow for different products to trigger different template files on the product page.
I'm trying to replicate this behavior in OC3 but so far no joy, other than replacing the tpl extension with twig is there anything else I'm missing?
The following extension should solve the problem for you.
https://www.opencart.com/index.php?rout ... n_id=13400
https://www.opencart.com/index.php?rout ... n_id=13400
Who is online
Users browsing this forum: No registered users and 11 guests