0
votes

My problem is similar to this question

but I tried the solution with no joy. I had all configurable products in my magento shop at the moment and the catalog/product/view.html file is modified according to that. However I want to add few simple products and I need a different view.phtml file for those. I tried doing the layout update in product like it mentioned in the question above.

I also tried the solution to do the layout update in the category and setting 'apply to products' to yes but still can't manage to fix it. Everything(header,sidebar,footer) loads apart from the contents of the new view file.

However if I do the layout update with <template>catalog/product/view.phtml</template> it loads the view.phtml file. What am I missing?

2
Thanks guys for your time to answering the question. It was a silly silly mistake from me. There are magento files in the root directory of my ftp which is what I have been changing with vain. However the files that I needed to change in the ones in the subdirectory. I forgot I set it up that way long ago. Now the solution from linked question works like a charm. Sorry again for my silly mistake. Wasted whole day yesterday trying different solutions. Glad its sorted now. Thanks guys for your help.James

2 Answers

1
votes

In your local.xml layout file (create if you haven't already), you can do the following:

<PRODUCT_TYPE_simple>
    <reference name="product.info">
        <action method="setTemplate">
            <tpl>your/template.phtml</tpl>
        </action>
    </reference>
</PRODUCT_TYPE_simple>

See Mage_Catalog_Helper_Product_View::initProductLayout() for the code which adds these handles.

0
votes

put condition in view.phtml file if product type is simple product then display your logic otherwise display configurable product logic, that's way you don't need to do new layout update in your admin panel for product