Add product to cart
Apply for a Gift card in the Gift Card section on shopping cart page
Then remove the Gift card from Shopping cart summary section
Please let us know if anyone faced this issue before and its solution if anyone knows.
Thanks
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityI have found one solution and it seems there is a bug in default Magento. I have created a patch for this issue where we can fix it easily by applying the patch. Create new file named as GIFT-CARD-REMOVE-404.patch and past below code in it.
diff --git a/vendor/magento/module-gift-card-account/Controller/Cart/Remove.php b/vendor/magento/module-gift-card-account/Controller/Cart/Remove.php
index 9988befb..ad4921fa 100755
--- a/vendor/magento/module-gift-card-account/Controller/Cart/Remove.php
+++ b/vendor/magento/module-gift-card-account/Controller/Cart/Remove.php
@@ -7,14 +7,14 @@
namespace Magento\GiftCardAccount\Controller\Cart;
use Magento\Checkout\Model\Cart as CustomerCart;
-use Magento\Framework\App\Action\HttpPostActionInterface;
+use Magento\Framework\App\Action\HttpGetActionInterface;
use Magento\Framework\App\ObjectManager;
use Magento\GiftCardAccount\Api\GiftCardAccountManagementInterface;
/**
* @inheritDoc
*/
-class Remove extends \Magento\Checkout\Controller\Cart implements HttpPostActionInterface
+class Remove extends \Magento\Checkout\Controller\Cart implements HttpGetActionInterface
{
/**
* @var GiftCardAccountManagementInterface
You can run this patch via below command
patch -p1 < GIFT-CARD-REMOVE-404.patch
Flush cache and verify. Hope this will help you.