JSPM

  • Created
  • Published
  • Downloads 179
  • Score
    100M100P100Q51892F
  • License ISC

shopping cart ui for shopify stores

Package Exports

  • shopper

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (shopper) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

shopper

cart ui for custom shopify frontends

current capabilities

  • display products for sale on a web page

    • product display component
    • add to cart button
  • cart system

    • add and remove products from cart
    • ui to change item quantities
    • big green checkout button
  • checkout through shopify

    • cart has checkout button which initiates standard shopify checkout process

future goals

  • persistent cart state in localstorage

    • info like cart items and currency preference is tracked
    • if you leave the page and return, state is maintained
    • if you have multiple tabs open, all cart instances should auto-synchronize in realtime
    • built using sister projects omnistorage and crosscall
  • currency conversion system

    • currency switcher ui can be placed within cart
    • all prices on the site can flip currency based on one control
    • built using sister project crnc

notes

  • see "global.ts" for usage example

  • using mobx@4 for internet explorer compat
    mobx@4 + mobx-preact@2

  • mobx terminology "store" is used a lot in the codebase

    it's not an "ecommerce store" – for that meaning, we use the term "shop" instead

    a mobx store is where we keep observable state

  • security note: dangerouslySetInnerHtml is used with shopify product descriptions

    html from the shopify api (product descriptions) is injected without sanitization

    this should be safe, so long as the connection to shopify is secured via https