I'm having an issue getting custom Layouts to apply to specific products. Here's a basic description of what I'm trying to do, how I'm doing it, and what's not working.
I essentially want a template product page without an "Add to Cart" option which can be applied to specific products.
Here's my method: I go into catalog\view\theme\default\template\product and make a copy of product.tpl and rename it no_cart_product.tpl. I edit the file and remove the "Add to Cart" features. (The template itself is fine - I tested the template by temporarily making this change to product.tpl itself and it does exactly what I need it to do.)
Then, I go into my admin panel, go to System>Design>Layouts, Insert, name it "No Cart Product", and under route I put product/no_cart_product.
Then, I go to Catalog>Product, edit on the product I want with the No Cart Template, go to the Design tab, and from the dropdown menu I select "No Cart Product."
Now, my logic tells me this should apply the no_cart_product.tpl file I created to this particular product, but it doesn't work. It simply loads the regular product.tpl file. I tested this by editing the product.tpl file itself and confirmed that, even though the product is set to the No Cart Product layout, it loads product.tpl.
Am I doing something wrong? Is there something I'm missing? Does OpenCart not work this way? Does it not support new .tpl files?
Additional info:
I know that OpenCart defaults to the default product page if there is no new template applied. I'm no programmer or coder, but I dug into the product controller file (\catalog\controller\product\product.php) and found this line of code, which I think is responsible for this function:
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';
That particular product path colored red is what is being loaded no matter what. I know because I temporarily changed it to no_cart_product.tpl and it applied the template without the Add to Cart function to all of my products.
I would really appreciate any help!