Note that there are some explanatory texts on larger screens.

plurals
  1. POMagento product view template based on category
    primarykey
    data
    text
    <p>We are working on a Magento webshop which has two categories.</p> <p>We would like to use the default product view template for category one, and a custom product view template for category two.</p> <p>Is this possible and how we can achieve this?</p> <p><strong>* EDIT - SOLUTION *</strong></p> <p>For anyone who is curious about this. The solution was a lot easier than I thought.</p> <p>I only had to place this piece of code in the custom layout update section of the relevant category and i had to set the option 'Apply to products' to yes!</p> <pre><code>&lt;reference name="product.info"&gt; &lt;action method="setTemplate"&gt; &lt;template&gt;catalog/product/view-recipe.phtml&lt;/template&gt;&lt;/action&gt; &lt;/reference&gt; </code></pre> <p><strong>* EDIT *</strong> I have tried adding this code to the catalog.xml.</p> <pre><code>&lt;CATEGORY_5&gt; &lt;reference name="product.info"&gt; &lt;action method="setTemplate"&gt;&lt;template&gt;catalog/product/view-recipe.phtml&lt;/template&gt;&lt;/action&gt; &lt;/reference&gt; &lt;/CATEGORY_5&gt; </code></pre> <p><strong>* EDIT *</strong> I have tried adding this code to the catalog.xml:</p> <pre><code>&lt;CATEGORY_5&gt; &lt;reference name="product.info"&gt; &lt;action method="setTemplate"&gt;&lt;template&gt;catalog/product/view-recipe.phtml&lt;/template&gt;&lt;/action&gt; &lt;/reference&gt; &lt;/CATEGORY_5&gt; </code></pre> <p>And this code to the Custom Layout Update section:</p> <pre><code> &lt;reference name="product.info"&gt; &lt;action method="setTemplate"&gt;&lt;template&gt;catalog/product/view-recipe.phtml&lt;/template&gt;&lt;/action&gt; &lt;/reference&gt; </code></pre> <p>I installed the patch but unfortunately still no results.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload