# install dependencies
$ npm install
# serve with hot reload at localhost:3000
$ npm run dev
# build for production and launch server
$ npm run build
$ npm start
# generate static project
$ npm run generate
For detailed explanation on how things work, checkout Nuxt.js docs.
Built around the Storefront API https://help.shopify.com/en/api/storefront-api
Integrated with Google Tag Manager for Enhanced Ecommerce https://developers.google.com/analytics/devguides/collection/gtagjs/enhanced-ecommerce
Note that for the Shopify API there is no "cart", they refer to that as a "Checkout". We have tried to follow that convention.
- Install required packages. See dependencies in
package.json
file for list. - In Nuxt config, set Shopify endpoint and headers, get your Shopify access token here (where?).
- Copy settings from
nuxt.config.js
- All files in
~/gql
- The Shopify store module at
~/store/shopify.js
- The Shopify utility file at
~/utils/shopify.js
- The pages in
~/pages
are useful, but are technically optional. - All the components in
~/components/shopify
are useful, but are technically optional.
TODO improvements:
- Get cart page built
- Clear checkout on completion (Webhooks? Some other way? If site referrer URL is the shopify url?)
- Document all the store actions
- Document Loading property and it's increments events
- Figure out how to query for Shopify menus?
- Get
this.gtag
working in all places (remove from cart, update cart quantity etc) - Build Shopify theme
- User Login/Account
- Theme Settings
- Checkout confirmation?