How to Check Which Shopping Cart Rule is Applied to Cart in Magento

How to Check Which Shopping Cart Rule is Applied to Cart in Magento

The default Magento allows the admin to add shopping cart price rules.

He can offer coupon codes to avail the discounts.

However, sometimes you may want to set conditions based on which discounts are offered.

For example, the admin wants to offer a specific payment method only for certain scenarios.

To implement this, the admin needs to check which shopping cart rule is applied to cart in Magento.

The below solution can be used for the same:

Method to Check Which Shopping Cart Rule is Applied to Cart in Magento:

Add the below code.

By adding this code, you will be able to check which shopping cart price rule has applied to quote.

That’s it.

If you have queries regarding this post, feel free to ask in the Comment section below.

I would be happy to answer your questions.

Thank you.

Get Weekly Updates

Never miss Magento tips, tricks, tutorials, and news.

Thank you for subscribing.

Something went wrong.

5
(based on 13 Reviews)

An expert in his field, Jignesh is the team leader at Meetanshi. His passion for Magento has inspired others in the team too. Apart from work, he is a cricket lover.

Leave a reply:

Your email address will not be published.