Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
7f8ae7d
Update package name
travis-r6s Sep 14, 2020
3239350
Upgrade packages
travis-r6s Sep 14, 2020
bbb6716
Remove unused/unecessary plugins
travis-r6s Sep 14, 2020
d754a5e
Add Vue Storefront
travis-r6s Sep 14, 2020
ea6fb0b
Update starter description
travis-r6s Sep 14, 2020
80977dd
Add jsconfig
travis-r6s Sep 14, 2020
432f50e
Update to use GraphQL request and 🪓 Apollo
travis-r6s Sep 14, 2020
37a4c49
Update key listeners
travis-r6s Sep 14, 2020
dd43a1f
Update to use correct destructuring
travis-r6s Sep 14, 2020
0f6e0fb
Update to add SfHeader
travis-r6s Sep 14, 2020
8ea2adc
Update to satisfy prop types
travis-r6s Sep 14, 2020
ed7f151
Update product page to use SFUI
travis-r6s Sep 14, 2020
dc9bf03
Update to use correct arguments
travis-r6s Sep 14, 2020
6488e93
Update to use SfComponentSelect
travis-r6s Sep 15, 2020
2670daa
Add sidebar
travis-r6s Sep 15, 2020
e6ba2ce
Add getter for cart and sidebar
travis-r6s Sep 15, 2020
8db1b4c
Shorten mutation name
travis-r6s Sep 15, 2020
f2ec357
Add sidebar
travis-r6s Sep 15, 2020
3bfce67
Update to add checkout emthod
travis-r6s Sep 15, 2020
3f688e7
Add container padding
travis-r6s Sep 15, 2020
92a15b8
Use shopify pages
travis-r6s Sep 15, 2020
c4f179c
Remove cart page
travis-r6s Sep 15, 2020
209ba17
Update to use SFUI
travis-r6s Sep 15, 2020
c8ffc0d
Remove v-lazy-image
travis-r6s Sep 15, 2020
b1edc7a
Update lockfile
travis-r6s Sep 15, 2020
74c95c6
Disbale checkout if no items
travis-r6s Sep 15, 2020
b6f2abe
Update silly misnaming error
travis-r6s Sep 15, 2020
ae3fb45
Update to add container max-width
travis-r6s Sep 15, 2020
67afaee
Remove unecessary async
travis-r6s Sep 15, 2020
36cace3
Add getter to check if product is in cart
travis-r6s Sep 15, 2020
e14f8b0
Add homepage
travis-r6s Sep 15, 2020
0ba42a8
Add footer component
travis-r6s Sep 15, 2020
0dcc30b
Update to center products
travis-r6s Sep 15, 2020
1260c80
Update collections page to use SFUI
travis-r6s Sep 15, 2020
1aa0cf8
Add missing path property
travis-r6s Sep 15, 2020
25fda96
Add auth modal using SFUI
travis-r6s Sep 15, 2020
e24fed2
Remove unused components
travis-r6s Sep 15, 2020
d0ba684
Update account page to use SFUI
travis-r6s Sep 15, 2020
d05ab64
Update to use SfSection
travis-r6s Sep 15, 2020
c38743f
Update to use SfSection
travis-r6s Sep 15, 2020
3065130
Remove logs
travis-r6s Sep 15, 2020
b958d02
Update to add size prop
travis-r6s Sep 15, 2020
f5706a1
Update to use SFUI
travis-r6s Sep 15, 2020
be226bf
Make product collection conditional
travis-r6s Sep 15, 2020
7021c6b
Update source version
travis-r6s Sep 15, 2020
d7484c2
Udate to center container
travis-r6s Sep 15, 2020
7a714e1
Remove collections limit
travis-r6s Sep 15, 2020
5ce1620
Update banner grid calculations
travis-r6s Sep 15, 2020
32114d9
Upgrade shopify source package
travis-r6s Sep 15, 2020
3456fb4
Update method name
travis-r6s Sep 15, 2020
2fd8d60
Ignore vercel
travis-r6s Sep 15, 2020
2f8b070
Update perPage
travis-r6s Sep 15, 2020
4d341d5
Remove vuex-persisted
travis-r6s Sep 15, 2020
9b8e72e
Remove redirect to login
travis-r6s Sep 15, 2020
305acf7
Update to store shopify accessToken
travis-r6s Sep 15, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ dist
.env*
.env.*
static/*

.vercel
10 changes: 5 additions & 5 deletions gridsome.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
siteName: 'Gridsome + Shopify 😍',
siteDescription: 'A full-featured Shopify starter kit for Gridsome, including an account page.',
siteUrl: 'https://gridsome-starter-shopify-account.vercel.app',
siteName: 'Gridsome, Storefront UI, + Shopify',
siteDescription: 'A full-featured Gridsome ecommerce site, built with Storefront UI and Shopify.',
siteUrl: 'https://gridsome-starter-shopify-advanced.vercel.app',
templates: {
ShopifyProduct: [
{
Expand All @@ -27,7 +27,8 @@ module.exports = {
use: 'gridsome-source-shopify',
options: {
storeName: process.env.GRIDSOME_SHOPIFY_STOREFRONT,
storefrontToken: process.env.GRIDSOME_SHOPIFY_STOREFRONT_TOKEN
storefrontToken: process.env.GRIDSOME_SHOPIFY_STOREFRONT_TOKEN,
perPage: 100
}
},
{
Expand All @@ -51,7 +52,6 @@ module.exports = {
searchFields: ['title', 'handle', 'tags']
}
},
'gridsome-plugin-purgecss',
{
use: '@gridsome/plugin-critical',
options: {
Expand Down
10 changes: 10 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"include": ["./src/**/*"],
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["src/*"],
"~/*": ["src/*"]
}
}
}
36 changes: 14 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,31 @@
{
"name": "gridsome-starter-shopify-account",
"name": "gridsome-starter-shopify-advanced",
"private": true,
"scripts": {
"build": "gridsome build",
"develop": "gridsome develop",
"explore": "gridsome explore"
},
"dependencies": {
"@gridsome/plugin-critical": "^0.1.6",
"@gridsome/plugin-critical": "^0.2.0",
"@gridsome/plugin-google-analytics": "^0.1.1",
"@gridsome/plugin-sitemap": "^0.4.0",
"apollo-boost": "^0.4.9",
"bulma": "^0.9.0",
"currency.js": "^1.2.2",
"graphql-tag": "^2.10.3",
"gridsome": "^0.7.18",
"gridsome-plugin-flexsearch": "^1.0.1",
"gridsome-plugin-guess-js": "^0.1.1",
"@storefront-ui/vue": "^0.8.1",
"cookie": "^0.4.1",
"currency.js": "^2.0.3",
"graphql-request": "^3.1.0",
"gridsome": "^0.7.20",
"gridsome-plugin-flexsearch": "^1.0.4",
"gridsome-plugin-manifest": "^0.3.5",
"gridsome-plugin-purgecss": "^1.0.12",
"gridsome-plugin-service-worker": "^0.1.5",
"gridsome-source-shopify": "^0.1.13",
"isomorphic-fetch": "^2.2.1",
"js-cookie": "^2.2.1",
"typeface-karla": "^0.0.72",
"typeface-prata": "^0.0.72",
"v-lazy-image": "^1.4.0",
"vue-apollo": "^3.0.3",
"gridsome-plugin-service-worker": "^0.2.6",
"gridsome-source-shopify": "0.2.3",
"vue-apollo": "^3.0.4",
"vue-notification": "^1.3.20",
"vuex": "^3.5.1",
"vuex-persist": "^2.2.0"
"vuex": "^3.5.1"
},
"devDependencies": {
"eslint-config-travisreynolds-vue": "1.1.8",
"eslint-config-travisreynolds-vue": "1.2.0",
"node-sass": "^4.14.1",
"sass-loader": "^9.0.2"
"sass-loader": "^10.0.2"
}
}
13 changes: 9 additions & 4 deletions src/components/Account/AccountDetails.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<template>
<div class="column is-half">
<h4 class="subtitle is-family-secondary">
{{ displayName }}
</h4>
<div>
<SfHeading
:level="4"
class="sf-heading--left"
:title="displayName" />
<p>{{ customer.email }}</p>
<br>
<div v-if="customer.defaultAddress">
Expand All @@ -16,7 +17,11 @@
</template>

