2

My customer wants a login only category for his Magento shop.

Basically, every category (and sub-categories) will have a specific passcode and when the customer login to the shop with username, password and a passcode, he/she will only see that specific category and its products.

How can I achieve this? Anyone can guide me about it?

Thanks

  • See here : github.com/Vinai/groupscatalog2 – Abdul Nov 21 '15 at 10:28
  • This extension is based on customer group, what I need is code based catalog, there will be a field in the login page where the customer will enter that specific code (which belongs to a category) and will be able to see only that category. @Abdul – tufanayd Nov 21 '15 at 10:56
2

This isn't a straightforward thing to do, however as a basic guide:

1/ Create a local version of the login template and add your extra field

2/ Create a local version of the login controller to store the 'code' field to the session

3/ Extend the category model to contain an extra field to store the code - see http://inchoo.net/magento/how-to-add-new-custom-category-attribute-in-magento/

4/ Create a local version of the category resource model to apply the 'code' field to the query used to fetch the categories (you could also do this in the block, but you risk missing places where categories are loaded doing it that way)

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.