Overview

Get started with FastSpring's Store Builder Library.

FastSpring's Store Builder Library (SBL) is a JavaScript library that you can use to incorporate ecommerce features on your website. Examples include a "Buy Now" button, which is a one-line modification, or a full-featured shopping cart that matches your website design.

The SBL communicates with your FastSpring Store to display product information and initiate transactions and sessions on your website. Store Builder Library sessions include the following:

  • Order-Level Directives: Retrieve information regarding current order sessions.
  • Product-Level Directives: Retrieve information regarding individual products.
  • Actions: Use directives to initiate a behavior against the SBL.
  • Methods: Use JavaScript to initiate a behavior against the SBL.
  • Callbacks: Perform a JavaScript function based on SBL events.

Use the script below to initialize each script. Then, incorporate codes as simple or advanced as you would like. Insert the URL of the desired storefront after data-storefront=’ to apply the script to a specific storefront.

<script 
    id=”fsc-api”
    src=”https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.5/fastspring-builder.min.js"
    type=”text/javascript”
    data-storefront=”fastspringexamples.test.onfastspring.com/popup-fastspringexamples”>
</script>

Field

Definition

id

Body of the script

src

Indicates the SBL version

type

Informs the browser that this is a JavaScript library

data-storefront

The FastSpring Storefront URL that the JavaScript Library will be communicating with

Select Products to Access with the Store Builder Library

Adding products to your Popup Storefront adds them to the SBL's data. This enables you to access the products from HTML or JavaScript. After they are added to the SBL, you can further customize the products with pricing and language localization.

  1. Navigate to Storefronts > Popup Storefronts.
  2. On the applicable Popup Storefront, click Products.
  3. In the Main Products field, type the name of the product you wish to add. Repeat as necessary.
  4. Save your changes.

❗️

Web storefronts do not support the Store Builder Library at this time. We recommend configuring a popup storefront to use the SBL.


Did this page help you?