Filter store view based on Customer Group in Magento

微笑、不失礼 提交于 2019-12-24 08:11:51

问题


I am developing an e-commerce website where we need to have 2 store views. One for the professional customer and another for the retail customer.

We need to have the same inventory but different product description, different attributes, and look and feel for wholesale/retail customer groups.


回答1:


All of Magento, with its catalog management and display tools, along with themes, is designed with this scenario in mind. Generally you attach a store view with its associated catalog, pricing and inventory to a unique URL (e.g. wholesale.store.com and retail.store.com). Here are blog posts on how to do this in Magento v1.3 and v1.4, however you could take a couple of different approaches.

One option for this is to write a custom module that binds an Observer to the customer_login event, and then sets a redirect to the Store that you have associated with their Customer Group.

There's nice blog post on how to use Observers in Magento, and a cheat sheet of known Events. You can search Stack Overflow for pointers on starting the development of a custom module. That should get headed in the right direction.



来源:https://stackoverflow.com/questions/3742371/filter-store-view-based-on-customer-group-in-magento

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!