Magento – Coupon code working on checkout/#payment but not working on cart page:Magento2

couponmagento2

I'm trying to apply coupon code on Magento2 store.
I have created normal coupon code (without any condition) When I applied it on cart page it not working give me an error "The Coupon code is invalid" But when I go for checkout then apply it so it work there (same coupon code )..

Please look into below images.
not working on cart page

Working on checkout page

Please assist me !!

Best Answer

Go to below js path :- app\design\frontend\Vendor_Name\Theme_Name\Magento_Ui\web\js\lib\core\collection.js

Line no :- 272 (find below line) var hasObsoleteComponents = items().length && !_.intersection(_elems, items()).length;

Just Replace function items just like below

var hasObsoleteComponents = items.length && !_.intersection(_elems, items).length;

Related Topic