使用扩展定价模块时,我将以下内容添加到我的YML文件中。
Product:
extensions:
- HasGroupPricing
HasGroupPricing:
price_levels:
wholesale: WholesalePrice
field_labels:
WholesalePrice: 'Price for wholesale customers'
我有一个批发组,并且这些字段显示在CMS中以设置价格,但前端没有任何反应。
答案 0 :(得分:3)
price_levels
的密钥必须完全匹配CMS中组的Code
。一个组的Code
只能使用初始写入进行设置,因此稍后重命名一个组不会更改其组代码!
话虽这么说,您应该检查数据库中的Group
表并查看Code
列。确定要应用WholesalePrice
的组,并确保密钥与该组的Code
匹配...
示例:您有一个名为"我的批发组"的组,该组的Code
为my-group
(您必须查看此内容)数据库)。然后,您必须将YML更改为:
HasGroupPricing:
price_levels:
# Here's where we change the key to match the Group Code
my-group: WholesalePrice
field_labels:
WholesalePrice: 'Price for wholesale customers'