A user’s “Choose options/Quick add” button stopped functioning after making coding changes to their Shopify store using the Origin theme.
Root Cause:
The site uses a custom product template (likely “featured product” section) instead of the default template. When the quick add button is clicked, it fetches the product page looking for a section with ID starting with “MainProduct-”, which doesn’t exist in the custom template, causing the feature to fail.
Proposed Solution:
Two approaches were suggested:
Recreate default template as alternate (recommended):
Create a new product template named product.original.json using the default structure
Modify the card-product.liquid snippet to add data-product-url attribute pointing to this template
Update the button code (around line 122) with: data-product-url="{{ card_product.url }}?view=original"
Test by accessing product URLs with ?view=original parameter
Modify quick add JavaScript to recognize the “Featured product” section (requires JavaScript knowledge)
Status: The user attempted implementation but encountered difficulties locating where to add the code correctly. Further clarification on exact placement in the card-product snippet was provided.
Summarized with AI on November 12.
AI used: claude-sonnet-4-5-20250929.
I’ve noticed the choose options/quick add button isn’t working on my website, I have been making some coding changes today so not sure if it’s something I’ve done, can anyone help please?
I guess you’ve created a custom template for your products and use this one instead of the default one (or significantly modified your default one to use “featured product” section instead)?
What happens now is this – when you click “choose option”, the quick add code fetches product page and extracts a specific section from it – the one with id starting with “MainProduct-”.
Default product page includes this section, your product page does not, so the code fails.
There is a couple of ways to fix this – one is to modify quick add code to recognize the “Featured product” section as well as default “Product Information”
This would require some JS knowledge and I am not sure it will work.
Another approach is to re-create default product page template as alternate template and then modify product card code to use this one for quick add.
Basically, in your card-product.lquid snippet there is this code:
quick add Javascript code uses data-product-url attribute to store product page URL.
So, if you will re-create default product page template as, say, product.original.json and then use the following data-product-url instead – this should pretty much solve your problem.
Thank you very much! Can I just confirm where I need to add the ‘data-product-url’ coding? I tried at the bottom of the page and under the snippet code shown above and neither have worked unfortunately.