Demandware:如何使用送货方式ID获得促销

时间:2014-11-25 09:39:26

标签: demandware

我一直在通过阅读文档来搜索如何将促销附加到运输方法,我计划使用运输方式ID作为标识符。

看起来像这段代码:

dw.order.ShippingLineItem.getShippingPriceAdjustments()

但我不知道如何使用送货方式ID获得促销。

任何?

1 个答案:

答案 0 :(得分:4)

PromotionMgr.getActiveCustomerPromotions().getShippingPromotions(shippingMethod : ShippingMethod)

说明:

  • getActiveCustomerPromotions()获取当前用户(店面用户)的所有激活促销。您可以getActivePromotions()
  • 获取全球促销信息
  • getShippingPromotions()将针对特定送货方式启用促销活动
  • 通过ShippingMgr课程获取送货方式。