Hello, I’m having a problem with the “Add to Cart” button.
When someone clicks it, it keeps loading or freezes — the item doesn’t get added to the cart.
Customers are not able to complete their purchase.
How can I fix this?
website rdmalta.com
Hello, I’m having a problem with the “Add to Cart” button.
When someone clicks it, it keeps loading or freezes — the item doesn’t get added to the cart.
Customers are not able to complete their purchase.
How can I fix this?
website rdmalta.com
HEy @PeppePro02 ,
Implement a Custom AJAX “Add to Cart” Function:
Product added to cart!
This script uses Shopify’s AJAX API to add products to the cart without reloading the page .
If the issue still persists, please feel free to share your store’s collaborator code — I’d be happy to take a look and help fix it for you.
Don’t hesitate to reach out anytime. Thanks!
Best Regards,
Rajat
Shopify Expert
Thank you for the reply. Where exactly should I paste this code, please?
or i can share my collaborator code and you have a look for it pls
You can paste the AJAX script inside your product form file. Usually, this is found under Online Store > Themes > Edit code in one of these files:
sections/product-template.liquid
snippets/product-form.liquid
templates/product.liquid
If you want, I can guide you to locate the exact file in your theme to add this code safely.Please feel free to reach out thanks.
Hi sir i don t manage to fix it could you help me direct on the website?
Yes, please feel free to reach out to me — thanks! You can contact me via email.
Hi @PeppePro02
Have you installed any new apps and then encountered this issue? Or did you change something in your theme’s code?