In my module I have condition like cart price rule. How to check item in cart satisfy condition or not.

  • Hi. Did you find some solution? – spiil Feb 22 '18 at 9:46

Create a coupon code with the condition you have with 0% discount just to test the condition satisfying or not. Then you can apply that coupon code to your cart.

$quote = $this->cart->getQuote();
$quoteCouponCode = $quote->getCouponCode();
if ($quoteCouponCode) {
   //condition is satisfied
    * your logic

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.