0

I have created a cart price rule which contains specfic coupon and percentage of product price discount(10%).

How to checkflow of Magento apply these rule.

  • Take a look at: vendor/magento/module-sales-rule/Model/Quote/Discount.php. – Khoa TruongDinh Apr 2 '18 at 6:21
  • Where to process discount amt calculation. – Mano M Apr 2 '18 at 6:24
1

First check on which websites, which customers group you used in that rule. then check conditions and actions for your rule.

After that, you add the product to the cart and check checkout/cart page. If cart price rule is applying for this product that you can see discount is applied to the product and you see in a summary also.

Please see below screenshot, I create one cart rule and it is applied to a product when product price greater than 100 and I applied 10$ fixed amount discount.

enter image description here

In your case, after adding the product to cart, you add coupon code in checkout/cart page. After adding this code your rule work and see a discount label in summary also.

enter image description here

I hope this will help you.

  • How to check core process(calculation of discount amt).Because i want to set new rule for shopping cart . – Mano M Apr 2 '18 at 6:22
  • Means you have two cart price rule or a single cart price rule. – Dhaduk Mitesh Apr 2 '18 at 6:24
  • I want to know about some details. How to magento calculate discount amt.I want to customise that – Mano M Apr 2 '18 at 6:25
  • As per your cart rule, Magento gets value from that rule and process your rule. and also you calculate manually your rule and check price. – Dhaduk Mitesh Apr 2 '18 at 6:29
  • Yes @Dhaduk Mitesh.I want to customise these flow.So can u help me to find out which file these calculation/process going on. – Mano M Apr 2 '18 at 6:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.