【问题标题】:hybris promotion coupon is not applied to total pricehybris 促销优惠券不适用于总价
【发布时间】:2017-10-01 12:52:57
【问题描述】:

我正在添加带有规则的活动优惠券。当我兑换优惠券时,我可以设置优惠券并在店面写优惠券应用。但购物车的总价格没有改变。此外,当我发布规则时,购物车的总价格没有变化。

感谢您的回复,我正在写一些有关情况的详细信息:

首先我添加了这些扩展:

<extension name='rulebuilderbackoffice' />
<extension name='couponbackoffice' />
<extension name='droolsruleengineservices' />
<extension name='ruledefinitions' />
<extension name='promotionengineservices' />
<extension name='couponfacades' />
<extension name='promotionenginesamplesaddon' />
<extension name='promotionengineatddtests' />

然后我让ant clean all,ant初始化并启动hybris。

来自后台:

Create single code coupon (state is active, no date restriction, max redemption for customer is 10, max total redemption is 100),
Create rule (website is default, set priority 500, set as stackable, set rulegrup orderpromotionrulegroup), 
Add to rule condition as coupon code, set coupon code as created coupon code
Add to rule action as fixed discount on cart as 100 TRY
Publish rule to promotion-module, status is published
Promotion module's version is increased but catolog of promotion module is empty I don't know is it important?

在店面:

I added an item to bag, its price is 338,28 TRY (there is no other discount)
I entered the coupon, 
In the page, says coupon is applied, but total price is didn't change, still 338,28 TRY.

在命令行中写入,

INFO  [hybrisHTTP17] [AbstractOrderRaoPopulator] Order discount list is empty, skipping the conversion

【问题讨论】:

  • 能否详细介绍一下版本、优惠券类型和规则?
  • 嗨 Kemal hocam,您可能需要调试控制器,从后台检查优惠券代码等。如果您提供更多详细信息,最好找到解决方案。您在终端上看到任何日志吗?

标签: java hybris promotions


【解决方案1】:

如果没有更多详细信息,很难说出了什么问题,但通常会忘记(我一直这样做)是将websitegroup 添加到 SourceRule 以匹配您的促销目标网站。 然后您必须重新发布规则。

另外请注意,在您的规则发布后,您必须修改购物车才能触发对促销活动的重新评估。 如果您只是重新加载购物车页面,则不会发生任何变化,因为促销计算仅在修改购物车时进行。

如果这不是解决方案,您能否提供更多详细信息?理想情况下,您可以发布相应的 DroolsRule 的 ruleContent 属性(包含正在评估的实际 drools 语法)。 hybris 版本、日志输出等其他信息也会有所帮助。

【讨论】:

  • 我默认添加到网站组作为目标。但是我没有对购物车重新计算做任何事情。我希望这在 DefaultCommercePlaceOrderStrategy 中自动完成,即 placeOrder 并在此方法中调用 getPromotionsService().transferPromotionsToOrder。我可以修改一些代码吗?
  • 我仍然认为该规则未正确触发,因为网站组。您可以尝试在单独的安装中安装 b2c_acc 配方,以查看其在示例数据中是如何完成的。您的 CMSSite(例如电子产品)需要将 defaultPromotionGroup 设置为您在 PromotionSourceRule 中指定的与网站相同的值。请参阅DefaultCommerceCartCalculationStrategy.getPromotionGroups() 方法。这在规则评估期间用于检索哪个促销组/网站处于活动状态。只有具有该网站集的规则才有资格触发。希望这会有所帮助!
  • 感谢您的评论,当我按照您所说的设置CMSSite的推广组时,问题就解决了。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2021-04-02
  • 2021-12-31
  • 1970-01-01
  • 1970-01-01
  • 2018-06-28
  • 2017-05-02
  • 2014-02-21
相关资源
最近更新 更多