Skip to content

Install SparkLayer on Shopify

Applies toShopify

Steps for

We can set this up with you

On a paid plan, our team can set up SparkLayer on your store with you in a personalised onboarding session. Click Book setup call on SparkLayer Wholesale,Setup (in your Shopify admin), or book an onboarding call (opens in a new tab), and we'll walk you through it. On any plan, we'll install the widgets on your theme for free. Or follow this guide to do it yourself.

How it works

SparkLayer adds B2B ordering to your existing Shopify store. Your B2B customers sign in, see their B2B prices, place orders and manage their account. Your retail (DTC) customers see your store as it is today.

Getting SparkLayer live on Shopify

Install

Add SparkLayer Wholesale from the Shopify App Store
(this flows forward)

Setup

A price list, a customer group and, with new customer accounts, wholesale ordering
(this flows forward)

Theme setup

Check SparkLayer is on your theme
(this flows forward)

Try it out

Place a test order as a B2B buyer
(this flows forward)

Launch

Start taking B2B orders, then invite your buyers

New to SparkLayer? How SparkLayer works explains the basics, and Storefront covers the B2B interfaces SparkLayer adds.

Before you start

Check you have these in place before you install:

Install the app and connect your store

  1. Open the SparkLayer Wholesale app (opens in a new tab) in the Shopify App Store and install it on your store.
  2. Choose a SparkLayer plan when Shopify asks. You're billed through Shopify, and every paid plan is free for 14 days. See Plans and features.
  3. SparkLayer opens on Setup. It's now a sales channel called SparkLayer Wholesale in your Shopify admin, and it starts syncing your products and customers.

If you created your SparkLayer account first, connect your store from the SparkLayer Dashboard instead. Go to SparkLayer Wholesale,Integrations,Platform (in your Shopify admin), select Shopify and enter your store's address. Then install the app and choose a plan when Shopify asks.

The B2B Ordering app pixel

SparkLayer also adds an app pixel called B2B Ordering to Settings,Customer events (opens in your Shopify admin in a new tab). It tells SparkLayer when a customer completes a card payment in the Shopify checkout, so their cart is cleared. You don't need to do anything with it.

Find your way around the app

In your Shopify admin, click SparkLayer Wholesale under Sales channels to open Home. Each menu item opens an area, with that area's pages as tabs. These are the ones you need to get going:

Menu itemUse it to
HomeSee this week's B2B sales, ask SparkLayer anything and follow the Get your first wholesale order card.
Ask SparkieSet up and change price lists and customer groups by asking. See Ask Sparkie.
SetupWork through the setup steps.
Try it outPlace a test order as a B2B buyer.

The same screens are also in the SparkLayer Dashboard at app.sparklayer.io (opens in a new tab).

Set up your wholesale with Ask Sparkie

The quickest way to set up is to let Ask Sparkie do it.

  1. On Home, click Set up my wholesale under the box at the top.
  2. Answer Ask Sparkie's 3 questions. It prepares a price list and a customer group.
  3. Check them and click Apply both to live. Nothing changes until you do.

Set up your wholesale with Ask Sparkie walks through it step by step. Then carry on with Add your first buyer below.

Work through Setup

Setup is the checklist that gets you selling. Use it to do each step yourself, or to check what Ask Sparkie has done. Go to SparkLayer Wholesale,Setup (in your Shopify admin): it has up to 5 steps in 2 groups, and each step ticks itself off when it's done.

Get started walks through every step. On Shopify, these details also apply.

Set up a price list

An Automatic price list works from your Shopify prices, for example 50% off your Shopify retail price or 40% off your compare-at price. A Manual price list takes exact prices from a CSV file. See Managing pricing.

Assign a price list to a customer group

Each customer group has a Shopify tag, shown under its name, such as b2b-trade. A customer joins the group when their Shopify record has the b2b tag and the group's tag. Customers with only b2b get the Base customer group. See Customer groups.

