我一直在通过阅读文档来搜索如何将促销附加到运输方法,我计划使用运输方式ID作为标识符。
看起来像这段代码:
dw.order.ShippingLineItem.getShippingPriceAdjustments()
但我不知道如何使用送货方式ID获得促销。
任何?
答案 0 :(得分:4)
PromotionMgr.getActiveCustomerPromotions().getShippingPromotions(shippingMethod : ShippingMethod)
说明:
getActiveCustomerPromotions()
获取当前用户(店面用户)的所有激活促销。您可以getActivePromotions()
getShippingPromotions()
将针对特定送货方式启用促销活动ShippingMgr
课程获取送货方式。