Integrations
WooCommerce
Installing SparkLayer on WooCommerce
introduction sparklayer enables b2b functionality on your existing woocommerce store, allowing your b2b customers to login, place orders, manage their account, and much more to familiarise yourself with sparklayer, we also recommend reviewing the following guides how sparklayer works docid 2g8hwcxnn7ofy4o199y1 the fundamentals of what sparklayer does frontend docid\ ogkfvqx13dhw2582d57kj the special "interfaces" sparklayer enables features docid\ sszdkxunmleidooithqcu the available features and functions ⚠️ requirements important! before installing sparklayer on your woocommerce store, please ensure the following item details woocommerce you must already have woocommerce installed on your wordpress website woocommerce version 9 and above wordpress version 6 and above if you're using a "block theme", sparklayer can be automatically installed (otherwise this is a manual installation process) product skus in order for sparklayer to save b2b prices for your products, all products must have skus customers for your b2b customers to see the sparklayer frontend interfaces docid\ ccz1vnh0o6d 722w35xpa , they must be assigned an appropriate b2b "role" within wordpress > users payment processor if you’re installing sparklayer on a test store, please ensure you have an example payment method enabled you can manage this within woocommerce > settings > payments shipping in order to place an order via the my cart interface docid\ efevur a3ycjxuhvrr7t , please ensure you have shipping rules set up you can manage this within woocommerce under settings > shipping or via sparklayer's own shipping docid\ cfz zpgw2umovao73lc5m solution areas of wordpress/woocommerce you'll be using as part of setting up sparklayer, you'll primarily be using the following areas area details products this will be used to setup which products you want to make available to b2b customers see "setting up your b2b pricing" below in wordpress/woocommerce, go to products in wordpress/woocommerce, go to products users this will be used to setup your b2b customers see "setting up your b2b customers" below i n n wordpress/woocommerce wordpress/woocommerce , go to users , go to users orders this will be used to review and process and orders that are placed by your b2b customers see "placing a b2b order" below in wordpress/woocommerce, go to orders in wordpress/woocommerce, go to orders 🚢 the onboarding process important when setting up sparklayer, some activities take place via the sparklayer dashboard alongside woocommerce you'll use the sparklayer dashboard primarily for setting up your b2b pricing and b2b customer rules when you create an account on sparklayer, you'll get access to the sparklayer dashboard the dashboard has a customised onboarding process that gently guides you through all the necessary steps before you're ready to start inviting your b2b customers and taking orders on your website 🔗 connecting your woocommerce store this enables sparklayer to connect to your woocommerce store and begin synchronising the information it requires ➡️ view in dashboard 📓 setting up your b2b price lists you'll then set up the b2b price lists that you want your customers to see when they login these can be automated or you can manually upload specific pricing ➡️ view in dashboard 👪 setting up your b2b customers you'll then set the ordering rules for your customers such as minimum order values, available payment methods and price lists they are assigned to ➡️ view in dashboard 🛠️ installing the frontend widgets you'll need to check the special code snippets ("widgets") are installed on your woocommerce store in order to show the special sparklayer b2b interfaces ➡️ view in dashboard ✅ testing & launching you'll then need to run through some final checks (such as placing a test order) once you're happy, you can then launch sparklayer and start taking orders! ➡️ view in dashboard let's now dive into each of them! 🔗 connecting your woocommerce store please note setting up sparklayer will require generating api keys within your woocommerce store if you're unsure how to do this, our team is happy to assist to get started with sparklayer on your woocommerce store, there are a number of steps to follow once you've completed this step, you can then begin the process of configuring sparklayer such as pricing and customer rules register with sparklayer first, you'll need to create a sparklayer account by registering here connect your woocommerce store once registered, go to settings > integrations and select woocommerce you'll then be prompted to enter your store url (this should be the url of the website you are installing sparklayer on, e g www mystore com ) generate api credentials next, you'll need to generate rest api credentials within woocommerce from your wordpress dashboard, you can find this within woocommerce > settings > advanced > rest api create the rest api key with a username easily identifiable as linked to sparklayer, such as “sparklayer api” with read/write permissions enter the api credentials in sparklayer from with the sparklayer dashboard settings > integrations, paste the provided key and secret into the “woocommerce api key” and “woocommerce api secret” fields press save and wait a few seconds whilst sparklayer connects to the woocommerce store and performs the sparklayer plugin initialisation store connected this completes the process of connecting your woocommerce store to sparklayer! you can view all associated settings in woocommerce by going to woocommerce > settings > integrations > sparklayer b2b 📓 setting up your b2b pricing please note setting up your b2b pricing happens within the sparklayer dashboard , not via your woocommerce admin within the price lists area of the sparklayer dashboard, you can create and manage your b2b pricing rules sparklayer allows you to set the following pricing types type details manual you can manually upload a csv file with specific prices and even enable quantity pricing automatic you can use your woocommerce prices and apply a discount you can choose from your main woocommerce price or the rrp price for any products that you want your b2b customers to be able to buy, these products must have unique skus assigned in woocommerce, you can check this by going to products and editing a product if it's a single variant product, you'll see this under product data > inventory if the product has variants (or "variations"), you'll see this under product data > variations next, go to price lists within sparklayer and click "create price list" to create your first b2b price list you can choose between an automatic or manual price list and configure how this works ready to set your pricing? to learn more about pricing, please see our price lists docid\ s8xcbzgxqpgdeigwtxset 👪 setting up your b2b customers please note setting up your b2b customer rules happens within the sparklayer dashboard , not via your woocommerce admin customer groups let you configure specific rules for your customers, from defining their minimum order values and which price lists they see, through to what payment methods they're allowed to use when checking out much like with price lists, you can fully manage this via the sparklayer dashboard within wordpress/woocommerce, go to users and click add user you can either create a new customer or edit an existing one please note please ensure that a valid address is added and all address fields are populated make a note of the email address you’ve added as you will need to access this to login to synchronise to sparklayer, under sparklayer role , the customer must be assigned to a role that correlates to a sparklayer group for example, if you're using the "base" group in sparklayer, you'll see a role called "sparklayer b2b base" once the customer signs in, they'll see the b2b rules you've configured within the customer group please note the following on customer groups sparklayer will only synchronise customers that have a role assigned that starts with sparklayer b2b once your customers have been set up in wordpress/woocommerce (i e those with a role of "sparklayer b2b" assigned ), and you've assigned the customer group to at least one customer, you can then manage specific rules within the customer groups area you'll see a default base customer group that you can use for your b2b customers if you want to set up additional rules, you can simply click create customer group and configure accordingly for any additional customer groups you create, you'll need to update the role on the customer record in wordpress/woocommerce to match to simulate logging in as a b2b customer, please see ✅ testing & launching below you can also check if your customer record is syncing by using the customer sync area of sparklayer within wordpress/woocommerce, navigate to a contact record that has a label of b2b within the url, you'll see a unique id at the end of the url, e g ?user id=3 with this unique id, you can then paste this into the customer sync area of sparklayer if the search results show the customer details, this confirms the customer is synchronising correctly ready to configure your customer groups? to learn more about customer groups, please see our customer groups docid 5 lwmnohhjbjjppg9e6vh 🛠️ installing the frontend widgets sparklayer comes with ready made b2b optimised "widgets" that we collectively call the sparklayer frontend docid\ ogkfvqx13dhw2582d57kj the widgets simply overlay sections of your existing woocommerce store and enable our powerful b2b features once set up, your approved b2b customers (see above "setting up your b2b customers") will then see your b2b pricing and can begin placing orders you can learn more about how this works in frontend interfaces docid\ ccz1vnh0o6d 722w35xpa auto installation with "theme blocks" if your theme support blocks, when you install sparklayer, it will by default add the special frontend widgets to your woocommerce store depending on your woocommerce theme, you may prefer to do this manually and you can follow our steps below installing sparklayer yourself if you’re looking to install yourself, there are five steps to follow install the sparklayer core script within your main website header you'll need to add the sparklayer core script that activates the sparklayer functionality providing your stores theme outputs the wp head() functional call in the \<head> section of the template, then the sparklayer core script should automatically be injected on your page install the product detail interface you'll need to update your storefront's product detail page with the sparklayer product purchasing interface when a customer logs in and sparklayer recognises them as being a b2b customer, this will load a special interface with their specific prices and a way to purchase 🛠️ view instructions \<spark pdp parent id="\<?php echo absint( $product >get id() ); ?>">\</spark pdp> to get started, add the code snippet above to your product detail pages once this is added, the interface will display for all logged in b2b customers and they can begin placing orders important! if you're using sparklayer on your existing website, you will need to hide elements that you don't want your b2b customers to see to do this, you can hide elements by adding data spark="b2c only" to any element in the code you will need to do this for any code that renders a price, quantity selection, product options, buy now buttons, and anything else you want to hide from your b2b customers please see our frontend integration guide docid\ qwxsym9x5 pviogutekcp for more details install the product card interface you'll need to update your product collection pages to show the product card interface this allows your customers to see their unique pricing and add items to their order from anywhere on your website 🛠️ view instructions \<spark product card parent id="\<?php echo absint( $product >get id() ); ?>">\</spark product card> to get started, add the code snippet above to the file that renders products on your collection pages once this is added, the interface will display for all logged in b2b customers and they can begin placing orders important! if you're using sparklayer on your existing website, you will need to hide elements that you don't want your b2b customers to see to do this, you can hide elements by adding data spark="b2c only" to any element in the code you will need to do this for any code that renders a price, quantity selection, product options, buy now buttons, and anything else you want to hide from your b2b customers please see our frontend integration guide docid\ qwxsym9x5 pviogutekcp for more details add the css customisations within your css file, you can customise the look and feel of sparklayer by editing special css controls that overwrite the sparklayer defaults for example, you can change button colours, font sizes, spacing, even typefaces 🛠️ view instructions the customisations work by adding a special snippet of css to the source code of your website to get, you can add the sample css code available in the sparklayer dashboard once added, these then overwrite the "default" styling for sparklayer to match your website's look and feel frontend integration guide docid\ qwxsym9x5 pviogutekcp finished adding the code widgets? please review our frontend integration guide docid\ qwxsym9x5 pviogutekcp you can also explore all the configurations and customisations we have available that you may want to activate on your shopify store! configurations docid\ sbeaoacq a7ffbtatx8bd 🛒 placing a b2b order once you've logged into your woocommerce store as a b2b customer, you can then place an order by going to any product page and adding items to your order when you add items, they will then appear in the my cart interface docid\ efevur a3ycjxuhvrr7t and you can then proceed to checkout to complete the order how payment methods work when customers reach the payment step, they'll see a variety of available payment methods and can select their preference payment method description payment on account 👪 for the b2b customer this will allow the customer to checkout without needing to enter any payment details payment by invoice 👪 for the b2b customer this will allow the customer to checkout without having to enter in payment details pay online by card 👪 for the b2b customer the customer will be directed to your standard checkout process and will be required to make payment right away (e g by card or via another payment processor) how orders arrive into woocommerce depending on which payment methods docid\ ibikczvhm085bkejiffyv you've selected, orders will arrive into woocommerce in the following ways payment method flow pay by invoice the order will be created within woocommerce > orders with a payment status of "pending payment" you can then manually mark the order as paid once you have received payment (e g via offline means) pay on account the order will be created within woocommerce > orders with a payment status of "pending payment" you can then manually mark the order as paid once you have received payment (e g via offline means) pay online by card the order will be created within woocommerce > orders with a payment status of "completed" providing you have this already configured within woocommerce you can then proceed to fulfil the order note this is termed "upfront payment" within the customer groups docid 5 lwmnohhjbjjppg9e6vh area of the sparklayer dashboard "unpaid" orders and "paid" orders by default all payment methods other than upfront payment will be generated as "pending payment" orders you will need to capture payment either via your woocommerce admin or via offline methods (e g bank transfer) woocommerce checkout payment methods if a customer selects "pay online by card" (i e "upfront payment"), they'll be directed to the woocommerce checkout by default, they will see all woocommerce payment methods you have set up (e g card payment, paypal, etc) additional order details when an order is placed via sparklayer, it will also include the following additional data attribute notes custom fields when viewing an order in woocommerce, you'll see a section "sparklayer order information" which will include the payment method used ✅ testing & launching the final step is to run some tests and checks to ensure sparklayer is fully configured within the sparklayer dashboard, you'll see a number of launch checks to perform, from logging in as a b2b customer, through to placing an order we recommend following the below steps set up a customer record within your wordpress/woocommerce admin, you'll need to ensure you have an example customer record set up (either a new one or an existing) most importantly, a customer must be associated with an appropriate role please see "setting up your b2b customers" above for more details on how this works place a test order once you've logged in as a b2b customer, proceed to add items to your cart and complete the checkout please see "placing a b2b order" above for more details on how this works invite your customers you could also think about sending a marketing newsletter to your customers to notify them of your new b2b store and to sign in we also have some example messaging you can use when inviting your customers and you can explore more in launching sparklayer docid\ yufghegoxe h7ujfcshna ⚙️ advanced configurations in addition to the above setup, there are a number of other configurations that are possible at this time displaying stock (inventory) levels you can configure sparklayer to show stock display docid\ gj ao gq6oa jx0d27hys in a variety of ways if you want to show inventory numbers (e g 100), you'll need to make sure this is turned on within woocommerce within woocommerce, go to settings > products > inventory and turn on manage stock you can also display this on the sparklayer widgets (the product cards) by going to woocommerce > settings > integrations > sparklayer b2b adjusting tax settings sparklayer supports tax calculations and simply 'inherits' the rules you've set up in your woocommerce settings you can learn more about how tax works in this woocommerce guide enabling sparklayer javascript modifications (e g checkout customer fields, language updates) sparklayer supports a range of advanced configurations that rely on updating javascript via "spark options" within our configurations docid\ sbeaoacq a7ffbtatx8bd , you can apply any of the modifications by updating the code within your woocommerce theme store you can access this by going to woocommerce > settings > integrations > sparklayer b2b under "core script options" you can add the below code { termsandconditionslink "/policies/terms of service", checkoutcustomelements \[ { name 'shipping date', translations { en { title 'preferred shipping date', detail 'shipping unavailable on weekends ', }, }, attributes { required true, type 'date', }, }, ], } enabling a url redirect when signing in sparklayer supports a range of advanced configurations that rely on updating javascript via "spark options" within our configurations docid\ sbeaoacq a7ffbtatx8bd , you can apply any of the modifications by updating the code within your wix store you can access this by going to woocommerce > settings > integrations > sparklayer b2b under "core script options" you can add the below code { accountredirect { urlregex /\\/account/g, goto "/index", // page to redirect logged in users to }, } enabling "dark mode" for high contract websites if your wix store is set up with a darker theme, it's possible to enable a special "dark mode" for sparklayer, ensuring colours and fonts are easily readable you can access this by going to woocommerce > settings > integrations > sparklayer b2b under "core script options" you can add the below code { display { darktheme true, }, } enabling sparklayer shipping methods sparklayer has a built in shipping docid\ cfz zpgw2umovao73lc5m system that lets you customise how shipping works for your b2b customers by default, your existing shipping methods in your woocommerce dashboard will be used, however it's possible to update this to use sparklayer via the sparklayer dashboard here enabling pre order (or "back orders") sparklayer has built in support for pre orders (someimtes referred to as "back orders") once enabled, this will then show a message to the b2b customer on the product page and allow purchasing 📁 troubleshooting to troubleshoot the most common issues (such as issues with pricing), please see troubleshooting docid\ blcekkx3i30nkucglsfw7 you can also support docid\ nnuw1g9z7eaj4m78vk7t9 and we'll be happy to assist ℹ️ frequently asked questions plans and pricing which sparklayer plans do you offer for woocommerce? all sparklayer plans are compatible with woocommerce, from "starter" right through to "enterprise" learn more about our plans and pricing how does billing work? when you sign up to sparklayer, billing is managed via the sparklayer dashboard under acccount > plan woocommerce setup where do i find the sparklayer woocommerce app? currently, sparklayer can only be setup on your woocommerce store by registering directly via sparklayer what woocommerce plan do i need to be on to use sparklayer? you must already have woocommerce installed on your wordpress website woocommerce version 9 and above wordpress version 6 and above if you're using a "block theme", sparklayer can be automatically installed (otherwise this is a manual installation process) can i have dtc and b2b on the same store? yes, it's possible to install sparklayer onto your existing woocommerce dtc store (i e retail), meaning you can run both dtc and b2b on the same store we call this a 'hybrid setup'; when your b2b customers sign in, they simply see the special sparklayer frontend docid\ ogkfvqx13dhw2582d57kj interface that allow them to see their prices and place orders if you want to see this in action, you can try our b2b/b2c demo store here https //demo woocommerce sparklayer io/ store setup can you help me install sparklayer on my woocommerce website? by default, the sparklayer widges will be automatically installed on your store if you do require assistance, you can support docid\ nnuw1g9z7eaj4m78vk7t9 and we will be happy to advise does sparklayer work on any woocommerce theme? you must already have woocommerce installed on your wordpress website woocommerce version 9 and above wordpress version 6 and above if you're using a "block theme", sparklayer can be automatically installed (otherwise this is a manual installation process) how does sparklayer affect my current woocommerce theme? the sparklayer b2b widgets, including b2b pricing, cart and my account area, are only loaded once a customer who has been added to a b2b customer group successfully signs in to your store for all other users, your store will remain completely unaffected this allows you to have full control over which customers are able to see your b2b pricing and place b2b orders what if i'm already using a wholesale b2b app on my website? if you already have a b2b / wholesale app installed on your store, sparklayer can work alongside this it's a great way to test out sparklayer and, once you're happy, you can simply uninstall any previous b2b apps you were using if your previous b2b app has made code changes to your woocommerce store, you may want to ask the app developer to remove these although this is optional payments can i use my existing payment methods on the checkout? if your customers choose "pay online by card" during the sparklayer checkout process, they will simply be taken to the woocommerce checkout from there, any payment methods you have set up in woocommerce (e g paypal, affirm pay) will show up, allowing the customers to pay by this method in short, if woocommerce support specific payment methods, your b2b customers could select it during the checkout providing they choose "pay online by card" products how do i hide products or set up b2b only products? there are a few things we recommend to make the experience better you could create a b2b only collection and redirect customers to this once they login you could also configure your woocommerce theme to hide and show products based on tag via custom coding can i use my woocommerce prices for my b2b pricing? yes! sparklayer allows you to automatically synchronise your woocommerce prices (e g your main woocommerce retail price), making it really easy to set up b2b pricing for your customers for example, you could set your b2b prices to be 20% off your woocommerce prices and we can even make provisions for your tax set up in woocommerce (e g exclusive or inclusive of tax) how do i set up pre order and backorder products? in terms of pre ordering, sparklayer has full support for different stock status messages and it's possible to set up products as pre order/back order easily it does rely on some configuration within woocommerce, but it's relatively easy to do! we've stock display docid\ gj ao gq6oa jx0d27hys on how it works and you can even set up "due in" dates to give your customers visibility do i need to use product skus? in terms of product skus, sparklayer relies on these being added to your products within wix so that we can display the correct b2b pricing when your customers log in without a unique sku, there's no way for sparklayer to do this if you don't already have skus in wix, it's relatively quick to do you can either edit individual products and add them manually, or you can use wix 'import' or 'edit products' feature to do this in bulk how do i show inventory (stock) levels? it's possible to show inventory levels and a stock status when your b2b customers log in you can learn more about how to enable this in customer groups docid 5 lwmnohhjbjjppg9e6vh how do i restrict b2b customers from dtc inventory (and vice versa) if you're installing sparklayer on a single website and you are looking to run both dtc and b2b at the same time, it will be necessary to use the same stock pool behind the scenes from an inventory point of view, this essentially means that both dtc and b2b customers will be ordering from the same stock source which can pose challenges important it is not possible to block dtc customers from ordering from your inventory and there is no mechanism in woocommerce to do this if you are wanting to implement this, you will need to consider creating b2b specific products on your store creating a separate store just for your b2b customers, effectively separating out your inventory completely user experience how do i set up a b2b registration form? if you're looking to enable a wholesale/b2b registration form there are a few good options for this and in summary, these are the options we recommend you could use your current login/registration page and enhance the registration page with some additional fields you could create a brand new registration page and direct prospective b2b customers to this it's also worth noting that you can manually add customers via the admin by going to wordpress/woocommerce > users and from there you could moderate your wholesale applications how do i invite a b2b customer to my website? when you're ready to invite your b2b customers to begin using your store, there are a variety of ways you can do this you could think about sending a marketing newsletter to your customers to notify them of your new b2b store and to sign in we also have some example messaging you can use when inviting your customers and you can explore more in launching sparklayer docid\ yufghegoxe h7ujfcshna will sparklayer slow down my woocommerce website? no for performance, the sparklayer frontend only loads when a valid b2b customer successfully logs into a website; for your standard (dtc) customers, no code is loaded at all when a b2b customer logs in, all loading of the interfaces is asynchronous which means a negligible impact on page load times and performance even though sparklayer is a hosted third party solution the result is the end customer will have a rapid experience browsing products and placing orders how do i setup b2b specific content on my woocommerce website? this is possible but would require custom coding we recommend consulting with a woocommerce expert developer before making changes to your website orders where do i find my b2b orders in woocommerce? payment method notes payment by invoice the order will be created within woocommerce > orders with a payment status of "unpaid" you can then manually mark the order as paid once you have received payment (e g via offline means) payment on account the order will be created within woocommerce > orders with a payment status of "unpaid" you can then manually mark the order as paid once you have received payment (e g via offline means) upfront payment (card payments) the order will be created within woocommerce > orders with a payment status of "paid" you can then proceed to fulfil the order how do i edit orders? it is possible to edit orders within woocommerce when an order is placed via sparklayer providing payment hasn't already been processed from woocommerce > oders, navigate to an order you'll then see the option to edit order allowing you to make changes how do i send an invoice? in terms of invoicing, sparklayer doesn't send invoices directly when sending an invoice, this is managed outside of sparklayer and it will require you to collect payment by your preferred means once you've received payment, you can then mark the order as paid within wix and then fulfil it as normal how do i set a minimum order quantity? within sparklayer, we support the ability to set minimum/maximum order level spends for your b2b customers you can configure these by going to the customer groups area of the sparklayer dashboard