Enable wholesale ordering

This step only shows if your store uses new customer accounts. It adds the SparkLayer Redirect extension, so B2B customers reach SparkLayer when they sign in. See Set up new customer accounts.

Add your first buyer

This isn't a Setup step. Setup doesn't check for customers, so add your first buyer yourself: create them in your Shopify admin as a new customer with the b2b tag. See Add a new customer from scratch. Before you invite a real customer, test and launch.

Tag existing customers in Shopify

Customers already in Shopify become B2B customers through their tags. Check each one has:

  • The b2b tag on their Shopify customer record.
  • Their group's tag, if they belong to a group other than Base: for example b2b and b2b-vip.
  • No more than 2 B2B tags. b2b with b2b-vip is correct; b2b with b2b-vip and b2b-user is not.
  • At least one complete address on their Shopify record, so they can get through checkout.

To add a tag, open the customer in Shopify and type it in the Tags field. If the tag doesn't exist yet, Shopify creates it. To tag many customers at once, see Add B2B customers on Shopify. Customers that don't sync show in a banner at SparkLayer Wholesale,Companies,Customers (in your Shopify admin): click Show errors to see why.

If you use Shopify's B2B companies, see Shopify Companies for how they work with SparkLayer.

Add SparkLayer to your theme

With your prices and buyers ready, check SparkLayer is on your theme. The SparkLayer frontend is a set of B2B widgets that sit over parts of your Shopify store: the cart and account area, the product page and the product cards on collection pages. They only appear for signed-in B2B customers, so your retail store is untouched.

When you install the app, SparkLayer sets itself up on your theme automatically. The last 2 steps of Setup, Add SparkLayer to your theme and Publish theme, check it for the theme you choose under Select theme. You don't have to edit any theme code yourself. To check each SparkLayer block is on, click Review theme setup on Add SparkLayer to your theme: Theme setup explains every block, and the 3 ways to install SparkLayer on your theme.

Ask our team to install it

If you'd rather not touch your theme, or something doesn't look right, our team installs SparkLayer for you, free of charge, on every plan. Choose Install SparkLayer for me on Theme setup, or click Request installation at SparkLayer Wholesale,Storefront,Widgets (in your Shopify admin). See Ask our team to install it for what happens next and what the installation includes.

Match your store's design

Optionally, style the widgets to match your store: button colours, font sizes, spacing and typefaces. This is a CSS change for you or your developer. Add the CSS snippet from Change your brand colours and fonts to theme.liquid or a separate CSS file. If our team installed SparkLayer, we match your branding for you.

Use the B2B Dawn theme instead

If you'd rather not change your existing theme, our B2B Dawn theme comes with all the SparkLayer widgets installed.

Automatic install on supported themes

SparkLayer works on any Shopify theme. On the themes below, the product detail and product card interfaces are added automatically as app blocks. You don't need the theme code in steps 2 and 3 of Install the widgets yourself.

  • Dawn family: Dawn, Refresh, Sense, Studio, Craft, Taste, Origin, Ride, Colorblock, Crave, Spotlight, Publisher, Trade
  • Horizon family: Horizon
  • Archetype family: Impulse, Expanse, Streamline
  • Other: Savor, Ritual, Vessel, Atelier, Dwell, Pitch, Heritage, Tinker

On these themes, the automatic install also applies a small amount of CSS, so the B2B widgets sit cleanly alongside your theme. If that causes styling conflicts, your developer can turn off the automatic install and add the interfaces by hand.

Install the widgets yourself

This section is for you or your developer, if you want to place the widgets by hand. Step 1 takes a couple of clicks. Steps 2 and 3 can be done with SparkLayer's product blocks in Shopify's theme editor, or as theme code changes. Skip the code on a supported theme, or ask our team and we do it free of charge.

Work on a copy of your theme

