overrides nor a translations object is configured, the customization engine remains inactive and the widget keeps its standard behavior.
Before you start
This is an advanced theme customization intended for developers. You need the numeric Shopify variant and selling plan IDs that you want to target.Add a Custom Liquid block to the product page
- In Shopify admin, go to Online Store > Themes.
- Click Customize for your active theme.
- Open the product detail page (PDP) template where you use the Subscription Options block.
- In the product information section, click Add block and select Custom Liquid.
- Move the Custom Liquid block above the Subscription Options block.
- Add your JavaScript configuration between
<script>and</script>tags:
- Click Save.
Add the configuration
The following example defines a fallback, a variant override, a selling plan override, a quantity override, and an exact variant, selling plan, and quantity combination:one-time-purchase as the selling plan key.
Understand override priority
The widget combines matching values in this order:defaultvariants[variantId]sellingPlans[sellingPlanId]variantSellingPlans[variantId][sellingPlanId]quantities[quantity]variants[variantId].quantities[quantity]sellingPlans[sellingPlanId].quantities[quantity]variantSellingPlans[variantId][sellingPlanId].quantities[quantity]
variantSellingPlans structure, exact combinations can be written as:
Select the product quantity input
The widget listens forinput, change, and Shopify theme quantity-selector:update events from the product page’s quantity input and reapplies matching overrides immediately. It recognizes quantity inputs inside these selectors by default:
quantityInputSelector beside overrides. The selector can target the input itself or a wrapper containing an input[name="quantity"] or select[name="quantity"]:
1.
Available display values
Each display field has a plain-text key and a corresponding HTML key. Use the following keys in any override layer:
When both versions of a field are provided, the HTML version takes precedence. The earlier aliases
optionHtml, perUnitHtml, and savingsHtml remain supported for existing configurations.
Native dropdown options cannot render formatted HTML consistently. For dropdowns, the widget converts optionTextHtml or optionNameHtml to plain text. The same HTML values remain formatted in card, pill, description, price, and savings elements.
The frequency key is metadata used to associate the option with its delivery frequency rather than rendered content, so it accepts a plain string.
Customize only the frequency description
UsefrequencyDescription when you want to replace text such as Billed and delivered every month without replacing the checkout price-per-item description. The following placeholders are available:
Plural cadences include their count, for example
3 months or 3 maanden. Keeping every, elke, or other surrounding grammar outside the billing and delivery placeholders lets you control the complete sentence in each translation.
default override applies to every selling plan that renders a frequency description. You can still place the same field under sellingPlans when only one selling plan needs different wording.
For example, a monthly option keeps its dynamic checkout price and displays:
frequencyDescription: "Billed every {billing_frequency}.". For Dutch storefronts, you can provide a translated override such as frequencyDescription: "Elke {billing_frequency} gefactureerd.".
Use frequencyDescriptionHtml instead when the replacement needs trusted HTML formatting. Placeholder values are escaped before they are inserted into HTML.
This override only applies when the widget has a built-in billing or delivery frequency description to replace. If both description and frequencyDescription resolve for the same option, frequencyDescription takes precedence so the checkout price remains visible.
Add translations
Add atranslations object beside overrides. Each locale accepts the same default, variant, selling plan, quantity, and combination structure:
window.firmhouse.subscriptionOptions.localeShopify.locale- The page’s
<html lang>value - The customer’s browser language
nl-NL storefront uses the base overrides, then nl, then nl-NL. The normal default-to-quantity-combination priority still applies within those translations.
To force a specific locale for testing, add it to the configuration:
Troubleshooting
Overrides do not appear
- Confirm the configuration loads before
subscription-options.js. - Confirm the variant and selling plan IDs are numeric Shopify IDs without the
gid://shopify/...prefix. - Check that the configuration uses
window.firmhouse.subscriptionOptionswith the same capitalization shown in the examples. - Verify that another theme script does not replace
window.firmhouseafter your configuration runs. - If a quantity override does not appear, confirm
quantityInputSelectormatches the product’s visible quantity input or its wrapper.
The correct price appears in the widget but not at checkout
This is expected when the configured display value differs from Shopify. JavaScript overrides do not change checkout pricing. Update the product, selling plan, or discount configuration that controls the actual Shopify price.A translation does not appear
- Inspect
Shopify.localeor the page’s<html lang>value to confirm the active locale. - Use language keys such as
nlfor shared translations and regional keys such asnl-NLonly for regional differences. - Set
window.firmhouse.subscriptionOptions.localetemporarily to test a locale directly.