Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Multistore products -> login #31

Open
KoenWijnstok opened this Issue Jan 24, 2013 · 6 comments

Comments

Projects
None yet
3 participants

Hi,

I'm setting up our second store and came up with a strange issue.
When I enable 1 product to show up in 2 root categories (thus in 2 stores) in every store I have to login to see the product. These products are setup to be viewable by everyone.
When I disable the module in one of these stores for that specific store the problem has gone and I can view the product normal.

If I have a product which is only in 1 root category / store there is absolutely no problem. It only shows up after enabling the product in another store/category.

Does this sound familiar? (hope so...)

gr,
koen

Owner

Vinai commented Jan 25, 2013

Hi,

thanks for the report. I'm afraid it doesn't sound familiar, but I'll look into it. Currently I'm refactoring the indexing process, which might have the side effect of resolving your issue along the way. Hope to have more news next week.

Hmmz, too bad.
Is there any way to troubleshoot your app? does it keep logfiles somewhere?

Is the app multi-store compatible at least? ;) (in other environments)

Owner

Vinai commented Jan 25, 2013

I do use logging a lot during development, but by default no logfiles are written. You would have to add calls where needed.

The module does generally work in a multi-store environment.

The first thing to check is if the settings are correctly stored in the index tables. Every visible entity should have a record in there. To apply the filters, the entity collection is simply joined against the index with an inner join. This is done by Netzarbeiter_GroupsCatalog2_Model_Resource_Filter.

So if there is a record in the index table, but the product still isn't visible, there must be a bug applying the filter.
If there is no record in the index table, then it is an indication for a bug in the indexer Netzarbeiter_GroupsCatalog2_Model_Resource_Indexer_Abstract

Hi,

I had a similar issue, especially when i've tried to search for the product and then open it's detail page. It forced me to login. This seemed to be an issue in app/code/community/Netzarbeiter/GroupsCatalog2/Model/Observer.php file in catalogCategoryLoadAfter function. For some reason this function is called twice, first time it has a correct Category entity passed to it, but on the second call Category entity was empty, thus $category->getData() returned an empty array, causing $this->_applyGroupsCatalogSettingsToEntity($category) to turn on $category->getData('forbidden_by_groupscatalog2'), which resulted in redirecting to customer login page. Not sure if this is a correct way to fix that, but wrapping everything with if (array_key_exists('entity_id', $category->getData())) { ... } helped.

Regards.

Owner

Vinai commented Oct 16, 2013

Thank you for your feedback. I'm still unable to reproduce the issue :(
If you find a way to do so in a reproducible manner, please let me know! I would very much appreciate it.

Owner

Vinai commented Nov 23, 2013

I've fixed a bug in today's release 0.3.3 which might have been the cause for the problem you experienced.
Please try this latest release and let me know if the issue persists or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment