onlybags-ecommerce-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

Onlybags-Ecommerce-Sdk

A simple SDK to use with Onlybags ecommerce. This SDK simplifies the integration of the Onlybags e-commerce platform into your projects, allowing for easy setup of storefronts, handling of inventory, and more, with a focus on virtual world applications.

Install the Library

To get started with the Onlybags Ecommerce SDK, you first need to install the library in your project. Use npm (Node Package Manager) to install it as follows:

npm i onlybags-ecommerce-sdk
import React from "react";
import * as ecs from "@dcl/sdk/ecs"; // Import the ECS (Entity Component System) from Decentraland SDK
import { connectToEcommerce, OBStoreUI } from "onlybags-ecommerce-sdk"; // Import SDK functions

// Initialize connection to Onlybags Ecommerce with your datasource ID
// Replace '1' with your actual datasource ID created on https://business.dglive.org/
connectToEcommerce(1, ecs);

// Define a UI component that utilizes the OBStoreUI component
const UiComponent = () => (
  <UiEntity>
    {/* Your custom code goes here */}
    <OBStoreUI />
  </UiEntity>
);

export default UiComponent;

Package Sidebar

Install

npm i onlybags-ecommerce-sdk

Weekly Downloads

3

Version

0.0.3

License

Apache-2.0

Unpacked Size

510 kB

Total Files

67

Last publish

Collaborators

  • mnahara