Skip to content

Storefront options

Steps for

How it works

Storefront options are settings that used to need code in the Core Script. On the Options page, you change them on screen and publish them in one step. Only signed-in B2B customers see the result.

From change to live store

Change settings

Open a section of the Options page and change what you need
(this flows forward)

Save and publish

One button saves your changes and makes them live
(this flows forward)

Buyers see it

Signed-in B2B customers see the change on their next page load

The Publishing card at the top of the page shows the status:

StatusWhat it means
PublishedYour storefront uses these options. Changes go live when you publish.
Not publishedNothing has been published yet, so buyers see SparkLayer's defaults.

As a rule, Settings,Configurations (opens in your SparkLayer Dashboard in a new tab) turns features on and off, and the Options page sets how they look and behave on your storefront.

A few settings are on both screens, and carry an Also in Configurations badge here. They're the same setting in 2 places: change it on either screen and the other one follows.

On the Options pageAt Settings,Configurations (opens in your SparkLayer Dashboard in a new tab)
Checkout > Hide AI features in the cartPricing and cart > Hide AI features in the cart
My Account > Show payment statusOrdering > Payments visibility
My Account > Timeline and communicationsQuotes and invoices > Timeline and communications
Pricing and display > Tiered pricing across variantsPricing and cart > Tiered pricing across variants

Change a setting and publish it

Every change follows the same 3 steps:

  1. Go to Storefront,Options (opens in your SparkLayer Dashboard in a new tab).
  2. Click a section to open it, and change the settings you need. See the settings reference.
  3. Click Save and publish.

There's no separate draft: saving and publishing is one step.

Copy or import your options as a snippet

Every option on this page is also a Core Script setting, in the window.sparkOptions code your developer uses. Use these buttons to move settings between the two, for example to back up your settings or hand them to a developer:

ButtonWhat it does
Copy snippetCopies your options as a window.sparkOptions snippet. Use it to keep a copy before a big change, or to send your settings to a developer.
Import snippetLoads the values from a window.sparkOptions snippet you paste into the page. Click Save and publish to make them live.

Add a Core Script setting

Some pages show code labelled Core Script. Each is a setting for the Core Script, the SparkLayer code in your theme, and is usually a job for your developer.

  1. Open your theme's code. On Shopify, that's theme.liquid.
  2. Find the window.sparkOptions block, just before the closing </head> tag. If there isn't one, add it.
  3. Paste the setting inside the curly brackets, after any settings already there, and end it with a comma.
  4. Save, and check the change on your store while signed in as a B2B customer.

For example, with two settings:

theme.liquid
<script>
  window.sparkOptions = {
    language: "en",
    display: {
      hideFinancials: true,
    },
  };
</script>

If you already have a setting, such as translations or display, add the new lines inside it rather than adding it twice. For more, see Modifying the Core Script in the developer docs.

Settings reference

The Options page has 6 sections. Click one to open it. Switches marked "(on)" below are on by default.

Checkout

What buyers fill in and choose at checkout: fields, payment methods and cart behaviour.

SettingWhat it does
Checkout fieldsThe extra fields customers fill in at checkout, such as a PO number or delivery notes. Click Add field to add one. See Checkout fields.
Payment methods, in orderDrag Payment on account, Payment by invoice, Upfront payment and Quote to set the order buyers see them in at checkout. Which methods each customer can use is set by their customer group, where the names differ: see The same method in each place.
Save addresses to the address book (on)A new address entered at checkout is saved to the buyer's address book by default.
Hide AI features in the cartHides the Intelligent Cart features in the SparkLayer cart. Also in Configurations.

Standard checkout fields need Core Script version 4.7.0 or later. Custom fields work on any version. Check your version at Storefront,Widgets,Core script version (opens in your SparkLayer Dashboard in a new tab).

My Account

What buyers see and do in their My Account area.

SettingWhat it does
Hide financial figuresHides financial figures from buyers. It also hides the Financials section of My Account.
Show shipping address in the order listShows each order's shipping address beside it in the order list.
Show payment statusShows the payment status of orders in My Account. Also in Configurations, where it's called Payments visibility.
Timeline and communicationsBuyers and sales agents can send messages on quotes and orders. Also in Configurations. See Order timeline and messages.
Favourites lists (on)Buyers can save products to a favourites list. See Favourites.
Shopping lists (on)Buyers can save reusable shopping lists. See Shopping lists.
Account sections, in orderDrag the sections to set the order they appear in: Recent activity, Favourites, Shopping lists, Financials, My details, Reports, Address book and Company users. Each one shows whether buyers can see it.

Pricing and display

How buyers see prices, savings and the product interfaces.

SettingWhat it does
Base savings on RRPShows savings against the RRP, rather than the buyer's own price.
RRP toggleBuyers can switch between seeing the RRP and their own prices. See How prices are shown.
Savings on price breaks (on)Shows the amount saved next to each quantity price break.
Round price break percentages (on)Shows price break percentages as whole numbers.
Tiered pricing across variants (on)Quantity tiers count every variant of a product together. Also in Configurations. See Quantity pricing.
Dark themeShows SparkLayer's interfaces in the dark colour scheme, for stores with a dark theme. See dark mode.

Translation overrides

Translation overrides change the text buyers see in SparkLayer, such as a button label or a heading, for each language. Each piece of text has a name, called a key, such as cart.checkout.notes.label for the label of the order notes field.

Until you add one, the section shows "No overrides. SparkLayer's own text is used."

  1. Click Add override, choose the language and the key, and enter your own text.
  2. Click Save and publish.

Translation overrides replace the translations setting in the Core Script. See Languages and international for how to find a key, the supported languages and the keys with variables.

Custom slots

Custom slots let you show buyers your own content in set places in SparkLayer's interfaces, such as a message in the cart. Click Add slot to add one. These are the slots you can use:

SlotSlot ID
My Accountspark-slot-my-account
My Cartspark-slot-my-cart
Cart line itemspark-slot-my-cart-line-item
Order completespark-slot-order-complete
Cart shipping stepspark-slot-cart-shipping-step
Cart payment stepspark-slot-cart-payment-step
Purchase summary headerspark-slot-purchase-summary-header
Purchase summary footerspark-slot-purchase-summary-footer

To add your content to these places, see Custom slots (targets).

Analytics

Analytics sends SparkLayer storefront events, such as items added to the cart, to your analytics tools. Click Add provider to connect one.

FAQs

Was this page helpful?

Last updated