且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

根据Magento中的客户组过滤商店视图

更新时间:2023-11-30 12:50:28

Magento的所有功能及其目录管理和显示工具以及主题都是在考虑此情况的情况下设计的.通常,您将商店视图及其相关的目录,价格和库存附加到唯一的网址(例如,wholesale.store.com和retail.store.com).这是有关如何在Magento中执行此操作的博客文章 v1.3 v1.4 ,但是您可以采用几种不同的方法.

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.

为此,一个选项是编写一个自定义模块,该模块将Observer绑定到customer_login事件,然后将重定向设置为与您的客户组关联的商店.

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.

有一个很好的博客文章关于如何在Magento中使用观察者,以及已知的事件.您可以在Stack Overflow中搜索有关开始开发自定义模块的指针.那应该朝着正确的方向前进.

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.