@lancom/shared 0.0.280 → 0.0.282
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/js/api/admin.js +3 -0
- package/assets/js/api/index.js +7 -4
- package/assets/js/models/print-area.js +8 -4
- package/assets/js/utils/colors.js +1 -1
- package/assets/js/utils/fabric-helper.js +5 -18
- package/assets/js/utils/filters.js +2 -2
- package/assets/js/utils/product.js +10 -1
- package/assets/scss/_common.scss +10 -0
- package/components/asides/contact_us/contact-us.vue +9 -2
- package/components/asides/menu/menu.vue +1 -25
- package/components/checkout/cart/cart.mixin.js +3 -3
- package/components/checkout/cart/cart.scss +8 -109
- package/components/checkout/cart/cart.vue +84 -46
- package/components/checkout/cart/cart_entity/cart_entity_color_simple_products/cart_entity_color_simple_product/cart-entity-color-simple-product.vue +7 -4
- package/components/checkout/cart/cart_price_info/cart-price-info.vue +4 -5
- package/components/checkout/cart/cart_pricing/cart-pricing.scss +34 -0
- package/components/checkout/cart/cart_pricing/cart-pricing.vue +112 -0
- package/components/checkout/cart/cart_shipments_pricing/cart-shipments-pricing.vue +2 -2
- package/components/checkout/order/address-form/address-form.scss +16 -0
- package/components/checkout/order/address-form/address-form.vue +199 -91
- package/components/checkout/order/order-billing-information/order-billing-information.scss +1 -1
- package/components/checkout/order/order-payment-information/order-payment-information.vue +15 -5
- package/components/checkout/order/order.vue +2 -1
- package/components/common/client_settings/client-settings.scss +6 -0
- package/components/common/client_settings/client-settings.vue +9 -1
- package/components/common/payment/payment_card/stripe/stripe.vue +1 -0
- package/components/common/payment/payment_success/payment-success.vue +8 -1
- package/components/common/postcode_select/postcode-select.vue +24 -12
- package/components/common/price.vue +1 -1
- package/components/common/pricing_table/pricing-table.vue +3 -2
- package/components/common/tabs.vue +17 -8
- package/components/editor/editor.scss +6 -0
- package/components/editor/editor.vue +9 -25
- package/components/editor/editor_layers/editor-layers.scss +18 -0
- package/components/editor/editor_layers/editor-layers.vue +76 -20
- package/components/editor/editor_layers/editor_layers_layer/editor-layers-layer.vue +11 -4
- package/components/editor/editor_print_area_options/editor-print-area-options.vue +6 -1
- package/components/editor/editor_print_area_options/editor_print_area_option/editor-print-area-option.vue +2 -2
- package/components/editor/editor_product_details/editor-product-details.scss +8 -2
- package/components/editor/editor_product_details/editor-product-details.vue +22 -25
- package/components/editor/editor_wizard/editor-wizard.vue +2 -1
- package/components/editor/editor_workspace/editor-workspace.vue +7 -3
- package/components/editor/editor_workspace/editor_workspace_side/editor-workspace-side.vue +17 -20
- package/components/editor/mobile_editor_product_details/mobile-editor-product-details.scss +2 -2
- package/components/modals/cart_modal/cart-modal.vue +1 -1
- package/components/modals/order_modal/order-modal.vue +6 -0
- package/components/modals/payment_modal/payment-modal.vue +4 -3
- package/components/order/order_payment/order-payment.vue +6 -6
- package/components/product/editor_pricing/editor-pricing.scss +75 -0
- package/components/product/editor_pricing/editor-pricing.vue +197 -0
- package/components/product/editor_pricing/editor_pricing_details/editor-pricing-details.scss +0 -0
- package/components/product/editor_pricing/editor_pricing_details/editor-pricing-details.vue +29 -0
- package/components/product/editor_pricing/editor_pricing_details/editor_pricing_details_prints/editor-pricing-details-prints.scss +41 -0
- package/components/product/editor_pricing/editor_pricing_details/editor_pricing_details_prints/editor-pricing-details-prints.vue +118 -0
- package/components/product/editor_pricing/editor_pricing_details/editor_pricing_details_products/editor-pricing-details-products.scss +41 -0
- package/components/product/editor_pricing/editor_pricing_details/editor_pricing_details_products/editor-pricing-details-products.vue +102 -0
- package/components/product/product.vue +1 -1
- package/components/product/product_colors_selector/product-colors-selector.scss +117 -0
- package/components/product/product_colors_selector/product-colors-selector.vue +188 -0
- package/components/product/product_multipacks_carousel/product-multipacks-carousel.vue +3 -1
- package/components/product/product_size_selector/product_size_selector_color/product_size_selector_color_cell/product-size-selector-color-cell.vue +4 -5
- package/components/product/products_size_selector_color/product_size_selector_color/product-size-selector-color.scss +58 -0
- package/components/product/products_size_selector_color/product_size_selector_color/product-size-selector-color.vue +128 -0
- package/components/product/products_size_selector_color/products-size-selector-color.scss +12 -0
- package/components/product/products_size_selector_color/products-size-selector-color.vue +43 -0
- package/components/product/wizard/wizard_print_layers/wizard_print_layer/wizard-print-layer.vue +4 -34
- package/components/product/wizard/wizard_print_size/wizard_print_area_print_size/wizard-print-area-print-size.vue +2 -1
- package/components/product/wizard/wizard_print_text_or_logo/wizard-print-text-or-logo.vue +22 -1
- package/components/product/wizard/wizard_print_type/wizard_print_area_print_type/wizard-print-area-print-type.vue +2 -1
- package/components/products/product_list/product-list.scss +2 -2
- package/components/products/product_list_product/product-list-product.scss +7 -11
- package/components/products/product_list_product/product-list-product.vue +7 -15
- package/components/the_aside/the-aside.vue +1 -0
- package/components/the_navbar/the-navbar.scss +1 -1
- package/feeds/google-shopping.js +5 -5
- package/layouts/error.vue +39 -0
- package/layouts/products.vue +386 -0
- package/mixins/add-to-cart.js +64 -0
- package/mixins/payment.js +2 -1
- package/mixins/print-layer.js +45 -0
- package/mixins/product-preview.js +1 -1
- package/mixins/product-view.js +313 -0
- package/nuxt.config.js +0 -5
- package/package.json +1 -1
- package/pages/checkout/cart.vue +40 -0
- package/pages/checkout/order.vue +72 -0
- package/pages/customer/create.vue +33 -0
- package/pages/customer/password/_token.vue +79 -0
- package/pages/customer/recovery.vue +33 -0
- package/pages/customer/settings.vue +33 -0
- package/pages/customer/signin.vue +33 -0
- package/routes/index.js +35 -0
- package/store/cart.js +15 -6
- package/store/order.js +2 -2
- package/store/product.js +5 -12
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { mapGetters, createNamespacedHelpers } from 'vuex';
|
|
2
|
+
import gtm from '@lancom/shared/assets/js/utils/gtm';
|
|
3
|
+
import { getLayerModel } from '@lancom/shared/assets/js/models/product-layers';
|
|
4
|
+
import { tax, staticLink, inRange } from '@lancom/shared/assets/js/utils/filters';
|
|
5
|
+
import { getProductLargeCover } from '@lancom/shared/assets/js/utils/colors';
|
|
6
|
+
import metaInfo from '@lancom/shared/mixins/meta-info';
|
|
7
|
+
import { STORE_CODES } from '@/constants/store';
|
|
8
|
+
|
|
9
|
+
const { mapActions, mapMutations } = createNamespacedHelpers('product');
|
|
10
|
+
|
|
11
|
+
export default (IS_PRODUCT_PRESET_PRINT_PRICING) => ({
|
|
12
|
+
mixins: [metaInfo],
|
|
13
|
+
transition(to, from) {
|
|
14
|
+
if (from && from.name === 'brand-tees-slug') { return 'slide-left-to-right'; };
|
|
15
|
+
if (to && to.name === 'brand-tees-slug') { return 'slide-right-to-left'; };
|
|
16
|
+
return 'fade';
|
|
17
|
+
},
|
|
18
|
+
async asyncData({ store, params, error, query }) {
|
|
19
|
+
try {
|
|
20
|
+
const { print, color, colour } = query;
|
|
21
|
+
const { shop, country, currency } = store.getters;
|
|
22
|
+
const data = {
|
|
23
|
+
shop: shop._id,
|
|
24
|
+
slug: params.slug,
|
|
25
|
+
country: country?._id,
|
|
26
|
+
currency: currency?._id,
|
|
27
|
+
print,
|
|
28
|
+
defaultColor: color || colour
|
|
29
|
+
};
|
|
30
|
+
await store.dispatch('product/fetchProduct', data);
|
|
31
|
+
await store.dispatch('product/fetchProductDetails', data);
|
|
32
|
+
|
|
33
|
+
if (IS_PRODUCT_PRESET_PRINT_PRICING) {
|
|
34
|
+
const product = store.getters['product/product'];
|
|
35
|
+
const printType = product.printTypes[0];
|
|
36
|
+
store.commit('product/setSelectedPrintType', printType);
|
|
37
|
+
store.commit('product/setIsPrintPricing', true);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (query.store) {
|
|
41
|
+
await store.dispatch('product/updatePriceIncludeGST', true);
|
|
42
|
+
}
|
|
43
|
+
} catch (e) {
|
|
44
|
+
console.log(e);
|
|
45
|
+
}
|
|
46
|
+
const pageItem = store.getters['product/product'];
|
|
47
|
+
const loadError = store.getters['product/loadError'];
|
|
48
|
+
|
|
49
|
+
if (loadError) {
|
|
50
|
+
error(loadError);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return {
|
|
54
|
+
pageItem,
|
|
55
|
+
breadcrumbs: []
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
data() {
|
|
59
|
+
return {
|
|
60
|
+
skipUpdateGallery: false,
|
|
61
|
+
preSetPrintPricing: false
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
computed: {
|
|
65
|
+
...mapGetters(['shop', 'gstTax', 'country', 'currency']),
|
|
66
|
+
...mapGetters('product', ['product', 'simpleProducts', 'productDetails', 'editableColor', 'images', 'preSetPrint', 'preSetPrintPriceRange']),
|
|
67
|
+
pageItemImage() {
|
|
68
|
+
return this.mainProductImageSrc;
|
|
69
|
+
},
|
|
70
|
+
hasImages() {
|
|
71
|
+
return this.images.length > 0;
|
|
72
|
+
},
|
|
73
|
+
mainProductImage() {
|
|
74
|
+
return this.images.find(i => i.color === this.editableColor?._id) || this.images[0];
|
|
75
|
+
},
|
|
76
|
+
thumbProductImages() {
|
|
77
|
+
const thumbProductImages = this.images.filter(i => i.color === this.editableColor?._id);
|
|
78
|
+
return (thumbProductImages.length > 0 ? thumbProductImages : this.images).slice(0, 6);
|
|
79
|
+
},
|
|
80
|
+
mainProductImageSrc() {
|
|
81
|
+
return this.mainProductImage && staticLink(this.mainProductImage.large);
|
|
82
|
+
},
|
|
83
|
+
mainProductImageStyles() {
|
|
84
|
+
return this.mainProductImageSrc ? { 'background-image': `url(${this.mainProductImageSrc});` } : {};
|
|
85
|
+
},
|
|
86
|
+
faqGroups() {
|
|
87
|
+
return (this.product.faq || []).length > 0
|
|
88
|
+
? [{ type: 'product', entities: this.product.faq, name: 'Product FAQ' }]
|
|
89
|
+
: null;
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
created() {
|
|
93
|
+
this.fillBreadcrumbs();
|
|
94
|
+
},
|
|
95
|
+
async mounted() {
|
|
96
|
+
const { slug } = this.$route.params;
|
|
97
|
+
const { color, colour, multipack } = this.$route.query;
|
|
98
|
+
const data = {
|
|
99
|
+
shop: this.shop._id,
|
|
100
|
+
slug,
|
|
101
|
+
country: this.country?._id,
|
|
102
|
+
currency: this.currency?._id,
|
|
103
|
+
defaultColor: color || colour
|
|
104
|
+
};
|
|
105
|
+
if (!this.product) {
|
|
106
|
+
await this.fetchProduct(data);
|
|
107
|
+
await this.fetchProductDetails(data);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (this.preSetPrint) {
|
|
111
|
+
const data = {
|
|
112
|
+
colorId: this.editableColor._id,
|
|
113
|
+
type: 'text',
|
|
114
|
+
properties: {
|
|
115
|
+
notes: '',
|
|
116
|
+
copy: '',
|
|
117
|
+
printArea: this.preSetPrint.printArea,
|
|
118
|
+
printSize: this.preSetPrint.printSize,
|
|
119
|
+
printType: this.preSetPrint.printType,
|
|
120
|
+
required: true
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
const layer = await getLayerModel(data);
|
|
124
|
+
this.addTemplateLayer(layer);
|
|
125
|
+
}
|
|
126
|
+
this.fillBreadcrumbs();
|
|
127
|
+
|
|
128
|
+
if (multipack) {
|
|
129
|
+
const [SKU, qty] = multipack.split('-multipack-');
|
|
130
|
+
const simpleProduct = this.simpleProducts.find(sp => sp.SKU === SKU);
|
|
131
|
+
if (simpleProduct) {
|
|
132
|
+
this.setSimpleProductAmount({
|
|
133
|
+
colorId: simpleProduct.color._id,
|
|
134
|
+
sizeId: simpleProduct.size._id,
|
|
135
|
+
amount: inRange(+qty, 0, simpleProduct.quantityStock || 999),
|
|
136
|
+
currency: this.currency
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
gtm.viewItem(this.product);
|
|
142
|
+
},
|
|
143
|
+
beforeDestroy() {
|
|
144
|
+
this.clearTemplate();
|
|
145
|
+
this.clearProduct();
|
|
146
|
+
},
|
|
147
|
+
methods: {
|
|
148
|
+
...mapActions(['fetchProduct', 'fetchProductDetails', 'selectColor']),
|
|
149
|
+
...mapMutations(['clearProduct', 'clearTemplate', 'addTemplateLayer', 'setSimpleProductAmount']),
|
|
150
|
+
staticLink,
|
|
151
|
+
goToInfoTab(tab) {
|
|
152
|
+
this.$refs.infoTabs.selectedTab = tab;
|
|
153
|
+
const { $el } = this.$refs.infoTabs;
|
|
154
|
+
if ($el?.scrollIntoView) {
|
|
155
|
+
$el.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
fillBreadcrumbs() {
|
|
159
|
+
this.breadcrumbs = [{
|
|
160
|
+
to: '/products',
|
|
161
|
+
text: 'Products'
|
|
162
|
+
}, {
|
|
163
|
+
to: `/products/${this.product.productType.alias}`,
|
|
164
|
+
text: this.product.productType.name
|
|
165
|
+
}, {
|
|
166
|
+
text: this.product.name
|
|
167
|
+
}];
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
getRoute() {
|
|
171
|
+
return '/shop/:shop/:sku/:product/editor';
|
|
172
|
+
},
|
|
173
|
+
jsonld() {
|
|
174
|
+
const { name, aggregateRating, reviews, brand, SKU } = this.product;
|
|
175
|
+
const url = `https://${this.shop.url}/${this.product.brand.alias}/${this.product.productType.alias}/${this.product.alias}`;
|
|
176
|
+
let brandAdditionalProductsRichSnippet = {};
|
|
177
|
+
try {
|
|
178
|
+
brandAdditionalProductsRichSnippet = JSON.parse(this.product.brand.additionalProductsRichSnippet);
|
|
179
|
+
} catch (e) {}
|
|
180
|
+
|
|
181
|
+
const productSchema = {
|
|
182
|
+
'@context': 'https://schema.org',
|
|
183
|
+
'@type': 'Product',
|
|
184
|
+
description: this.product.gsFeedDescription || this.product.description,
|
|
185
|
+
name,
|
|
186
|
+
offers: this.productDetails?.simpleProducts.map(sp => {
|
|
187
|
+
const spMaxPrice = (sp.pricing || []).reduce((price, pricing) => Math.max(price, pricing.price), 0);
|
|
188
|
+
const maxPrice = this.preSetPrint ? spMaxPrice + this.preSetPrintPriceRange.max : spMaxPrice;
|
|
189
|
+
const availability = sp.quantityStock > 0 ? 'InStock' : 'OutOfStock';
|
|
190
|
+
|
|
191
|
+
const offer = {
|
|
192
|
+
'@type': 'Offer',
|
|
193
|
+
name: `${sp.size?.name || ''} / ${sp.color?.name || ''}`,
|
|
194
|
+
url,
|
|
195
|
+
availability: `https://schema.org/${availability}`,
|
|
196
|
+
price: +tax(maxPrice, this.gstTax).toFixed(2),
|
|
197
|
+
priceCurrency: 'AUD',
|
|
198
|
+
priceValidUntil: '31-12-2030',
|
|
199
|
+
sku: sp.SKU,
|
|
200
|
+
...(brandAdditionalProductsRichSnippet.offers || {})
|
|
201
|
+
};
|
|
202
|
+
const availableStoreCode = STORE_CODES.find(code => sp.storeCode === code);
|
|
203
|
+
if (availableStoreCode) {
|
|
204
|
+
offer.availableAtOrFrom = {
|
|
205
|
+
'@type': 'Place',
|
|
206
|
+
name: availableStoreCode,
|
|
207
|
+
branchCode: availableStoreCode
|
|
208
|
+
};
|
|
209
|
+
offer.potentialAction = {
|
|
210
|
+
'@type': 'http://schema.org/BuyAction'
|
|
211
|
+
};
|
|
212
|
+
offer.itemCondition = 'https://schema.org/NewCondition';
|
|
213
|
+
offer.availableDeliveryMethod = 'https://schema.org/OnSitePickup';
|
|
214
|
+
offer.deliveryLeadTime = 'https://schema.org/OnSitePickup';
|
|
215
|
+
offer.deliveryLeadTime = {
|
|
216
|
+
'@type': 'http://schema.org/QuantitativeValue',
|
|
217
|
+
value: this.product.sameDayDispatch ? 1 : 0
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
return offer;
|
|
222
|
+
})
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
if (brand) {
|
|
226
|
+
productSchema.brand = {
|
|
227
|
+
'@type': 'Brand',
|
|
228
|
+
logo: staticLink(brand.logo),
|
|
229
|
+
name: brand.name
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if (SKU) {
|
|
234
|
+
productSchema.sku = SKU;
|
|
235
|
+
// schema.gtin = SKU;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
if (aggregateRating?.count > 0) {
|
|
239
|
+
productSchema.aggregateRating = {
|
|
240
|
+
'@type': 'AggregateRating',
|
|
241
|
+
ratingValue: aggregateRating?.value || 0,
|
|
242
|
+
reviewCount: aggregateRating?.count || 0
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
productSchema.review = (reviews || []).map(review => ({
|
|
247
|
+
'@type': 'Review',
|
|
248
|
+
author: {
|
|
249
|
+
'@type': 'Person',
|
|
250
|
+
name: review.name
|
|
251
|
+
},
|
|
252
|
+
datePublished: review.createdAt,
|
|
253
|
+
reviewBody: review.text,
|
|
254
|
+
reviewRating: {
|
|
255
|
+
'@type': 'Rating',
|
|
256
|
+
bestRating: '5',
|
|
257
|
+
ratingValue: review.mark,
|
|
258
|
+
worstRating: '1'
|
|
259
|
+
}
|
|
260
|
+
}));
|
|
261
|
+
|
|
262
|
+
const image = getProductLargeCover(this.product, 'front');
|
|
263
|
+
if (image) {
|
|
264
|
+
productSchema.image = image;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
const breadcrumbSchema = {
|
|
268
|
+
'@context': 'https://schema.org',
|
|
269
|
+
'@type': 'BreadcrumbList',
|
|
270
|
+
itemListElement: [
|
|
271
|
+
{
|
|
272
|
+
'@type': 'ListItem',
|
|
273
|
+
position: 1,
|
|
274
|
+
name: 'Home',
|
|
275
|
+
item: `https://${process.env.HOST_NAME}/`
|
|
276
|
+
},
|
|
277
|
+
...this.breadcrumbs
|
|
278
|
+
.map((b, index) => ({
|
|
279
|
+
'@type': 'ListItem',
|
|
280
|
+
position: index + 2,
|
|
281
|
+
name: b.text,
|
|
282
|
+
item: b.to ? `https://${process.env.HOST_NAME}${b.to}` : undefined
|
|
283
|
+
}))
|
|
284
|
+
]
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
const mainEntity = (this.faqGroups || []).reduce((items, group) => {
|
|
288
|
+
return [
|
|
289
|
+
...items,
|
|
290
|
+
group.entities.map(item => ({
|
|
291
|
+
'@type': 'Question',
|
|
292
|
+
name: item.question,
|
|
293
|
+
acceptedAnswer: {
|
|
294
|
+
'@type': 'Answer',
|
|
295
|
+
text: item.answer
|
|
296
|
+
}
|
|
297
|
+
}))
|
|
298
|
+
];
|
|
299
|
+
}, []);
|
|
300
|
+
|
|
301
|
+
const faqSchema = {
|
|
302
|
+
'@context': 'https://schema.org',
|
|
303
|
+
'@type': 'FAQPage',
|
|
304
|
+
mainEntity
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
return [
|
|
308
|
+
productSchema,
|
|
309
|
+
breadcrumbSchema,
|
|
310
|
+
mainEntity.length > 0 ? faqSchema : null
|
|
311
|
+
].filter(s => !!s);
|
|
312
|
+
}
|
|
313
|
+
});
|
package/nuxt.config.js
CHANGED
|
@@ -129,11 +129,6 @@ module.exports = (config, axios, { raygunClient, publicPath } = {}) => ({
|
|
|
129
129
|
async get() {
|
|
130
130
|
return await feeds.reviewsFeed(axios, config);
|
|
131
131
|
}
|
|
132
|
-
}, {
|
|
133
|
-
path: '/google-shopping.xml',
|
|
134
|
-
async get() {
|
|
135
|
-
return await feeds.googleShoppingFeed(axios, config);
|
|
136
|
-
}
|
|
137
132
|
}],
|
|
138
133
|
router: {
|
|
139
134
|
extendRoutes(routes, resolve) {
|
package/package.json
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="CheckoutCartPage__wrapper">
|
|
3
|
+
<div class="lc_h1 mb-10">
|
|
4
|
+
YOUR CART
|
|
5
|
+
</div>
|
|
6
|
+
<div :data-aos="aosFadeLeft">
|
|
7
|
+
<cart />
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
import metaInfo from '@lancom/shared/mixins/meta-info';
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
name: 'CheckoutCartPage',
|
|
17
|
+
components: {
|
|
18
|
+
Cart: () => import('@lancom/shared/components/checkout/cart/cart')
|
|
19
|
+
},
|
|
20
|
+
mixins: [metaInfo]
|
|
21
|
+
};
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<style lang="scss" scoped>
|
|
25
|
+
@import "@/assets/scss/variables";
|
|
26
|
+
|
|
27
|
+
.CheckoutCartPage {
|
|
28
|
+
&__wrapper {
|
|
29
|
+
margin-top: 50px;
|
|
30
|
+
@media (max-width: $bp-small-max) {
|
|
31
|
+
margin-top: 10px;
|
|
32
|
+
}
|
|
33
|
+
&>.lc_h1 {
|
|
34
|
+
@media (max-width: $bp-small-max) {
|
|
35
|
+
font-size: 25px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:data-aos="aosFadeRight"
|
|
4
|
+
class="CheckoutOrderPage__wrapper">
|
|
5
|
+
<order>
|
|
6
|
+
<cart-price-info
|
|
7
|
+
slot="after-steps"
|
|
8
|
+
class="CheckoutOrderPage__pricing"
|
|
9
|
+
@loaded="loadedPricing($event)" />
|
|
10
|
+
</order>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import { mapGetters } from 'vuex';
|
|
16
|
+
import metaInfo from '@lancom/shared/mixins/meta-info';
|
|
17
|
+
import CartMixin from '@lancom/shared/components/checkout/cart/cart.mixin';
|
|
18
|
+
import gtm from '@lancom/shared/assets/js/utils/gtm';
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
name: 'CheckoutOrderPage',
|
|
22
|
+
components: {
|
|
23
|
+
Order: () => import('@lancom/shared/components/checkout/order/order'),
|
|
24
|
+
CartPriceInfo: () => import('@lancom/shared/components/checkout/cart/cart_price_info/cart-price-info')
|
|
25
|
+
},
|
|
26
|
+
mixins: [metaInfo, CartMixin],
|
|
27
|
+
computed: {
|
|
28
|
+
...mapGetters('cart', ['entities', 'coupon', 'cartPricing'])
|
|
29
|
+
},
|
|
30
|
+
methods: {
|
|
31
|
+
loadedPricing() {
|
|
32
|
+
gtm.push({
|
|
33
|
+
event: 'begin_checkout',
|
|
34
|
+
value: this.cartPricing.totalPriceWithoutTax,
|
|
35
|
+
currency: 'AUD',
|
|
36
|
+
coupon: this.cartPricing.coupon?.code,
|
|
37
|
+
items: this.entities.reduce((products, { guid: productGuid, product, simpleProducts }) => {
|
|
38
|
+
return [
|
|
39
|
+
...products,
|
|
40
|
+
...simpleProducts
|
|
41
|
+
.filter(({ amount }) => amount > 0)
|
|
42
|
+
.map(({ SKU, amount, guid }) => ({
|
|
43
|
+
item_id: SKU,
|
|
44
|
+
item_name: product.name,
|
|
45
|
+
item_brand: product.brand.name,
|
|
46
|
+
price: this.cartPricing.products[productGuid]?.products[guid]?.totalPriceWithoutTax,
|
|
47
|
+
currency: 'AUD',
|
|
48
|
+
quantity: amount
|
|
49
|
+
}))
|
|
50
|
+
];
|
|
51
|
+
}, [])
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
</script>
|
|
57
|
+
|
|
58
|
+
<style lang="scss" scoped>
|
|
59
|
+
@import "@/assets/scss/variables";
|
|
60
|
+
|
|
61
|
+
.CheckoutOrderPage {
|
|
62
|
+
&__pricing {
|
|
63
|
+
width: 413px;
|
|
64
|
+
margin-left: 77px;
|
|
65
|
+
@media (max-width: $bp-small-max) {
|
|
66
|
+
width: auto;
|
|
67
|
+
margin-left: 0;
|
|
68
|
+
margin-top: 30px;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
</style>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:data-aos="aosFadeRight"
|
|
4
|
+
class="CustomerCreatePage__wrapper">
|
|
5
|
+
<customer :active-register="true" />
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
import metaInfo from '@lancom/shared/mixins/meta-info';
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
name: 'CustomerCreatePage',
|
|
14
|
+
components: {
|
|
15
|
+
Customer: () => import('@lancom/shared/components/customer/customer')
|
|
16
|
+
},
|
|
17
|
+
mixins: [metaInfo]
|
|
18
|
+
};
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<style lang="scss" scoped>
|
|
22
|
+
@import "@/assets/scss/variables";
|
|
23
|
+
|
|
24
|
+
.CustomerCreatePage {
|
|
25
|
+
&__wrapper {
|
|
26
|
+
margin: 40px auto;
|
|
27
|
+
width: 700px;
|
|
28
|
+
@media (max-width: $bp-extra-small-max) {
|
|
29
|
+
width: auto;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
</style>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:data-aos="aosFadeLeft"
|
|
4
|
+
class="CustomerUpdate__wrapper">
|
|
5
|
+
<div class="CustomerUpdate__from">
|
|
6
|
+
<div v-if="isSuccessfullySaved" class="alert alert-success">
|
|
7
|
+
Password successfully updated
|
|
8
|
+
<br /><br />
|
|
9
|
+
<a
|
|
10
|
+
href="/customer/signin"
|
|
11
|
+
class="btn-green">
|
|
12
|
+
Go to Sign In
|
|
13
|
+
</a>
|
|
14
|
+
</div>
|
|
15
|
+
<customer-password
|
|
16
|
+
v-else
|
|
17
|
+
:customer="customer"
|
|
18
|
+
@save="onSave" />
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script>
|
|
24
|
+
import api from '@lancom/shared/assets/js/api';
|
|
25
|
+
import metaInfo from '@lancom/shared/mixins/meta-info';
|
|
26
|
+
|
|
27
|
+
export default {
|
|
28
|
+
name: 'CustomerUpdate',
|
|
29
|
+
components: {
|
|
30
|
+
CustomerPassword: () => import('@lancom/shared/components/customer/customer_password/customer-password')
|
|
31
|
+
},
|
|
32
|
+
mixins: [metaInfo],
|
|
33
|
+
async asyncData({ store, params, error }) {
|
|
34
|
+
const shop = store.getters.shop._id;
|
|
35
|
+
try {
|
|
36
|
+
const customer = await api.fetchCustomerByResetToken(params.token, shop);
|
|
37
|
+
return { customer };
|
|
38
|
+
} catch (e) {
|
|
39
|
+
const { status, data } = e?.response || {};
|
|
40
|
+
const statusCode = status || 500;
|
|
41
|
+
error({
|
|
42
|
+
statusCode,
|
|
43
|
+
error: data?.error || 'Token not found'
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
data() {
|
|
48
|
+
return {
|
|
49
|
+
isSuccessfullySaved: false,
|
|
50
|
+
customer: {}
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
methods: {
|
|
54
|
+
onSave(customer) {
|
|
55
|
+
this.isSuccessfullySaved = true;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<style lang="scss" scoped>
|
|
62
|
+
@import "@/assets/scss/variables";
|
|
63
|
+
|
|
64
|
+
.UserUpdate {
|
|
65
|
+
&__wrapper {
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
width: 100%;
|
|
70
|
+
min-height: 100vh;
|
|
71
|
+
}
|
|
72
|
+
&__form {
|
|
73
|
+
width: 400px;
|
|
74
|
+
@media (max-width: $bp-extra-small-max) {
|
|
75
|
+
width: auto;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
</style>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:data-aos="aosFadeLeft"
|
|
4
|
+
class="CustomerRecoveryPage__wrapper">
|
|
5
|
+
<customer-recovery />
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
import metaInfo from '@lancom/shared/mixins/meta-info';
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
name: 'CustomerRecoveryPage',
|
|
14
|
+
components: {
|
|
15
|
+
CustomerRecovery: () => import('@lancom/shared/components/pages/customer/recovery/recovery')
|
|
16
|
+
},
|
|
17
|
+
mixins: [metaInfo]
|
|
18
|
+
};
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<style lang="scss" scoped>
|
|
22
|
+
@import "@/assets/scss/variables";
|
|
23
|
+
|
|
24
|
+
.CustomerRecoveryPage {
|
|
25
|
+
&__wrapper {
|
|
26
|
+
margin: 100px auto;
|
|
27
|
+
width: 500px;
|
|
28
|
+
@media (max-width: $bp-extra-small-max) {
|
|
29
|
+
width: auto;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
</style>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:data-aos="aosFadeRight"
|
|
4
|
+
class="CustomerSettingsPage__wrapper">
|
|
5
|
+
<customer-settings />
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
import metaInfo from '@lancom/shared/mixins/meta-info';
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
name: 'CustomerCreatePage',
|
|
14
|
+
components: {
|
|
15
|
+
CustomerSettings: () => import('@lancom/shared/components/pages/customer/settings/settings')
|
|
16
|
+
},
|
|
17
|
+
mixins: [metaInfo]
|
|
18
|
+
};
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<style lang="scss" scoped>
|
|
22
|
+
@import "@/assets/scss/variables";
|
|
23
|
+
|
|
24
|
+
.CustomerSettingsPage {
|
|
25
|
+
&__wrapper {
|
|
26
|
+
margin: 100px auto;
|
|
27
|
+
width: 500px;
|
|
28
|
+
@media (max-width: $bp-extra-small-max) {
|
|
29
|
+
width: auto;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
</style>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:data-aos="aosFadeLeft"
|
|
4
|
+
class="CustomerSigninPage__wrapper">
|
|
5
|
+
<customer />
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
import metaInfo from '@lancom/shared/mixins/meta-info';
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
name: 'CustomerSigninPage',
|
|
14
|
+
components: {
|
|
15
|
+
Customer: () => import('@lancom/shared/components/customer/customer')
|
|
16
|
+
},
|
|
17
|
+
mixins: [metaInfo]
|
|
18
|
+
};
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<style lang="scss" scoped>
|
|
22
|
+
@import "@/assets/scss/variables";
|
|
23
|
+
|
|
24
|
+
.CustomerSigninPage {
|
|
25
|
+
&__wrapper {
|
|
26
|
+
margin: 50px auto;
|
|
27
|
+
width: 700px;
|
|
28
|
+
@media (max-width: $bp-extra-small-max) {
|
|
29
|
+
width: auto;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
</style>
|