Question

After an otherwise successful update to Magento 2.2.9, the discount code functionality has stopped working.

When I try to apply it on the Cart page, nothing happens. When I try it on the Payment Method step of checkout, I receive a "Could not apply coupon code" error.

Does anyone know what could be causing this, or how to investigate?

Was it helpful?

Solution

Formkeys were added to the coupon form in 2.2.9 (as well as forgot password form for customers).

In your template Magento_Checkout/templates/cart/coupon.phtml, inside the <form> element you'll need to add:

<?= $block->getBlockHtml('formkey'); ?>
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top