MutationObserver to keep control of the button when other scripts change it, including AJAX carts. The entries below cover the cases where that detection needs a hint.
Supercycle doesn't detect the variant ID input
Supercycle doesn't detect the variant ID input
Why it happens. Supercycle finds the variant ID input with To list every candidate input, run this in the browser console:
[name='id']. A theme that names or structures the input differently isn’t detected.How to fix it. Add the supercycle-variant-id-input attribute to the input whose value changes when the variant changes.Variant ID input
Find variant inputs
Supercycle doesn't detect the add to cart form
Supercycle doesn't detect the add to cart form
Why it happens. Supercycle looks for the add to cart form with several selectors, in this order:If the theme doesn’t use a Liquid form tag:The form’s
- A form with the
supercycle-add-to-cart-formattribute, the most reliable option - A form with
data-type='add-to-cart-form', used by many themes - A form with
data-product-form, a common fallback in Online Store 2.0 themes - The last eligible form whose action is
/cart/add, used only when nothing else matches
supercycle-add-to-cart-form attribute to your product form.Liquid product form
HTML form
action must end in /cart/add and the form must contain a <button type="submit">. The form usually lives in one of these files:The Methods block doesn't show on the product page
The Methods block doesn't show on the product page
Why it happens. The Supercycle Engine app embed is off, the page is cached, or the theme isn’t compatible with app blocks out of the box.How to fix it. Turn on the Supercycle Engine app embed in the theme editor, then hard refresh the page. If the block still doesn’t show, contact support from the app with the theme name and a link to the product page.
The Methods block is empty
The Methods block is empty
Why it happens. The product isn’t in Supercycle, or none of its methods are turned on.How to fix it. Open the product in the Supercycle admin, confirm it’s imported, and turn on at least one method.
The price doesn't update when the variant changes
The price doesn't update when the variant changes
Why it happens. The block reads the variant from
product.selected_or_first_available_variant. A theme that doesn’t update it on variant change leaves the block on the first variant’s price.How to fix it. Make sure your theme updates product.selected_or_first_available_variant when the customer changes variant.