🚀 DAY 3 OF LAUNCH WEEK: Introducing Webhook Events for Pull Request Scans.Learn more →
Socket
Book a DemoInstallSign in
Socket

@fleetbase/storefront

Package Overview
Dependencies
Maintainers
0
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fleetbase/storefront

Fleetbase Storefront JS & Node SDK

latest
npmnpm
Version
1.1.14
Version published
Weekly downloads
35
-22.22%
Maintainers
0
Weekly downloads
 
Created
Source

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

Keywords

ecommerce

FAQs

Package last updated on 11 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts