Home
Build your offer

Advanced settings

Configure cart properties, purchase option mode, custom CSS/JS, and developer settings for a preorder offer.

Use this guide if you want to add custom cart properties, switch how the offer handles the Shopify purchase option, inject custom CSS or JavaScript, override storefront button and modal text, or pin preorder widget elements to custom CSS selectors. The Advanced section of the offer editor collects these power-user and developer settings; most merchants won't need to change them. Some of them (cart properties, CSS/JS, text overrides) show up for customers, others are internal configuration only.

Before you begin

You need an existing preorder offer to reach the Advanced section. If you haven't created one yet, see Set up preorders.

Choose your setup

The Purchase option setting controls whether STOQ attaches a Shopify selling plan (purchase option) to preorder line items, or manages the preorder entirely through the storefront widget without one. Decide this before you configure payment and fulfillment, switching later resets both.

OptionWhen to use
Use Shopify purchase option (Recommended)Supports partial payments, fulfillments, and discounts. Shopify checkout shows the preorder selling plan to customers. Gift cards, store credits, and buy X get Y discounts are not supported
Use without purchase optionBetter compatibility with gift cards, store credits, buy X get Y, managed markets, and split orders. Partial payments and payment-specific discounts are not supported in this mode

Switching from Use Shopify purchase option to Use without purchase option resets the offer's payment setting to full payment with no discount, and its fulfillment status to Unfulfilled. The Scheduled and On hold fulfillment statuses require the purchase option and are unavailable without it. Disabling the purchase option doesn't delete the existing Shopify selling plan group, it stops STOQ from syncing to it.

What customers will see

When STOQ writes properties to a cart line item, it marks some as hidden by prefixing the key with an underscore (_). Shopify hides these from customers in the storefront cart and checkout; they're only visible to you in Shopify admin and in STOQ's order views.

Property typeKey formatWhere it appears
VisibleNo leading underscore, e.g. Preorder, Payment, Shipping: ships Dec 25Storefront cart drawer and checkout order summary
HiddenUnderscore-prefixed, e.g. STOQ's internal tracking propertiesShopify admin order detail and STOQ's internal tools only

The fulfillment timeline property (from Show fulfillment timeline in cart) and the payment breakdown property (from Show payment details & savings in cart) are visible by default. Your custom cart attribute follows whatever key you type; start it with an underscore to hide it from customers. The offer editor's cart preview reflects this: visible properties show inline on the line item, hidden ones show in a separate "Visible in admin" panel.

A few other Advanced settings reach the storefront too: with Use Shopify purchase option turned on, customers see the preorder selling plan at checkout, and any CSS, JavaScript, or text overrides you set (Out of stock text, Add to cart text, Continue/Cancel button text) apply on the product page as soon as you save and refresh.

Set it up

1

