Domanda

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?

È stato utile?

Soluzione

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'); ?>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange
scroll top