@lancom/shared 0.0.435 → 0.0.436
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/components/common/payment/payment_card/googlepay/googlepay.vue +1 -1
- package/components/editor/editor_layers/editor-layers.scss +10 -0
- package/components/editor/editor_layers/editor-layers.vue +22 -13
- package/components/editor/editor_layers/editor_layer_forms/editor_layer_form_text/editor-layer-form-text.scss +1 -1
- package/components/editor/editor_layers/editor_layer_forms/editor_layer_form_text/editor-layer-form-text.vue +1 -1
- package/components/editor/editor_print_area_options/editor_print_area_option/editor-print-area-option.scss +5 -2
- package/components/editor/editor_product_details/editor-product-details.vue +1 -1
- package/components/editor/editor_workspace/editor-workspace.vue +2 -1
- package/components/editor/editor_workspace/editor_workspace_side/editor-workspace-side.vue +7 -4
- package/components/email_link/email-link.vue +22 -7
- package/components/product/add-to-cart-btn.vue +5 -1
- package/components/product/editor_pricing/editor-pricing.scss +3 -0
- package/components/product/editor_pricing/editor-pricing.vue +59 -51
- package/components/product/layouts/product_colors_selector/product_colors_selector_options/product-colors-selector-options.scss +15 -3
- package/components/product/layouts/product_colors_selector/product_colors_selector_options/product-colors-selector-options.vue +9 -1
- package/components/product/product_color_image/product-color-image.scss +1 -1
- package/components/product/product_pricing_tiers/product-pricing-tiers.vue +1 -1
- package/components/product/products_multipacks_size_selector_color/products-multipacks-size-selector-color.vue +1 -1
- package/components/product/products_size_selector_color/product_size_selector_color/product-size-selector-color.vue +35 -9
- package/feeds/google-shopping.js +1 -1
- package/mixins/add-to-cart.js +7 -5
- package/mixins/product-view.js +1 -1
- package/package.json +1 -1
- package/pages/checkout/order.vue +3 -2
- package/store/product.js +11 -2
|
@@ -21,7 +21,16 @@
|
|
|
21
21
|
<i class="icon-arrow-left EditorLayers__close-editable-icon"></i>
|
|
22
22
|
See all design layers
|
|
23
23
|
</div>
|
|
24
|
-
<div>
|
|
24
|
+
<div class="EditorLayers__controls">
|
|
25
|
+
<editor-print-area-options
|
|
26
|
+
v-if="selectedLayer"
|
|
27
|
+
:selected="selectedLayerPrintArea"
|
|
28
|
+
:side="selectedLayer.sideId"
|
|
29
|
+
:product="product"
|
|
30
|
+
:layers="editableLayers"
|
|
31
|
+
@select="handlePrintAreaSelect"
|
|
32
|
+
@option-mouseover="toogleBoundBox(true, $event)"
|
|
33
|
+
@option-mouseleave="toogleBoundBox(false, $event)" />
|
|
25
34
|
<btn
|
|
26
35
|
btn-class="green"
|
|
27
36
|
btn-label="Save"
|
|
@@ -29,15 +38,6 @@
|
|
|
29
38
|
</div>
|
|
30
39
|
</div>
|
|
31
40
|
</template>
|
|
32
|
-
<template #after-canvas="{ invalid }">
|
|
33
|
-
<editor-print-area-options
|
|
34
|
-
v-if="selectedLayer"
|
|
35
|
-
:selected="selectedLayerPrintArea"
|
|
36
|
-
:side="selectedLayer.sideId"
|
|
37
|
-
:product="product"
|
|
38
|
-
:layers="editableLayers"
|
|
39
|
-
@select="handlePrintAreaSelect" />
|
|
40
|
-
</template>
|
|
41
41
|
</component>
|
|
42
42
|
</div>
|
|
43
43
|
<div
|
|
@@ -163,7 +163,8 @@ export default {
|
|
|
163
163
|
'selectedLayer',
|
|
164
164
|
'editModeSelectedLayer',
|
|
165
165
|
'editableSide',
|
|
166
|
-
'selectedPrintArea'
|
|
166
|
+
'selectedPrintArea',
|
|
167
|
+
'editablePrintArea'
|
|
167
168
|
]),
|
|
168
169
|
editableLayerType() {
|
|
169
170
|
return this.selectedLayer ? `editor-layer-form-${this.selectedLayer.type}` : null;
|
|
@@ -217,7 +218,8 @@ export default {
|
|
|
217
218
|
'updateTemplateLayer',
|
|
218
219
|
'setEditableSide',
|
|
219
220
|
'setSelectedPrintArea',
|
|
220
|
-
'setEditablePrintArea'
|
|
221
|
+
'setEditablePrintArea',
|
|
222
|
+
'setPreviewPrintArea'
|
|
221
223
|
]),
|
|
222
224
|
...mapActions(['increaseLayersUpdatesCount']),
|
|
223
225
|
openSelectedLayerGroup(selected) {
|
|
@@ -284,7 +286,14 @@ export default {
|
|
|
284
286
|
|
|
285
287
|
const printSize = printArea.printSize._id;
|
|
286
288
|
this.setLayerField({ field: 'printSize', value: printSize });
|
|
287
|
-
|
|
289
|
+
|
|
290
|
+
this.toggleOpenedGroup(printArea, true);
|
|
291
|
+
},
|
|
292
|
+
toogleBoundBox(state, option) {
|
|
293
|
+
if (option) {
|
|
294
|
+
const printArea = state ? option.printArea : this.editablePrintArea;
|
|
295
|
+
this.setPreviewPrintArea(printArea);
|
|
296
|
+
}
|
|
288
297
|
}
|
|
289
298
|
}
|
|
290
299
|
};
|
|
@@ -309,7 +309,7 @@ export default {
|
|
|
309
309
|
initFabricCanvas() {
|
|
310
310
|
if (this.$refs.previewCanvas) {
|
|
311
311
|
this.fabricCanvas = new fabric.Canvas(this.$refs.previewCanvas, {
|
|
312
|
-
width: this.$refs.previewCanvas.parentElement.offsetWidth,
|
|
312
|
+
width: this.$refs.previewCanvas.parentElement.offsetWidth - 100,
|
|
313
313
|
height: 200,
|
|
314
314
|
uniScaleTransform: false
|
|
315
315
|
});
|
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
&.selected {
|
|
18
18
|
background-color: $green;
|
|
19
19
|
}
|
|
20
|
+
> * {
|
|
21
|
+
pointer-events: none;
|
|
22
|
+
}
|
|
20
23
|
}
|
|
21
24
|
&__info {
|
|
22
25
|
text-align: center;
|
|
@@ -51,7 +54,7 @@
|
|
|
51
54
|
}
|
|
52
55
|
}
|
|
53
56
|
}
|
|
54
|
-
|
|
57
|
+
|
|
55
58
|
// TEE - FRONT
|
|
56
59
|
@each $position in center, left, right {
|
|
57
60
|
&.front.tee.#{$position} {
|
|
@@ -72,4 +75,4 @@
|
|
|
72
75
|
background-image: url(./../../../../static/icons/print-area/sleeve-right_tee_right.svg);
|
|
73
76
|
}
|
|
74
77
|
}
|
|
75
|
-
}
|
|
78
|
+
}
|
|
@@ -224,7 +224,7 @@ export default {
|
|
|
224
224
|
const name = this.product.name;
|
|
225
225
|
const color = this.availableColors?.find(c => c.alias === this.$route.query?.color);
|
|
226
226
|
const size = this.availableSizes?.find(c => c.shortName === this.$route.query?.size);
|
|
227
|
-
return `${name}${(color || size) ? ` | ${[color?.name, size?.
|
|
227
|
+
return `${name}${(color || size) ? ` | ${[color?.name, size?.name].filter(i => !!i).join(', ') || ''}` : ''}`;
|
|
228
228
|
},
|
|
229
229
|
hasImages() {
|
|
230
230
|
return this.modelImages.length > 0;
|
|
@@ -115,7 +115,8 @@
|
|
|
115
115
|
:side="editableSide.id"
|
|
116
116
|
:layers="editableLayers"
|
|
117
117
|
@select="selectPrintArea"
|
|
118
|
-
@option-mouseover="toogleBoundBox(true, $event)"
|
|
118
|
+
@option-mouseover="toogleBoundBox(true, $event)"
|
|
119
|
+
@option-mouseleave="toogleBoundBox(false, $event)">
|
|
119
120
|
</editor-print-area-options>
|
|
120
121
|
</div>
|
|
121
122
|
</div>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
+
v-click-outside="onOutsideClick"
|
|
3
4
|
class="EditorWorkspaceSide__wrapper"
|
|
4
5
|
:style="backgroundColor"
|
|
5
6
|
:class="{
|
|
6
7
|
'EditorWorkspaceSide__wrapper--zoom-in': isZoomed
|
|
7
8
|
}"
|
|
8
|
-
v-click-outside="onOutsideClick"
|
|
9
9
|
@mouseover="toogleBoundBox(true)"
|
|
10
10
|
@mouseup="toggleOnpressImage(false)">
|
|
11
11
|
<div
|
|
@@ -210,7 +210,8 @@ export default {
|
|
|
210
210
|
'editModeSelectedLayer',
|
|
211
211
|
'offsetWarningVisible',
|
|
212
212
|
'showRecommendationToUseLargerImage',
|
|
213
|
-
'showErrorAboutSmallImage'
|
|
213
|
+
'showErrorAboutSmallImage',
|
|
214
|
+
'previewPrintArea'
|
|
214
215
|
]),
|
|
215
216
|
editableLayersCount() {
|
|
216
217
|
return this.editableLayers?.length;
|
|
@@ -301,6 +302,10 @@ export default {
|
|
|
301
302
|
this.fabricHelper.setPrintArea(value, this.editorSize, this.product);
|
|
302
303
|
this.redraw();
|
|
303
304
|
},
|
|
305
|
+
previewPrintArea(value) {
|
|
306
|
+
this.fabricHelper.setPrintArea(value, this.editorSize, this.product);
|
|
307
|
+
this.redraw();
|
|
308
|
+
},
|
|
304
309
|
zoomSize() {
|
|
305
310
|
this.handleWorkspaceSize();
|
|
306
311
|
}
|
|
@@ -498,8 +503,6 @@ export default {
|
|
|
498
503
|
const area = state ? option.printArea : this.printArea;
|
|
499
504
|
this.fabricHelper.setPrintArea(area, this.editorSize, this.product);
|
|
500
505
|
}
|
|
501
|
-
|
|
502
|
-
this.fabricHelper.background.toggleBorder(state);
|
|
503
506
|
}
|
|
504
507
|
}
|
|
505
508
|
};
|
|
@@ -1,22 +1,37 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<a
|
|
2
|
+
<a
|
|
3
|
+
v-if="emailDisplaySSR"
|
|
4
|
+
:href="`mailto:${emailAddress}`">{{ emailAddress }}</a>
|
|
5
|
+
<a
|
|
6
|
+
v-else
|
|
7
|
+
ref="link"></a>
|
|
3
8
|
</template>
|
|
4
|
-
|
|
9
|
+
|
|
5
10
|
<script>
|
|
11
|
+
import { mapGetters } from 'vuex';
|
|
12
|
+
|
|
6
13
|
export default {
|
|
7
14
|
name: 'EmailLink',
|
|
8
15
|
props: {
|
|
9
16
|
email: {
|
|
10
|
-
type: Array
|
|
17
|
+
type: [Array, String],
|
|
11
18
|
required: true
|
|
12
19
|
}
|
|
13
20
|
},
|
|
21
|
+
computed: {
|
|
22
|
+
...mapGetters(['SETTINGS']),
|
|
23
|
+
emailAddress() {
|
|
24
|
+
return (Array.isArray(this.email) ? this.email : [this.email]).join('@');
|
|
25
|
+
},
|
|
26
|
+
emailDisplaySSR() {
|
|
27
|
+
return !!this.SETTINGS?.EMAIL_DISPLAY_SSR;
|
|
28
|
+
}
|
|
29
|
+
},
|
|
14
30
|
mounted() {
|
|
15
|
-
if (
|
|
16
|
-
const email = (Array.isArray(this.email) ? this.email : [this.email]).join('@');
|
|
31
|
+
if (!this.emailDisplaySSR) {
|
|
17
32
|
const linkEl = this.$refs.link;
|
|
18
|
-
linkEl.href = `mailto:${
|
|
19
|
-
linkEl.textContent =
|
|
33
|
+
linkEl.href = `mailto:${this.emailAddress}`;
|
|
34
|
+
linkEl.textContent = this.emailAddress;
|
|
20
35
|
}
|
|
21
36
|
}
|
|
22
37
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<btn
|
|
3
3
|
:btn-class="btnClass"
|
|
4
4
|
btn-label="Add to cart"
|
|
5
|
-
:btn-disabled="addToCartDisabled"
|
|
5
|
+
:btn-disabled="!allowClick && addToCartDisabled"
|
|
6
6
|
:btn-processing="addingToCart"
|
|
7
7
|
@onclick="proceedToCard">
|
|
8
8
|
<template slot="icon-before">
|
|
@@ -21,6 +21,10 @@ export default {
|
|
|
21
21
|
btnClass: {
|
|
22
22
|
type: String,
|
|
23
23
|
default: 'green'
|
|
24
|
+
},
|
|
25
|
+
allowClick: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false
|
|
24
28
|
}
|
|
25
29
|
}
|
|
26
30
|
};
|
|
@@ -6,65 +6,68 @@
|
|
|
6
6
|
class="EditorPricing__details">
|
|
7
7
|
<editor-pricing-details />
|
|
8
8
|
</div>
|
|
9
|
-
|
|
10
9
|
<div
|
|
11
|
-
v-if="
|
|
12
|
-
class="
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
v-if="visibleAlert"
|
|
11
|
+
class="EditorPricing__alerts-wrapper">
|
|
12
|
+
<div
|
|
13
|
+
v-if="addedToCart"
|
|
14
|
+
class="EditorPricing__main-alert">
|
|
15
|
+
<img src="~static/images/smile.svg" />
|
|
16
|
+
Products have been added to cart
|
|
17
|
+
</div>
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
<div
|
|
20
|
+
v-else-if="!hasUsedSimpleProducts && (!layers.length && isPrintPricing)"
|
|
21
|
+
class="EditorPricing__main-alert">
|
|
22
|
+
<img src="~static/images/sad.svg" />
|
|
23
|
+
No products selected and no prints defined
|
|
24
|
+
</div>
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
<div
|
|
27
|
+
v-else-if="hasUsedSimpleProducts && ((!isValidPrintOnly || !layers.length && isPrintPricing))"
|
|
28
|
+
class="EditorPricing__main-alert">
|
|
29
|
+
<img src="~static/images/sad.svg" />
|
|
30
|
+
No prints defined
|
|
31
|
+
</div>
|
|
30
32
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
<div
|
|
34
|
+
v-else-if="!hasUsedSimpleProducts && layers.length"
|
|
35
|
+
class="EditorPricing__main-alert">
|
|
36
|
+
<img src="~static/images/sad.svg" />
|
|
37
|
+
<a
|
|
38
|
+
href="#"
|
|
39
|
+
@click.prevent.stop="$emit('choose-products')">
|
|
40
|
+
Please enter the quantity required
|
|
41
|
+
</a>
|
|
42
|
+
</div>
|
|
41
43
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
<div
|
|
45
|
+
v-else-if="!isValidMiltipackOrderQuantity"
|
|
46
|
+
class="EditorPricing__main-alert">
|
|
47
|
+
<img src="~static/images/sad.svg" />
|
|
48
|
+
bulk pack {{ multipack.qty }} - add more x {{ multipack.qty - usedSimpleProductsQuantity }}
|
|
49
|
+
</div>
|
|
48
50
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
<div
|
|
52
|
+
v-else-if="!isValidOrderQuantity && isValidBigSizeOrderQuantity && minimumOrderQuantity > 1"
|
|
53
|
+
class="EditorPricing__main-alert">
|
|
54
|
+
<img src="~static/images/sad.svg" />
|
|
55
|
+
Minimum order of these items must be {{ minimumOrderQuantity }} or more
|
|
56
|
+
</div>
|
|
55
57
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
<div
|
|
59
|
+
v-else-if="!isValidBigSizeOrderQuantity"
|
|
60
|
+
class="EditorPricing__main-alert">
|
|
61
|
+
<img src="~static/images/sad.svg" />
|
|
62
|
+
Minimum order of 5XL-7XL should be 50%
|
|
63
|
+
</div>
|
|
62
64
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
<div
|
|
66
|
+
v-else-if="isValidOrderQuantity"
|
|
67
|
+
class="EditorPricing__main-alert">
|
|
68
|
+
<img src="~static/images/smile.svg" />
|
|
69
|
+
{{ hasPrintIssues ? 'Proceed with order, Will be in touch regarding print issue' : 'All good to go!' }}
|
|
70
|
+
</div>
|
|
68
71
|
</div>
|
|
69
72
|
|
|
70
73
|
<div
|
|
@@ -129,10 +132,15 @@ export default {
|
|
|
129
132
|
hasPricing: {
|
|
130
133
|
type: Boolean,
|
|
131
134
|
default: true
|
|
135
|
+
},
|
|
136
|
+
visibleAlert: {
|
|
137
|
+
type: Boolean,
|
|
138
|
+
default: true
|
|
132
139
|
}
|
|
133
140
|
},
|
|
134
141
|
data() {
|
|
135
142
|
return {
|
|
143
|
+
clickedAddToCart: false,
|
|
136
144
|
price: null,
|
|
137
145
|
showDetails: false,
|
|
138
146
|
calculatePriceWithDebounce: debounce(() => this.calculateProductPrice({ shop: this.shop, country: this.country, currency: this.currency }), 500)
|
|
@@ -45,6 +45,18 @@
|
|
|
45
45
|
&-selected-icon {
|
|
46
46
|
position: absolute;
|
|
47
47
|
}
|
|
48
|
+
&>i {
|
|
49
|
+
position: absolute;
|
|
50
|
+
z-index: 3;
|
|
51
|
+
top: -3px;
|
|
52
|
+
right: -5px;
|
|
53
|
+
color: $purple;
|
|
54
|
+
background-color: white;
|
|
55
|
+
border-radius: 50%;
|
|
56
|
+
padding: 3px 0;
|
|
57
|
+
font-size: 15px;
|
|
58
|
+
box-shadow: 0 0 2px grey;
|
|
59
|
+
}
|
|
48
60
|
}
|
|
49
61
|
&__products-count {
|
|
50
62
|
position: absolute;
|
|
@@ -58,11 +70,11 @@
|
|
|
58
70
|
font-weight: bold;
|
|
59
71
|
font-size: 12px;
|
|
60
72
|
line-height: 16px;
|
|
61
|
-
text-align: center;
|
|
73
|
+
text-align: center;
|
|
62
74
|
span:not(:empty) {
|
|
63
75
|
background-color: white;
|
|
64
76
|
border-radius: 50%;
|
|
65
77
|
width: 16px;
|
|
66
78
|
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
class="ProductColorsSelectorOptions__color"
|
|
8
8
|
:class="{ selected: editableColor === color }"
|
|
9
9
|
@click="toggleSelection(color)">
|
|
10
|
+
<i
|
|
11
|
+
v-if="isClearanceColor(color)"
|
|
12
|
+
v-tooltip="'Clearance'"
|
|
13
|
+
class="icon-percent"></i>
|
|
10
14
|
<product-color-image
|
|
11
15
|
:color="color"
|
|
12
16
|
:lazy="true"
|
|
@@ -44,7 +48,8 @@ export default {
|
|
|
44
48
|
'template',
|
|
45
49
|
'editableColor',
|
|
46
50
|
'simpleProducts',
|
|
47
|
-
'templateColors'
|
|
51
|
+
'templateColors',
|
|
52
|
+
'product'
|
|
48
53
|
])
|
|
49
54
|
},
|
|
50
55
|
mounted() {
|
|
@@ -67,6 +72,9 @@ export default {
|
|
|
67
72
|
},
|
|
68
73
|
countColorProducts({ _id }) {
|
|
69
74
|
return this.simpleProducts.reduce((count, { color, amount }) => color._id === _id ? count + (amount || 0) : count, 0);
|
|
75
|
+
},
|
|
76
|
+
isClearanceColor(color) {
|
|
77
|
+
return this.product.colorsPricing?.some(c => c.colors?.includes(color._id) && c.clearance);
|
|
70
78
|
}
|
|
71
79
|
}
|
|
72
80
|
};
|
|
@@ -44,7 +44,7 @@ export default {
|
|
|
44
44
|
...mapGetters('product', ['product', 'editableColor', 'priceIncludeGST', 'isPrintPricing', 'printsPrice', 'defaultSimpleProduct']),
|
|
45
45
|
...mapGetters(['pricingSettings', 'currency']),
|
|
46
46
|
visibleTiers() {
|
|
47
|
-
const pricing = this.defaultSimpleProduct
|
|
47
|
+
const pricing = this.defaultSimpleProduct?.pricing || [];
|
|
48
48
|
return pricing.map(p => ({ ...p, price: p.price + this.printsPrice }));
|
|
49
49
|
}
|
|
50
50
|
},
|
|
@@ -46,16 +46,42 @@
|
|
|
46
46
|
</div>
|
|
47
47
|
</template>
|
|
48
48
|
</v-popover>
|
|
49
|
-
<
|
|
49
|
+
<v-popover
|
|
50
50
|
v-if="printsPrice > 0"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
trigger="hover"
|
|
52
|
+
:delay="{ show: 200, hide: 400 }"
|
|
53
|
+
popover-class="tooltip popover white"
|
|
54
|
+
class="ProductSizeSelectorColor__price ml-6"
|
|
55
|
+
style="display: inline-block;">
|
|
56
|
+
<span class="lc_regular13">
|
|
57
|
+
{{ productPrintsPrice | price(currency) }}
|
|
58
|
+
</span>
|
|
59
|
+
<template slot="popover">
|
|
60
|
+
<div>
|
|
61
|
+
<table class="lc_table bordered">
|
|
62
|
+
<thead>
|
|
63
|
+
<tr class="highlighted">
|
|
64
|
+
<th>Area</th>
|
|
65
|
+
<th>Size</th>
|
|
66
|
+
<th>Type</th>
|
|
67
|
+
<th>Price</th>
|
|
68
|
+
</tr>
|
|
69
|
+
</thead>
|
|
70
|
+
<tbody>
|
|
71
|
+
<tr
|
|
72
|
+
v-for="(print, index) in productPricingPrints"
|
|
73
|
+
:key="index">
|
|
74
|
+
<td>{{ print.printArea ? print.printArea.name : '' }}</td>
|
|
75
|
+
<td>{{ print.printSize ? print.printSize.name : '' }}</td>
|
|
76
|
+
<td>{{ print.printType ? print.printType.name : '' }}</td>
|
|
77
|
+
<td>{{ (withGst ? print.price : print.priceWithoutTax) | price(currency) }}</td>
|
|
78
|
+
</tr>
|
|
79
|
+
</tbody>
|
|
80
|
+
</table>
|
|
81
|
+
</div>
|
|
82
|
+
</template>
|
|
83
|
+
</v-popover>
|
|
57
84
|
</div>
|
|
58
|
-
|
|
59
85
|
</div>
|
|
60
86
|
<div class="hidden-md-and-up">
|
|
61
87
|
<div
|
|
@@ -126,7 +152,7 @@ export default {
|
|
|
126
152
|
}
|
|
127
153
|
},
|
|
128
154
|
computed: {
|
|
129
|
-
...mapGetters('product', ['isPrintPricing', 'usedSimpleProductsQuantity', 'printsPrice']),
|
|
155
|
+
...mapGetters('product', ['isPrintPricing', 'usedSimpleProductsQuantity', 'printsPrice', 'productPricingPrints']),
|
|
130
156
|
...mapGetters(['gstTax', 'currency']),
|
|
131
157
|
currentQuantityStockLabel() {
|
|
132
158
|
return this.currentQuantityStock > 100 ? '100+' : this.currentQuantityStock;
|
package/feeds/google-shopping.js
CHANGED
|
@@ -106,7 +106,7 @@ async function googleShoppingFeed(axios, config, availableStores, country, isEdi
|
|
|
106
106
|
info['g:sale_price'] = { _text: `${(sp.clearancePrice)} ${sp.currencyCode || 'AUD'}` };
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
if (sp.storeCode) {
|
|
109
|
+
if (sp.storeCode && !config.IGNORE_STORE_CODE) {
|
|
110
110
|
info['g:store_code'] = { _text: sp.storeCode };
|
|
111
111
|
info['g:link_template'] = { _text: `${link}&store={store_code}` };
|
|
112
112
|
if (availableStores) {
|
package/mixins/add-to-cart.js
CHANGED
|
@@ -51,6 +51,7 @@ export default {
|
|
|
51
51
|
...mapMutations('layers', ['resetLayers']),
|
|
52
52
|
async proceedToCard() {
|
|
53
53
|
if (this.addingToCart || this.addToCartDisabled) {
|
|
54
|
+
this.$emit('proceed', false);
|
|
54
55
|
return;
|
|
55
56
|
}
|
|
56
57
|
try {
|
|
@@ -65,20 +66,21 @@ export default {
|
|
|
65
66
|
googleClickId: this.googleClickId
|
|
66
67
|
});
|
|
67
68
|
this.$toastr.s('Products successfully added to cart');
|
|
68
|
-
|
|
69
|
+
|
|
69
70
|
this.clearTemplate(true);
|
|
70
|
-
|
|
71
|
+
|
|
71
72
|
this.calculateCartPrice({ shop: this.shop, country: this.country, currency: this.currency });
|
|
72
|
-
|
|
73
|
+
|
|
73
74
|
// this.resetLayers();
|
|
74
75
|
// this.setIsPrintPricing(false);
|
|
75
76
|
setTimeout(() => {
|
|
76
77
|
this.addedToCart = true;
|
|
77
78
|
});
|
|
78
|
-
} catch (e) {
|
|
79
|
+
} catch (e) {
|
|
79
80
|
} finally {
|
|
80
81
|
this.addingToCart = false;
|
|
81
82
|
}
|
|
83
|
+
this.$emit('proceed', true);
|
|
82
84
|
}
|
|
83
85
|
}
|
|
84
|
-
};
|
|
86
|
+
};
|
package/mixins/product-view.js
CHANGED
|
@@ -289,7 +289,7 @@ export default (IS_PRODUCT_PRESET_PRINT_PRICING, isEditor = false) => ({
|
|
|
289
289
|
url,
|
|
290
290
|
availability: `https://schema.org/${availability}`,
|
|
291
291
|
price: +tax(maxPrice, this.gstTax).toFixed(2),
|
|
292
|
-
priceCurrency: 'AUD',
|
|
292
|
+
priceCurrency: this.currency?.isoCode || 'AUD',
|
|
293
293
|
priceValidUntil: '31-12-2030',
|
|
294
294
|
sku: sp.SKU,
|
|
295
295
|
...(brandAdditionalProductsRichSnippet.offers || {})
|
package/package.json
CHANGED
package/pages/checkout/order.vue
CHANGED
|
@@ -43,6 +43,7 @@ export default {
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
computed: {
|
|
46
|
+
...mapGetters(['currency']),
|
|
46
47
|
...mapGetters('cart', ['entitiesWithoutFreeProducts', 'entities', 'coupon', 'cartPricing'])
|
|
47
48
|
},
|
|
48
49
|
methods: {
|
|
@@ -50,7 +51,7 @@ export default {
|
|
|
50
51
|
gtm.push({
|
|
51
52
|
event: 'begin_checkout',
|
|
52
53
|
value: this.cartPricing.totalPriceWithoutTax,
|
|
53
|
-
currency: 'AUD',
|
|
54
|
+
currency: this.currency ? this.currency.isoCode : 'AUD',
|
|
54
55
|
coupon: this.cartPricing.coupon?.code,
|
|
55
56
|
items: this.entitiesWithoutFreeProducts.reduce((products, { guid: productGuid, product, simpleProducts }) => {
|
|
56
57
|
return [
|
|
@@ -62,7 +63,7 @@ export default {
|
|
|
62
63
|
item_name: product.name,
|
|
63
64
|
item_brand: product.brand.name,
|
|
64
65
|
price: this.cartPricing.products[productGuid]?.products[guid]?.totalPriceWithoutTax,
|
|
65
|
-
currency: 'AUD',
|
|
66
|
+
currency: this.currency ? this.currency.isoCode : 'AUD',
|
|
66
67
|
quantity: amount
|
|
67
68
|
}))
|
|
68
69
|
];
|
package/store/product.js
CHANGED
|
@@ -17,7 +17,7 @@ export const state = () => ({
|
|
|
17
17
|
loadingProductDetails: false,
|
|
18
18
|
productDetailsKey: Date.now(),
|
|
19
19
|
images: [],
|
|
20
|
-
priceIncludeGST:
|
|
20
|
+
priceIncludeGST: true,
|
|
21
21
|
product: null,
|
|
22
22
|
preSetPrints: null,
|
|
23
23
|
loadError: null,
|
|
@@ -58,6 +58,7 @@ export const state = () => ({
|
|
|
58
58
|
selectedPrintAreas: {},
|
|
59
59
|
productPricing: null,
|
|
60
60
|
selectedTab: null,
|
|
61
|
+
previewPrintArea: null,
|
|
61
62
|
layersUpdatesCount: 0,
|
|
62
63
|
editableSide: { id: 'front' }
|
|
63
64
|
});
|
|
@@ -173,6 +174,10 @@ export const getters = {
|
|
|
173
174
|
const pricePrintsPrice = pricing?.prints?.prints?.reduce((sum, print) => sum + (+print.priceWithoutTax || 0), 0);
|
|
174
175
|
return pricePrintsPrice >= 0 ? pricePrintsPrice : maxPrintsPrice;
|
|
175
176
|
},
|
|
177
|
+
productPricingPrints: ({ productPricing, product }) => {
|
|
178
|
+
const pricing = (productPricing?.products || {})[product._id];
|
|
179
|
+
return pricing?.prints?.prints || [];
|
|
180
|
+
},
|
|
176
181
|
offsetWarningVisible: ({ offsetWarningVisible }) => offsetWarningVisible,
|
|
177
182
|
showRecommendationToUseLargerImage: ({ selectedLayer }) => {
|
|
178
183
|
return (
|
|
@@ -208,7 +213,8 @@ export const getters = {
|
|
|
208
213
|
} else {
|
|
209
214
|
return PRODUCT_STOCK_STATUS.NOT_IN_STOCK;
|
|
210
215
|
}
|
|
211
|
-
}
|
|
216
|
+
},
|
|
217
|
+
previewPrintArea: ({ previewPrintArea }) => previewPrintArea
|
|
212
218
|
};
|
|
213
219
|
|
|
214
220
|
export const actions = {
|
|
@@ -634,6 +640,9 @@ export const mutations = {
|
|
|
634
640
|
},
|
|
635
641
|
setCalculatingPrice(state, calculatingPrice) {
|
|
636
642
|
state.calculatingPrice = calculatingPrice;
|
|
643
|
+
},
|
|
644
|
+
setPreviewPrintArea(state, previewPrintArea) {
|
|
645
|
+
state.previewPrintArea = previewPrintArea;
|
|
637
646
|
}
|
|
638
647
|
};
|
|
639
648
|
|