@fleetbase/storefront

1.1.9 • Public • Published

Ecommerce companion SDK & API for Fleetbase, build custom shopping experiences for on-demand orders.

Version Downloads/week Bundle Size License
fleetbase.io | @fleetbase_io | Discord

Installation

With NPM

npm install @fleetbase/storefront

With Yarn

yarn add @fleetbase/storefront

Documentation

See the documentation webpage.

If you would like to make contributions to the Fleetbase Javascript SDK documentation source, here is a guide in doing so.

Quick Start for Browser

import Storefront, { Product } from "@fleetbase/storefront";

const storefront = new Storefront("Your Store Key");

// list products
storefront.products.findAll();

// create a product
const product = new Product({ name, description, price });

// retrieve cart & add item
storefront.cart.retrieve().then((cart) => {
  cart.add("product_xyxyxyx", 1);

  // empty cart
  cart.empty();
});

// checkout
storefront.checkout.capture();

Create a custom adapter

Storefront will eventually allow you to bring your own ecommerce adapter.

@todo

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.95latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.95
1.1.80
1.1.70
1.1.60
1.1.50
1.1.40
1.1.30
1.1.20
1.1.10
1.1.00
1.0.91
1.0.80
1.0.70
1.0.60
1.0.50
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i @fleetbase/storefront

Weekly Downloads

6

Version

1.1.9

License

BSD-3-Clause

Unpacked Size

1.2 MB

Total Files

36

Last publish

Collaborators

  • roncodes
  • shivthakker