1.0.47 • Published 1 year ago

@cartbot/shipping-calculator v1.0.47

Weekly downloads
-
License
https://use.partb...
Repository
-
Last release
1 year ago

Partbot Shipping Calculator Plugin

Compatible with Partbot connected ecommerce stores and synced products.

License

Please see the LICENSE file for more information.

Installation

Add the React component to your project by running:

npm install @cartbot/shipping-calculator or yarn add @cartbot/shipping-calculator

Usage

Import the React component into your project and pass in the required props.

import ShippingCalculator from "@cartbot/shipping-calculator";

const App = () => {
  return (
    <ShippingCalculator
      apiKey="YOUR_API_KEY"
      sku="YOUR_SKU"
      brand="YOUR_BRAND"
    />
  );
};

Props

PropTypeRequiredDescription
apiKeystringtrueYour Partbot API key.
skustringtrueThe SKU of the product you want to calculate shipping for.
brandstringtrueThe brand of the product you want to calculate shipping for.
quantitynumberfalseThe quantity of the product you want to calculate shipping for. Defaults to 1.
weightnumberfalseProduct weight in kilograms
pricenumberfalseProduct price in dollars (AUD)
showLabelbooleanfalseShow the label "Calculate Shipping" above the input. Defaults to true.
themeColorstringfalseThe color of the input border and button. Defaults to #4f46e5.

Web Component

The React component can also be used as a Web Component.

Add the following script tag to your project to load the Web Component JavaScript file: <script src="//unpkg.com/@cartbot/shipping-calculator@latest/dist/shipping-calculator.js" async></script>

Add the following HTML to your project to render the Web Component, passing in the required props as data-* attributes:

<shipping-calculator
  data-api-key="YOUR_API_KEY"
  data-sku="YOUR_SKU"
  data-brand="YOUR_BRAND"
  data-quantity="1"
  data-theme-color="#4f46e5"
/>

Learn more at shipping-calculator.partbot.io

1.0.47

1 year ago

1.0.37

1 year ago

1.0.39

1 year ago

1.0.38

1 year ago

1.0.40

1 year ago

1.0.44

1 year ago

1.0.43

1 year ago

1.0.42

1 year ago

1.0.41

1 year ago

1.0.46

1 year ago

1.0.45

1 year ago

1.0.36

1 year ago

1.0.35

1 year ago

1.0.34

1 year ago

1.0.33

1 year ago

1.0.32

1 year ago

1.0.31

1 year ago

1.0.30

1 year ago

1.0.29

1 year ago

1.0.28

1 year ago

1.0.27

1 year ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago