A
A
Alexander Belikov2015-09-16 07:45:19
Magento
Alexander Belikov, 2015-09-16 07:45:19

How to make a separate design for one product in magento?

I made a design for a gift card and wondered how to make a separate design for it, at the moment, for all products, the design is taken from catalog/products/view.phtml, what should I do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Fedyuk, 2015-09-17
@Alexzzz91

Magento maps its own layout descriptors to each store page .
In particular, one of the product store page descriptors is PRODUCT_<идентификатор товара>. For example, one of the product descriptors with an ID 100would be PRODUCT_100.
Knowing the product descriptor, you can create an individual layout rule for this product and call the Mage_Core_Block_Template::setTemplate() method there with the desired template, for example:

<PRODUCT_100>
    <reference name="product.info">
        <action method="setTemplate"><template>catalog/product/view-2.phtml</template></action>
    </reference>
</PRODUCT_100>

I have already written about this many times on the Magento Russian assembly forum: magento-forum.ru/topic/5117
By the way, it is convenient to add individual layout rules directly through the administrative interface of the product, the Showcase tab is intended for this :
a6e8f33cfab64e80b1bdd451a1759063.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question