Hello Magento Friends,

Welcome again to Magento How to blog series by MageComp. Today I will justify How to “Add to Wishlist” Without Redirecting to Wishlist Page in Magento 2.

The primary goal of every E-commerce store is to enhance customer satisfaction. Providing customers the option to add their wished products to the wishlist, makes their future purchases more easily. For that, you need to configure the wishlist in Magento 2.

When the customer adds the item to the wishlist, the customer gets redirected to the wishlist page in default Magento. This interrupts the shopping journey of customers and the customer may not even come back to surf other products.

To avoid this, you can eliminate wishlist page redirection when the customer clicks on “Add to Wishlist”. So let’s look at the steps on How to “Add to Wishlist” Without Redirecting to Wishlist Page in Magento 2.

Steps to “Add to Wishlist” Without Redirecting to Wishlist Page in Magento 2:

Step 1: First you need to go to the below path

app\code\Vendor\Extension\etc\di.xml

And add the below code

Step 2: Next, navigate to the below path

app\code\Vendor\Extension\Controller\Index\Add.php

And add the code as mentioned below:

Conclusion:

Hopefully, now you can easily allow customers to “Add to Wishlist” Without Redirecting to Wishlist Page in Magento 2. In case you face difficulties while performing the above steps, just mention them in the comment part and I will get back to you. Do spread the article amongst your Magento colleagues and through social media. Stay in touch with us so that you do not miss out on useful solutions for your Magento 2 store.

Happy Coding!

Click to rate this post!
[Total: 8 Average: 4.5]