Post by redleaftea » Fri Sep 01, 2017 9:15 pm

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?

Newbie

Posts

Joined
Sun May 17, 2015 4:18 pm

Post by tdaubs » Thu Sep 07, 2017 12:34 am

The following extension should solve the problem for you.

https://www.opencart.com/index.php?rout ... n_id=13400

Image
Opencart Support . Buy Me a Coffee?


User avatar
Active Member

Posts

Joined
Fri Apr 08, 2011 4:51 am
Location - Southern California
Who is online

Users browsing this forum: No registered users and 11 guests