Skip to Content
0
Nov 14, 2019 at 06:12 PM

Problem applying promotion at entry level

123 Views

Hello,

I have two custom folders deployed in two versions of Hybris, 6.3.0.22 and 6.3.0.30. We are facing some problems when

We have face the following problem while executing the promotions engine.

Given the following rule:
[{"definitionId":"y_cart_total","parameters":{"value":{"uuid":"4fa1c8bf-1be5-449f-a40a-4f2851a23c49","type":"Map(ItemType(Currency),java.math.BigDecimal)","value":{"USD":8}},"operator":{"uuid":"d1168a48-145c-4242-b4f6-46cf0aaae16c","type":"Enum(de.hybris.platform.ruledefinitions.AmountOperator)","value":"GREATER_THAN_OR_EQUAL"}},"children":[]},{"definitionId":"y_qualifying_coupons","parameters":{"coupons":{"uuid":"fc44e459-e733-482c-a04e-86a352138a64","type":"List(ItemType(AbstractCoupon))","value":["YOQUIERO"]}},"children":[]},{"definitionId":"y_qualifying_categories","parameters":{"quantity":{"uuid":"d94bb9ec-14b4-4da1-80bc-d5ac81bfa813","type":"java.lang.Integer","value":1},"categories_operator":{"uuid":"b15093f6-898c-47bc-a1ad-fb3d3bef3ca8","type":"Enum(de.hybris.platform.ruledefinitions.CollectionOperator)","value":"CONTAINS_ANY"},"excluded_categories":{"uuid":"60f98208-7b4b-46d2-ad02-18b423324bdb","type":"List(ItemType(Category))","value":["007006","0022","0025","0030","0026"]},"categories":{"uuid":"0258a018-e731-4058-81d1-69b2d9467348","type":"List(ItemType(Category))","value":["005","007002","007003","007004","007005","007001","003","004","001","002","006","008","009","012","0024"]},"excluded_products":{"uuid":"219eb090-09fd-42ab-b3de-a4b59a42e9f5","type":"List(ItemType(Product))"},"operator":{"uuid":"b6295c5d-d876-475b-9f4c-a597f3e8b277","type":"Enum(de.hybris.platform.ruledefinitions.AmountOperator)","value":"GREATER_THAN_OR_EQUAL"}},"children":[]}]

We apply correctly the following action:
[{"definitionId":"y_order_entry_percentage_discount","parameters":{"value":{"uuid":"0615ecac-96cd-4652-94b7-4b6b15b685a6","type":"java.math.BigDecimal","value":10}}}]

Here you can see the rules in a graphical way:


We haven seen that the same code provokes different results depending on the installed version. Specifically, the version where the product discounts are being applied correctly is the 6.3.0.22, whereas the version 6.3.0.30 is giving some trouble, as the discounts are not applied. It's not about a problem of the conditions, we are sure that the product belongs to the category and the cart is greater than the indicated price, Additionally, we have checked that for example other rules such as changing the shipping mode or applying the discount to the global cart ( y_order_percentage_discount ) work fine. In 6.3.0.22, the discount applies

-----------------
In 6.3.0.30, the discount does not apply (there's no discount, check there is no orange price)

The entry.getDiscountValues() it is supposed to be calculated dynamically, but it doesn't appear anything. Again, check how it does apprear in the 6.3.0.22 but it doesn't in 6.3.0.30

------

----------------------------

Do you know what could be causing this? Is there any configuration that we are missing (the environments and databases are also different)?

Attachments

image.png (36.8 kB)
unnamed.png (39.1 kB)
unnamed-1.png (36.1 kB)
captura.png (22.7 kB)
captura.png (14.3 kB)