2.1.5 • Published 1 year ago

@studio-otto/session-store v2.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Session Store

Shopify session store for Shopify Vue sites - Query methods and centralized store for products and cart

Deploying to NPM

// Bump the version depending on change typy
$ npm version patch
$ npm version minor
$ npm version major

// Build
$ yarn build

// Push to NPM
$ npm publish --access public

Install

Install package

yarn add @studio-otto/session-store

Use

Probably going to tweak this, ran into some unexpected architecture with nuxt and it trying to register store already. If I update it will be soon and fairly minor, currently it just doesnt treat the store state arrays like registered vue arrays so you need to set that up in the app. See collection page example implementation to see what I mean. It is only really with products array and collections array on products module I think. If you dont state it as obervable, it will only update products on initial product page load, and the final.

Inside app / vue shop

Nuxt installation

in /store/index.js

import { Modules } from 'session-store'

// These are default config overrides - totally optional
export const state = () => {
  return {
    domain: 'someshopname.myshopify.com',
    token: 'c0a00f9ce66bb85d8ba6759bfc9d37db'
  }
}

export const modules = Modules

thats it!

Non-Nuxt installation

in app.js or w/e you are installing/mounting vue

import { CreateStore } from 'session-store'

new Vue({
  el: '#someid',
  store: CreateStore(domain, token),
})

See wiki for examples and methods

License

MIT

2.1.5

1 year ago

2.1.2

1 year ago

2.1.1

1 year ago

2.0.2

1 year ago

2.1.4

1 year ago

2.1.3

1 year ago

2.1.0

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.22

1 year ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.19

3 years ago

1.0.17

3 years ago