How the methods app block works
The Methods app block takes over your theme’s add to cart button using a component called ProductContextSync. This component automatically detects, monitors, and controls your theme’s product form.Syncs the variant ID
Injects hidden inputs
Controls the button state
The button stays disabled when:
- No method is selected
- The product is out of stock
- The customer has insufficient credits
Advanced calendar settings
The Methods app block exposes two fields for blocking selectable dates on the storefront calendar:- Unavailable start dates — blocks dates from being chosen as a rental start date.
- Unavailable end dates — blocks dates from being chosen as a rental end date, independently of start dates.
Block All Mondays
Block Saturdays and Sundays (Weekends)
Block a Specific Date (January 1, 2026)
Block a Date Range (December 22-27, 2025)
Combine Multiple Rules
You can combine multiple matchers in an array to block multiple conditions:Format Reference
- Day of week:
{"dayOfWeek": [0, 1, 2, ...]}- Blocks specific days of the week (0=Sunday, 6=Saturday) - Single date:
{"from": "YYYY-MM-DD", "to": "YYYY-MM-DD"}- Blocks a specific date (use same date for bothfromandto) - Date range:
{"from": "YYYY-MM-DD", "to": "YYYY-MM-DD"}- Blocks a range of dates - After date:
{"after": Date}- Blocks all dates after a specific date - Multiple matchers: Use an array
[...]to combine multiple rules
Block Dates Dynamically
To block dates dynamically (e.g. limit bookings to a maximum of 6 weeks in advance), add this script to your product template or a custom liquid block:weeksToBlock to change the booking window. window.supercycleDisabledMatchers applies to both start and end dates.
Troubleshooting
MutationObserver to maintain button state even if other scripts modify it.It also supports AJAX carts by injecting rental data before submission.
Variant ID input not detected
Variant ID input not detected
[name='id'].If your theme doesn’t follow this pattern, Supercycle may not detect it automatically.To resolve this, add the
supercycle-variant-id-input attribute to the input element whose value updates when variants change.Add to cart form not detected
Add to cart form not detected
If none match, the app block won’t be able to sync or control your button.Supercycle uses the following detection priority order:
Forms with `supercycle-add-to-cart-form` attribute
Forms with `data-type='add-to-cart-form'`
Forms with `data-product-form`
Last eligible form with `/cart/add` action
action ends with /cart/add and includes a <button type="submit"> element.The add to cart form is usually located in one of these files:Methods block not showing
Methods block not showing
Empty methods app block
Empty methods app block
Price not updating on variant change
Price not updating on variant change
product.selected_or_first_available_variantAdding the methods app block to custom or legacy themes
Adding the methods app block to custom or legacy themes
Open your product template
Open one of these files depending on your theme:
sections/main-product.liquidsections/product-template.liquidtemplates/product.liquid(very old themes)
Find the add to cart form and the title
The methods component should go between these two elements.
Paste the methods component
Save and test
FAQ
Can I style the methods app block?
Can I style the methods app block?
custom_css setting inside data-settings for minor overrides. For larger design changes, use your theme’s stylesheet and target the methods block CSS classes.Can I target a specific method option?
Can I target a specific method option?
data-supercycle-option-name, so you can hide or restyle specific options from CSS or JavaScript. See Target method options by name for examples.