<script>
// Components
import { SfHeading } from '@storefront-ui/vue'

export default {
components: { SfHeading },
props: {
customer: {
type: Object,
Expand Down
91 changes: 53 additions & 38 deletions src/components/Account/AccountOrders.vue
Original file line number Diff line number Diff line change
@@ -1,54 +1,69 @@
<template>
<div class="column is-half">
<h4 class="subtitle is-family-secondary">
Order history
</h4>
<div>
<p v-if="!orders.length">
You have no orders.
</p>
<table
v-else
class="table is-fullwidth">
<thead>
<tr>
<th>Order #</th>
<th>Total Items</th>
<th>Total Price</th>
<th />
</tr>
</thead>
<tbody>
<tr
v-for="order in orders"
:key="order.id">
<th>{{ order.name }}</th>
<th>{{ order.lineItems.edges.length }}</th>
<th>{{ formatCurrency(order.totalPrice) }}</th>
<th>
<a
:href="order.statusUrl"
target="_blank"
rel="noreferrer">
View Order
</a>
</th>
</tr>
</tbody>
</table>
</div>
<div>
<SfHeading
:level="3"
title="Order history" />
<br>
<p v-if="!orders.length">
You have no orders.
</p>
<SfTable>
<SfTableHeading>
<SfTableHeader
v-for="header in tableHeaders"
:key="header">
{{ header }}
</SfTableHeader>
</SfTableHeading>
<SfTableRow
v-for="order in orders"
:key="order.id">
<SfTableData>
{{ order.name }}
</SfTableData>
<SfTableData>
{{ formatDate(order.processedAt) }}
</SfTableData>
<SfTableData>
{{ order.lineItems.edges.length }}
</SfTableData>
<SfTableData>
{{ formatCurrency(order.totalPrice) }}
</SfTableData>
<SfTableData>
<span>{{ order.fulfillmentStatus }}</span>
<br>
<a
:href="order.statusUrl"
target="_blank"
rel="noreferrer">
View Order
</a>
</SfTableData>
</SfTableRow>
</SfTable>
</div>
</template>

<script>
// Components
import { SfHeading, SfTable } from '@storefront-ui/vue'

export default {
components: { SfHeading, SfTable },
props: {
orders: {
type: Array,
default: () => []
}
},
data: () => ({
tableHeaders: ['Order #', 'Order Date', 'Total Items', 'Amount', 'Status']
}),
methods: {
formatDate (date) {
return new Intl.DateTimeFormat().format(new Date(date))
},
formatCurrency ({ currencyCode, amount }) {
return new Intl.NumberFormat('en-GB', { style: 'currency', currency: currencyCode }).format(amount)
}
Expand Down
65 changes: 0 additions & 65 deletions src/components/Cart/CartCheckoutForm.vue

This file was deleted.

Loading