Duplicate your live Shopify theme and make the changes on the copy. Choose the copy under Select theme on Setup to check it, then publish it when you're happy with it.

Turn on the SparkLayer app embed

The SparkLayer app embed loads SparkLayer's JavaScript on your storefront, with the cart and account area. On SparkLayer Wholesale,Setup,Theme setup (in your Shopify admin), check it shows Enabled. If it shows Not enabled, click Edit to open your theme editor at the app embed. Turn it on and click Save. On a supported theme, you can click Enable SparkLayer at the top of Theme setup instead.

Add the product detail interface

The product detail interface replaces your product page's buying area with B2B prices and quantity controls when a B2B customer is signed in.

The quickest way is the SparkLayer Product Page block: in Shopify's theme editor, find it in the sidebar, drag it onto your product page near the Add to Cart button and click Save. I'll install SparkLayer myself on Theme setup walks you through this. To add it in theme code instead, add this snippet to the file that controls your product page. That's usually main-product.liquid or product-template.liquid in your theme's /sections/ folder:

<spark-pdp parent-id="{{ product.id }}"></spark-pdp>

If your theme has a {% when 'price' %} block, add the snippet directly beneath it:

{% when 'price' %}<spark-pdp parent-id="{{ product.id }}"></spark-pdp>

If you're adding SparkLayer to your existing retail theme, hide the elements B2B customers shouldn't see, such as retail prices, quantity selectors, product options and buy buttons. To hide an element, add data-spark="b2c-only" to it:

<div data-spark="b2c-only" class="product-meta-reference">

The frontend integration checklist lists every element to hide.

Add the product card interface

The product card interface adds B2B prices and quantity controls to your collection pages, so customers can add items to their order from anywhere in your store.

The quickest way is the SparkLayer Product Card block: in Shopify's theme editor, find it in the sidebar, drag it inside your Product card block and click Save. I'll install SparkLayer myself on Theme setup walks you through this. To add it in theme code instead, find the file that renders product cards on collection pages. That's usually card-product.liquid, product-grid-item.liquid or similar in your theme's /snippets/ folder. Look for the line that renders the product title:

{{ product.title }}

Add this snippet directly below it:

<spark-product-card parent-id="{{ product.id }}"></spark-product-card>

Depending on your theme, product.id may need to be card_product.id or similar: check how your theme names the variable. As with the product page, hide any retail elements with data-spark="b2c-only".

When the widgets are in place, use Try it out to check your product pages and collection pages as a B2B customer. Your developer can use the frontend integration checklist to check everything is configured correctly.

Turn off the automatic install

This is for developers. Turn off the automatic install to control exactly where the interfaces appear on a supported theme, or to avoid the automatic styling. Add this to your theme's theme.liquid file, just before the closing </head> tag:

<script>
  window.sparkShopify = {
    options: {
      disableAutoInstall: true
    }
  };
</script>

Then follow steps 2 and 3 of Install the widgets yourself to add the interfaces where you want them. With the automatic install off, the app embed's styling settings only apply when your code calls them: see If the automatic install is off.

Choose your customer accounts version

B2B customers sign in to your store with a Shopify customer account, so customer accounts must be turned on. Shopify offers 2 versions:

