cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Websites / How t Check Product’s Attribute on Certain Website

Multiple Websites / How t Check Product’s Attribute on Certain Website

I have magento with multiple stores/store views and different domains/sub-domains.

 

There is a catalog page (no buy button) linking to multiple stores to purchase products.

I need PHP code like this: if attribute on certain store view is set to ‘this, this and this’ then display ‘this’, else ‘this’.

 

Please help! Thank you.

1 REPLY 1

Re: Multiple Websites / How t Check Product’s Attribute on Certain Website

Hi, this isn't trivial. Normally you'll have flat catalog enabled on Magento 1 to speed up page loads. When you do this, Magento remembers the flat catalog table specific to the store that should be used for all requests. Even trying to set the store ID on product collections after it's already been set elsewhere won't work.

 

So I don't think an answer is going to be easy here. To get around this option, one option would be to create your own database query but that's not so nice. You can see if disabling flat catalog and then setting your store works but I'm not confident that it will. 

 

I really would try and recommend finding a way to store the information that you need on the current website. That way the information will always be available to you. 

----
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!