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?

Était-ce utile?

La 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'); ?>
Licencié sous: CC-BY-SA avec attribution
Non affilié à magento.stackexchange
scroll top