Modify event handling on Quick Buy event

Modify event handling on Quick Buy event

RahaTech
Visitor
1 0 0

Hi team

 

I am using the Prestige theme for my website. 

When the user sees a product and clicks on Quick buy (The icon with a plus sign), I want to redirect the user to an external link instead of pulling up the cart and adding the product there.

Can you help me understand where I can handle this onclick event and redirect to the site of my choice. 

 

Website: https://rahalooms.com/

Thanks in advance!

Reply 1 (1)

Small_Task_Help
Shopify Partner
830 27 75

Hi,

 

Need to Modify the Quick Buy Event Handler

 

Code example

$('.quick-buy-button').on('click', function(e) {
    e.preventDefault(); // Prevent the default action
    window.location.href = 'https://example.com'; // Replace with your external link
});
To Get Shopify Experts Help, E-mail - hi@ecommercesmalltask.com
About Us - We are Shopify Expert Agency
At Google My Business - Ecommerce Small Task - Hire Shopify Developers Ahmedabad