Discount Codes Not Working After Update (Magento 2.2.9)
-
07-03-2021 - |
Frage
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?
Lösung
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'); ?>
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit magento.stackexchange