Published: January 26, 2020
Last updated:

Magento :: Can not delete products from cart after SUPEE-11219

It is not possible to remove products from cart or minicart after installing SUPEE-11219 or upgrade to Magento 1.9.4.3. There are no any errors shown.

Cause

Most likely cause of this problem are missing form keys in custom design theme used in template/checkout/cart/sidebar/default.phtml. As seen in corresponding changes for RWD theme:
--- app/design/frontend/rwd/default/template/checkout/cart/sidebar/default.phtml
+++ app/design/frontend/rwd/default/template/checkout/cart/sidebar/default.phtml
@@ -36,7 +36,14 @@

        <a href="<?php echo $this->getDeleteUrl() ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Remove This Item')) ?>" onclick="return confirm('<?php echo Mage::helper('core')->jsQuoteEscape($this->__('Are you sure you would like to remove this item from the shopping cart?')) ?>');" class="btn-remove"><?php echo $this->__('Remove This Item') ?></a>
+        <a href="#"
+           title="<?php echo Mage::helper('core')->quoteEscape($this->__('Remove This Item')) ?>"
+           onclick="if (confirm('<?php echo Mage::helper('core')->jsQuoteEscape($this->__('Are you sure you would like to remove this item from the shopping cart?')) ?>')) {
+                   customFormSubmit('<?php echo $this->getDeleteUrlCustom(false) ?>','<?php echo $this->escapeHtml(json_encode(array('form_key' => $this->getFormKey()))) ?>', 'post')
+                   }"
+           class="btn-remove">
+            <?php echo $this->__('Remove This Item') ?>
+        </a>

Solution

Custom theme should be updated accordingly after SUPEE-11219 patch to allow form submission with form keys as shown in changes for RWD theme.

Posted in: Known issues, supee-11219

43 votes, 5.00 avg. rating (99% score)