Open the offer editor

  1. In the left menu bar of the STOQ app, click Preorders.
  2. Click the Offers tab.
  3. Click the offer you want to edit to open its Overview tab (this shows the Customize button, a live preview, and the offer's Products section).
  4. Click Customize to open the offer editor.
2

Open Advanced

In the editor's settings list, click More settings to expand it, then click Advanced (gear icon). More settings is collapsed by default, so Advanced isn't visible until you expand it. The panel opens with four subsections: Cart, Purchase option, Currency & custom styles, and Developer settings.

Cart

Three checkboxes control what STOQ writes to each order line item in the cart:

SettingWhat it does
Show payment details & savings in cartAdds a cart property showing the payment breakdown and any discount amount for this offer
Show fulfillment timeline in cartAdds a cart property with the fulfillment timeline. Disabled automatically when Show shipping timeline is turned off in the Widget section, you must re-enable that setting first
Add custom cart attributeWrites a freeform key:value property to the cart line item. When enabled, a text field appears

When Add custom cart attribute is checked, enter your custom text using the placeholder format key: value. The default placeholder is:

{{ name }}: Save {{ discount }}, ships on {{ date }}

Click available variables to open a modal listing every variable you can embed:

VariableValue
{{ name }}The offer name (e.g. Preorder)
{{ date }}Full fulfillment date or message (e.g. Dec 25, 2024 or Shipping: As soon as possible)
{{ month_year }}Month and year only (e.g. Dec 2024)
{{ year }}Year only (e.g. 2024)
{{ days }}Number of days after checkout (e.g. 7, 14, 30)
{{ disclaimer }}The disclaimer text set on this offer
{{ payment }}Payment amount or percentage, if applicable (e.g. $25.00 or 10%)
{{ remaining }}Remaining amount of payment, if applicable (e.g. $25.00)
{{ discount }}Discount amount or percentage, if applicable (e.g. $5.00 or 10%)

Click Add to field next to any variable in the modal to append it to your custom attribute text. This custom cart attribute text is translated per language when multi-language is enabled on your store.

Purchase option

Select Use Shopify purchase option or Use without purchase option; see Choose your setup above for which to pick.

Warning

Switching from Use Shopify purchase option to Use without purchase option shows a confirmation dialog and immediately resets the offer's payment and fulfillment settings (see Choose your setup above). Confirm you're ready before switching.

Currency and custom styles

Enter any valid CSS to override the default preorder widget styles. The STOQ preorder button element uses the class .restock-rocket-preorder-button. Changes take effect after you save and refresh your storefront. For the full list of class names you can target, see Customize preorder elements with CSS.

.restock-rocket-preorder-button { ... }
Note

The CSS field is stored on your shop settings, not the individual offer. Any CSS you enter here applies to the preorder widget across all offers on your store.

Enter JavaScript that runs on the storefront. Use the restock-rocket:loaded event to hook in after the preorder widget initialises:

document.addEventListener('restock-rocket:loaded', function() { ... })

Like the CSS field, this JavaScript field is stored on your shop settings and runs on every product page with a preorder widget, not just the offer you're currently editing.

Click Show more to reveal five additional text override fields. These are shop-wide defaults; they apply whenever the preorder widget is in the corresponding state.

FieldDefaultWhat it affects
Currency format{{amount}} {{currency}}How prices are displayed in the preorder widget. Supports {{currency}}, {{currency_symbol}}, and Shopify amount variables (link in the help text)
Out of stock textOut of stockText shown on the button when the preorder limit is reached and the product becomes sold out
Add to cart textAdd to cartText on the button when the product is in stock and not in a preorder state
Continue button textContinueText on the Continue button inside the preorder confirmation modal
Cancel button textCancelText on the Cancel button inside the preorder confirmation modal

These fields are translatable when multi-language is enabled. To override button text for a single offer instead, use the per-offer Button text field in the Widget section.

Developer settings

Turn on Dev mode to access a set of advanced CSS selector fields that control exactly where STOQ inserts preorder widget elements on product pages. By default, STOQ locates the Add to cart button automatically; use Dev mode only if your theme's markup doesn't match the defaults and preorder elements are appearing in the wrong place.

When Dev mode is enabled, the following product page selectors appear inside a highlighted panel:

Selector fieldPurposeExample default
Form sectionThe <form> element containing the Add to cart buttonform[action='/cart/add']
'Add to cart' buttonThe button element inside the form that STOQ replaces with the Preorder buttonbutton[type='submit']
'Add to cart' text selectorThe child element that holds the button label textspan
Disclaimer positionWhere to insert the preorder disclaimer text relative to a target elementNone
Payment options positionWhere to insert the payment options block, if enabledNone
Terms positionWhere to insert the terms checkbox, if enabledNone
Badge positionWhere to insert the preorder badge, if enabled.product-title
Countdown timer positionWhere to insert the countdown timer. Leave blank for the default position above the buttonNone
Progress bar positionWhere to insert the inventory progress bar. Leave blank for default position above the buttonNone
Discounted price positionWhere to insert the discounted price element, if enabled.price__container
Original price sectionThe element containing the original product price.price-regular

Each position selector pairs with an Insertion type dropdown:

ValueMeaning
beforebeginBefore the target element (as a preceding sibling)
afterbeginAs the first child inside the target element
beforeendAs the last child inside the target element
afterendAfter the target element (as a following sibling)

These selectors apply to all product pages for this shop. For collection, search, and other non-product pages, go to Preorders in the left menu, then the Settings tab, then the Pages sub-tab, and click Customize instead.

Check your setup

After saving, open your storefront product page and add a preorder item to the cart:

  • If you enabled Show payment details & savings in cart or Show fulfillment timeline in cart, verify those values appear on the cart line item in the drawer and on the checkout cart page.
  • If you added a custom cart attribute, confirm the key:value text shows in the cart attributes section of the order in Shopify admin after placing a test order.
  • For CSS or JS changes, do a hard refresh on the storefront to clear any cached scripts.
  • For Dev mode selector changes, confirm the button, disclaimer, badge, and other elements render in the intended locations.

Troubleshooting

Show fulfillment timeline in cart is greyed out

Turn on Show shipping timeline in the offer's Widget section first, then return to Advanced to enable it.

Your preorder button, badge, or other element is appearing in the wrong place on the product page

Turn on Dev mode under Developer settings and set the Form section and 'Add to cart' button selectors to match your theme's markup, using your browser's developer tools to find the right selectors.

Your CSS or JavaScript changes aren't showing up on the storefront

Hard refresh the page to clear cached scripts. The offer editor preview doesn't reflect CSS or JavaScript changes, only the live storefront does.

Scheduled or On hold fulfillment status is unavailable

The offer is in Use without purchase option mode. Those statuses require the Shopify purchase option; switch back under Purchase option if you need them.

A custom cart attribute isn't visible to customers

Check whether its key starts with an underscore (_). Shopify hides underscore-prefixed properties from the storefront cart and checkout; remove the underscore to make it customer-visible.

Limitations

  • The CSS, JavaScript, and text override fields (Currency format, Out of stock text, Add to cart text, Continue button text, Cancel button text) are stored on your shop settings, not the individual offer, so they apply across every preorder offer on your store. Use the per-offer Button text field in the Widget section if you need different button text for one offer.
  • Dev mode selector overrides apply to all product pages for this shop. For collection, search, and other non-product pages, use the Pages sub-tab under Preorders → Settings instead, then click Customize.

FAQ

Does adding a cart attribute notify the customer or charge them anything?

No. Cart attributes (line item properties) are data tags written to the order line. They appear in the cart and in Shopify admin but don't trigger any notification, email, or extra charge on their own.

Does switching to 'Use without purchase option' affect orders I've already placed?

No, only the offer's current payment and fulfillment settings. Existing orders keep the terms they were created with; you'll need to reconfigure payment and fulfillment on the offer going forward. See Choose your setup above.

How do I hide a custom cart attribute from customers?

Start its key with an underscore, for example _Internal note: .... Shopify hides any line item property whose key starts with _ from the storefront cart and checkout; it still appears in the Shopify admin order detail and STOQ's internal tools.

Can I set different button or out-of-stock text for different offers?

Not from Advanced, its Add to cart text, Out of stock text, and modal button fields are shop-wide defaults. For a single offer, use the per-offer Button text field in the Widget section instead.