0

How to view attribute only in one store? My question is: How to Display attribute only in one store? I have a multistore views. For example. How can I view dimension only on technical view but not for standart customers view?

0

What you can do is create a child theme for that store and with your themes layout xml file, add the attribute code.

So for example if I was to extend from the RWD theme and set "Color" not to be used on the product listing page I would do the following to display "Color" in my child theme.

1. Add custom layout file

<theme>
    <parent>rwd/default</parent>
    <layout>
        <updates>
            <custom>
                <file>custom.xml</file>
            </custom>
        </updates>
    </layout>
</theme>

2. Add Attribute

Then in my custom.xml file, I would do the following:

<?xml version="1.0"?>
<layout version="0.1.0">
    <catalog_category_default>
        <reference name="product_list">
            <action method="addAttribute">
                <name>color</name>
            </action>
        </reference>
    </catalog_category_default>
</layout>
  • Yes, it would be, but what if I have 500 attributes? And over time someone decides to make a difference? There is a possibility to do it from the administration? – MiMo Mar 14 '16 at 23:39
  • Well 500 attributes would seem unlikely but there isn't an option in the Magento admin which would turn on/off a attribute per store view that I know of . Even if you did have that option, in the example above I left out that you would have to update your template to get the value e.g. $product->getColor(); – Colin Murphy Mar 15 '16 at 8:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.