VersionAdvantagesDisadvantages
LegacyA smoother customer experience. No extra setup.Functionality is specific to your Shopify store. Not fully supported by Shopify.
Customer accounts (new)Works on all Shopify stores. Actively maintained by Shopify.Limited customisation (for example, you can't change the look and feel). Customers sign in with a 6-digit code rather than a password.

To check or change your version:

  1. In your Shopify admin, go to Settings,Customer accounts (opens in your Shopify admin in a new tab).
  2. Make sure Show login links is on, so the sign-in link shows in your store's header and at checkout.
  3. Under Choose which version of customer accounts to link to, select Customer accounts or Legacy, then save.

If you use Legacy accounts, there's nothing more to do. If you use new customer accounts, follow Set up new customer accounts below.

With new customer accounts, anyone can sign in with an emailed code and get a Shopify customer account, without applying. On a wholesale-only store, see Wholesale-only stores for how to handle them.

Set up new customer accounts

New customer accounts need 2 changes. Make both: without the second, some customers get stuck in a sign-in loop.

Add the SparkLayer Redirect extension

When a B2B customer opens Shopify's customer account area, this extension sends them back to your online store, where they can use SparkLayer.

  1. On SparkLayer Wholesale,Setup (in your Shopify admin), click Enable wholesale ordering, or click Edit beside B2B account redirect on SparkLayer Wholesale,Setup,Theme setup (in your Shopify admin). Shopify's checkout and accounts editor opens at the Orders page.
  2. Find SparkLayer Redirect in the sidebar.
  3. Click the + icon and add it to Orders.
  4. Optionally, fill in the extension's settings:
    • Redirect Notice (Optional): a message shown before the customer is redirected. If you leave it blank, customers see "Please note, you are being redirected to our website to begin your B2B ordering."
    • Redirect Path (Optional): where to send the customer, for example /collections/all. If you leave it blank, they go to your homepage.
  5. Click Save and return to Setup.

You only need to do this once. It applies to every page in the Shopify customer account area. Theme setup lists the redirect as B2B account redirect, so you can check it's on there.

If your Shopify plan doesn't include the checkout and accounts editor, Setup shows Customer account redirect unavailable, and wholesale customers see Shopify's default account page after signing in.

Update your theme's sign-in links (for your developer)

With a small theme code change, customers return to your store, and the page they were on, after signing in. Without it, some customers are sent back to your store still signed out, again and again. A theme update or redesign can replace these links, so check them again after any theme change. If you don't edit theme code yourself, pass the detail below to your developer or contact our support team and we'll make the change.

Theme code for your developer

Shopify's technical guide to customer account links (opens in a new tab) explains the routes used here.

  1. In your theme code, find the Liquid code for the account link: usually the person icon in your store's header.
  2. Update the link destination as in the sample below.
{%- if shop.customer_accounts_enabled -%}
  <a href="{%- if customer -%}{{ routes.account_url }}{%- else -%}{{ routes.storefront_login_url }}{%- endif -%}"
    class="icon"
    rel="nofollow">
  </a>
{%- endif -%}

You can use the same route on any link in your store:

<a href="{%- if customer -%}{{ routes.account_url }}{%- else -%}/customer_authentication/login?return_to={{ request.path | append: "#spark-account" | url_encode }}{%- endif -%}">
Login
</a>

If you need help with either step, contact our support team.

Try it out as a buyer

Before you invite anyone, see SparkLayer the way your buyers will.

  1. When your setup is done, go to SparkLayer Wholesale,Try it out (in your Shopify admin) and choose the theme.
  2. Work through Test as a B2B customer, Assign a price list and Place a test order.

Enter an email you can sign in to, and SparkLayer uses that B2B customer or creates one with the b2b tag. You then sign in to your store as them, and the test order doesn't count towards your plan. See Try it out.

Test and launch

When Setup shows Setup is done and your test order looks right, work through the launch checklist. It covers the remaining checks, such as products in the SparkLayer Wholesale sales channel, and inviting your buyers.

To go live, click Start taking B2B orders on the app's Home. Do this before you invite anyone: until you do, your store is in preview mode and B2B orders aren't fulfilled. See Turn off preview mode.

Troubleshooting

For other problems, such as pricing, see Troubleshooting, or contact our support team.

Once SparkLayer is live, optional extras improve the B2B experience, such as a B2B login and registration page, B2B-only products, pack sizes and B2B shipping. See Turn on extra B2B features and Shopify customisations. For every storefront option, see Storefront.

Answers to common questions about plans, setup, payments, products and orders are in Shopify FAQs.

Was this page helpful?

Last updated