How can I create a custom Ajax cart button in my collection?

How can I create a custom Ajax cart button in my collection?

Ritikaaaa
Shopify Partner
39 0 3

Hello,

How can i create Custom ajax cart button in shopify collection??

Replies 3 (3)

Sweet_Savior_3
Shopify Partner
1375 104 148

hello @Ritikaaaa 

 

For that you need a developer that will help you with the custom ajax button.

Don't forget to like and accept the solution to help others store owners.
Looking for an expert or Have any queries ? Send query to the Inbox
Coffee Tip ? Pay to shopify.dev.34@gmail.com
From Less To Further !!!

kanchandigisoft
Shopify Partner
16 3 2

Hi 

For this, you need to add JavaScript code to handle the AJAX request when the custom cart button is clicked. You'll need to send a POST request to Shopify's cart endpoint with the product ID and variant ID.

Kanchan Dhiman
Ritikaaaa
Shopify Partner
39 0 3

Could you please help me on script code for ajax add to cart?