I need to add to wishlist ajax based or customer should not redirect to wishlist page with out redirect in Magento 2 environment.
anyone have suggestion please share.
magento2wishlist
I need to add to wishlist ajax based or customer should not redirect to wishlist page with out redirect in Magento 2 environment.
anyone have suggestion please share.
Best Answer
To fix it we need to override Magento\Wishlist\Controller\Index\Add controller.
– add following line in module di.xml to tell magento to use our class instead of standard one.
Filename: Vendor/Module/etc/frontend/di.xml
– create the class. Basically it duplicate original method, only $resultRedirect updated to use referer url
Filename: Vendor/Module/Controller/Index/Add.php