0

I am running a Magento 2 multistore installation. I added a new storefront, which is almost the same as the main store (same layout/theme, but different logo, colors etc). However, on the product detail pages I want to hide some elements/variables (for example the product description) in this new storefront or only display them when a specific translation for this storefront is set. Both storefronts are using the same layout xml files.

What is the best way to implement these little exceptions?

And, when using product attribute values in phtml files, can I also get check if this value is storeview-specific or not? For example:

$product->getData('product_attribute_name')

This returns a value, but I don't know if it's the 'main' value for this attribute, or if it's storeview specific. I would like to do something like this, so it only returns a value when a storeview specific value is set:

$product->getData('product_attribute_name', $storeviewCode)

Your Answer

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

Browse other questions tagged or ask your own question.