Vinai / groupscatalog2

Magento extension to enable you to hide categories and products from customers depending on their customer group. This is a Magento 1.6 and newer compatible version of the Netzarbeiter Customer Groups Catalog extension.
139 stars 60 forks source link

Extension does not work in multiple stores #114

Open rmulgrew1207 opened 9 years ago

rmulgrew1207 commented 9 years ago

When setting up the extension, I have set product and categories to be hidden using default, which should translate to all stores. However it is only functioning in one store. It does not work at all when logged in to our Australian store. in Data.php the getConfig function sets store to null in the parameters but never calls store in the function. I tried changing this and it still does not work,

Any help you can offer would be greatly appreciated.

Vinai commented 9 years ago

Please post the output of the query:

SELECT * FROM core_config_data WHERE path LIKE 'netzarbeiter_groupscatalog2/%'
Vinai commented 9 years ago

I tried reproducing the issue, even without further details on your config. However, I'm unable to reproduce the issue. If I create two websites, one store view each, and set the default scope visibility to hidden, then it correctly hides all categories.

By the way, the method Netzarbeiter_GroupsCatalog2_Helper_Data::getConfig() is just a convenience wrapper for Mage::getStoreConfig(). The null value in the method signature is just hte default value, should the caled not provide a second argument. The method Mage::getStoreConfig() works exactly the same.