Getting Started with Ginger Commerce

Ginger JavaScript SDK provides customer, product, cart, and checkout tooling for developers. It’s built on top of Ginger Commerce API to complete Ginger Platform experience. Build amazing JavaScript apps with Ginger JavaScript SDK .

Requirements
You've created a development store or have a production store.
You've created products or collections in your store.
You have experience writing JavaScript. The JS Ginger SDK tool is intended for use by developers who are experienced with JavaScript.
You have a website and want to add commerce functionality to it.

  1. Generate an access token
    To generate an access token, you create a private app
    The access token is generated when you save the private app. You include the access token with any requests made from your app to Ginger.

  2. To use Ginger Commerce JavaScript SDK, include it in the script tag and call the GC class:

<script type=“text/javascript” src=“https://js.gngr.io/dev/gc-sdk.umd.js”></script>
  1. To initialize SDK, execute the following code:
<script>
    const CrossDomainSessionService = new GC.CrossDomainSessionService;
  CrossDomainSessionService.init(token)
<script>

Did this page help you?