根据客户组显示自定义产品属性 (Magento)
我在 Magento 的一家商店下拥有某些产品的批发属性。我想将其设置为仅当客户登录并且属于批发客户组时,这些特定属性才会显示在产品页面上。
这可能吗?
I have wholesale attributes for certain products under one store in Magento. I would like to set it so those particular attributes only appear on the product page IF the customer is logged in and they are in the Wholesale customer group.
Is this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我有相同的用例,并且使用了 GroupsCatalog 扩展,这是免费的并且非常适合我。
I had the same use case and I used the GroupsCatalog extension, which is free and works perfectly for me.
像这样的东西应该可以工作,尽管我还没有一起测试过。假设您的批发 groupid = 2 并且您想要显示产品属性“productvideos”
信用:
http://www.magentocommerce.com/boards/viewthread/22597/#t74992
Something like this should work, although I have not tested this together. It's assuming your wholesale groupid = 2 and that you want to show the product attribute 'productvideos'
Credit:
http://www.magentocommerce.com/boards/viewthread/22597/#t74992
好的,这是解决方案。
在模板/目录/产品/视图>中attribute.phtml 使用以下内容:
感谢@nvoyageur 提供了正确方向的初始指针!
Okay, here's the solution.
In template/catalog/product/view> attributes.phtml use the following:
Thanks to @nvoyageur for the initial pointer in the right direction!