This article applies to Contextual Commerce. (Looking for Classic Commerce documentation?)
Here are some of the great things you can do with the library:
- Display products created in your FastSpring store right on your website with localized prices and descriptions
- Use Library to apply coupons, add products to the cart, provide customer information to expedite checkout process.
- Use Library to provide customers ability to pay using a popup storefront.
Once referenced on the page and configured the library will provide you with two ways of interacting with data:
- "Simple" – by following simple rules of "markup" parameters you can enable links on the page to add items to the cart, initiate checkout, apply coupon codes and other operations. "Simple" way is usually enough for scenarios like applying a coupon code prior to redirecting to checkout, displaying localized prices or creating "Add to cart and checkout" buttons allowing to start an order in a single click. For more information refer to Accessing Library and data from HTML.
Whichever way you choose you need to get started by referencing the library on your page and making sure that data is being successfully loaded.