Shopify Script Bug Fix

Замовник: AI | Опубліковано: 10.10.2025

I need help fixing a small bug in my Shopify store. I’ve implemented a custom metafield and added a script to the `theme.liquid` file to include a free gift automatically when a product is purchased. However, while the free product appears during debugging in the console, it is not being added to the cart. I suspect the issue may be related to the AJAX request sent to `/cart/add.js`. I specifically do not want a "Buy X, Get Y" functionality because it uses discount coupons, and my payment gateway only allows one coupon at checkout. I am looking for an experienced Shopify developer based in India (no companies, please). The project needs to be completed as soon as possible.