How to Show Custom Popup on click of “Proceed to Checkout” Button From Minicart in Magento 2

How to Show Custom Popup on click of "Proceed to Checkout" Button From Minicart in Magento 2

The default Magento 2 redirects a customer to the checkout page when the “Proceed to Checkout” button is clicked as shown below:

How to Show Custom Popup on click of "Proceed to Checkout" Button From Minicart in Magento 2 1

However, depending on the business requirements, one may want to show popup on the mini cart when “Proceed to checkout” button is clicked in Magento 2.

The popup may show a custom sales message or further instructions or any offer related details on the mini cart that may be important for the business or customer to know at that stage of the purchase cycle.

Here, I have shared the programmatic solution to show custom popup on click of “Proceed to Checkout” button from minicart in Magento 2.

Method to Show Custom Popup on click of “Proceed to Checkout” Button From Minicart in Magento 2:

  1. Create file requirejs-config.js under app\code\Vendor\Module\view\frontend

  2. Create file minicart.js under app\code\Vendor\Module\view\frontend\web\js\checkout\view

  3. Run the below commands:

That’s it.

Once you implement the above solution, the frontend shows the custom popup as shown below:

How to Show Custom Popup on click of "Proceed to Checkout" Button From Minicart in Magento 2 2

If you need more help regarding this post, feel free to ask in the Comment section below.

I would be happy to help you.

Do consider sharing this post with Magento Community via social media.

Thank you.

Get Weekly Updates

Never miss Magento tips, tricks, tutorials, and news.

Thank you for subscribing.

Something went wrong.

5
(based on 12 Reviews)

Krishna is a Magento developer at Meetanshi. She is always ready to learn new things. Apart from work, she likes to read books and spend time with family.

Leave a reply:

Your email address will not be published.