4
votes

If I want to control how each product is displayed (i.e. a custom design when specified) my first thought is to do this:

  1. Create a custom view.phtml in template/catalog/product/my_view.phtml
  2. Navigate in the admin to Product->Design->Custom Layout Update
  3. Add this block:

<reference name="content">
    <action method="setTemplate">
        <template>catalog/product/view_print.phtml</template>
    </action>
</reference>

But the template is never loaded, only the default view.phtml. Is this the correct method? I need to be able to do this in the product settings.

2
You should put your comment in as an answer and mark it as the accepted answer, that way others who are having the same issue can find your answer more easily. This is encourage on SOCCBlackburn

2 Answers

11
votes

Found the answer:

<reference name="product.info">
    <action method="setTemplate"><template>catalog/product/NEW_VIEW.phtml</template></action>
</reference>
0
votes

Navigate in the admin to Product->Design->Custom Layout Update >
Add the below custom block. > It works for all the stores.

"<reference name="product.info">
       <block type="namespace_modulename/catalog_product_list_custom" 
   name="catalog.product.modulename" as="modulename" after="tierprices" 
   template="modulename/catalog/product/modulename.phtml"/>
</reference> "

Add the below code in view.phtml

<?php echo $this->getChildHtml('modulename'); ?>