Forgive me if I'm about to say something daft - I am a beginner at opencart and php.
I am using Opecart Version 1.5.1.3
I have found/ created a way to apply a different product template to a single product. This was done by adding the following code into the file at catalog/controller/product/product.php -
Code: Select all
if($this->request->get['product_id'] == '500') { // If ID matches this, use this new template
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/product_new.tpl')) {
$this->template = $this->config->get('config_template') . '/template/product/product_new.tpl';
} else {
$this->template = 'default/template/product/product.tpl';
}
} else { // If not, use standard
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/product.tpl')) {
$this->template = $this->config->get('config_template') . '/template/product/product.tpl';
} else {
$this->template = 'default/template/product/product.tpl';
}
}
Thnks,
A