Skip to content

Latest commit

 

History

History
62 lines (40 loc) · 1.81 KB

File metadata and controls

62 lines (40 loc) · 1.81 KB

BuyButton.js

BuyButton.js on NPM

BuyButton.js is a highly customizable UI library for adding e-commerce functionality to any website. It allows you to create interactive UI components such as product listings and shopping carts with minimal configuration, while allowing you to easily customize the appearance and behaviour of the components. It uses the JS Buy SDK to connect to your Shopify store, giving you access to your products and collections.

To get started, take a look at the documentation. For questions, suggestions and feedback, please create an issue.

BuyButton.js v3.0 troubleshooting

Checkout showing Online Store password page

If your Online Store is password protected, users will be shown your Online Store password page when attempting to go to checkout. The best way to resolve this is to add this redirect theme to your Online Store and remove password protection.

Development

pnpm install
cp index.example.html index.html
  • Add your API key and shop domain to index.html
  • Set a product ID in index.html
pnpm run start

Will watch for changes, compile src/ to tmp/ using babel & browserify, and run a server on port 8080.

Testing

pnpm run test

will run full test suite locally

pnpm run test-dev

Will watch for changes and run test suite.

Documentation

To run docs locally, install jekyll:

gem install jekyll
pnpm run docs

Doc server will run at http://localhost:4000/buy-button-js/ Docs source files are located in /docs. Docs are automatically deployed to gh-pages from main.