@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,128 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<tr class="ProductSizeSelectorColor__wrapper">
|
|
3
|
+
<td
|
|
4
|
+
v-if="rowspan"
|
|
5
|
+
:rowspan="rowspan"
|
|
6
|
+
class="ProductSizeSelectorColor__color-name">
|
|
7
|
+
<span>
|
|
8
|
+
{{ product.color.name }}
|
|
9
|
+
</span>
|
|
10
|
+
</td>
|
|
11
|
+
<td
|
|
12
|
+
class="ProductSizeSelectorColor__size hidden-sm-and-down"
|
|
13
|
+
:class="{ disabled }">
|
|
14
|
+
{{ product.size.shortName }}
|
|
15
|
+
</td>
|
|
16
|
+
<td
|
|
17
|
+
:class="{ disabled }">
|
|
18
|
+
<div class="lc_regular14 hidden-md-and-up">
|
|
19
|
+
{{ product.size.shortName }}
|
|
20
|
+
</div>
|
|
21
|
+
<v-popover
|
|
22
|
+
trigger="hover"
|
|
23
|
+
:delay="{ show: 200, hide: 400 }"
|
|
24
|
+
popover-class="tooltip popover white"
|
|
25
|
+
class="ProductSizeSelectorColor__price">
|
|
26
|
+
<span>
|
|
27
|
+
{{ productPrice | price(currency) }}
|
|
28
|
+
</span>
|
|
29
|
+
<template slot="popover">
|
|
30
|
+
<div>
|
|
31
|
+
<pricing-discounts-table
|
|
32
|
+
:with-gst="withGst"
|
|
33
|
+
:prices="pricing"
|
|
34
|
+
:amount="usedSimpleProductsQuantity" />
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
</v-popover>
|
|
38
|
+
<div class="hidden-md-and-up">
|
|
39
|
+
<div
|
|
40
|
+
v-if="product.quantityStock"
|
|
41
|
+
class="ProductSizeSelectorColor__in-stock">
|
|
42
|
+
{{ currentQuantityStock }} in stock
|
|
43
|
+
</div>
|
|
44
|
+
<div
|
|
45
|
+
v-else
|
|
46
|
+
class="ProductSizeSelectorColor__out-stock">
|
|
47
|
+
out of stock
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</td>
|
|
51
|
+
<td class="ProductSizeSelectorColor__stock hidden-sm-and-down">
|
|
52
|
+
<div
|
|
53
|
+
v-if="product.quantityStock"
|
|
54
|
+
class="ProductSizeSelectorColor__in-stock">
|
|
55
|
+
{{ currentQuantityStock }} in stock
|
|
56
|
+
</div>
|
|
57
|
+
<div
|
|
58
|
+
v-else
|
|
59
|
+
class="ProductSizeSelectorColor__out-stock">
|
|
60
|
+
out of stock
|
|
61
|
+
</div>
|
|
62
|
+
</td>
|
|
63
|
+
<td class="ProductSizeSelectorColor__cell">
|
|
64
|
+
<product-size-selector-color-cell
|
|
65
|
+
:side-controls="true"
|
|
66
|
+
:show-max-modal="false"
|
|
67
|
+
:out-stock="disabled"
|
|
68
|
+
:color="product.color"
|
|
69
|
+
:size="product.size" />
|
|
70
|
+
</td>
|
|
71
|
+
</tr>
|
|
72
|
+
</template>
|
|
73
|
+
|
|
74
|
+
<script>
|
|
75
|
+
import { mapGetters } from 'vuex';
|
|
76
|
+
import PricingDiscountsTable from '@lancom/shared/components/common/pricing_discounts_table/pricing-discounts-table';
|
|
77
|
+
import { price } from '@lancom/shared/assets/js/utils/filters';
|
|
78
|
+
import ProductSizeSelectorColorCell from '@lancom/shared/components/product/product_size_selector/product_size_selector_color/product_size_selector_color_cell/product-size-selector-color-cell';
|
|
79
|
+
import { tax } from '@lancom/shared/assets/js/utils/filters';
|
|
80
|
+
|
|
81
|
+
export default {
|
|
82
|
+
name: 'ProductSizeSelectorColor',
|
|
83
|
+
filters: {
|
|
84
|
+
price
|
|
85
|
+
},
|
|
86
|
+
components: {
|
|
87
|
+
PricingDiscountsTable,
|
|
88
|
+
ProductSizeSelectorColorCell
|
|
89
|
+
},
|
|
90
|
+
props: {
|
|
91
|
+
product: {
|
|
92
|
+
type: Object,
|
|
93
|
+
required: true
|
|
94
|
+
},
|
|
95
|
+
rowspan: {
|
|
96
|
+
type: Number,
|
|
97
|
+
default: 0
|
|
98
|
+
},
|
|
99
|
+
withGst: {
|
|
100
|
+
type: Boolean,
|
|
101
|
+
default: false
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
computed: {
|
|
105
|
+
...mapGetters('product', ['isPrintPricing', 'usedSimpleProductsQuantity']),
|
|
106
|
+
...mapGetters(['gstTax', 'currency']),
|
|
107
|
+
pricing() {
|
|
108
|
+
return (this.isPrintPricing ? this.product.pricing : this.product.unprintedPricing) || [];
|
|
109
|
+
},
|
|
110
|
+
productPrice() {
|
|
111
|
+
const amount = this.usedSimpleProductsQuantity;
|
|
112
|
+
const pricing = this.pricing;
|
|
113
|
+
const price = (pricing.find(({ min, max }) => (!min || min <= amount) && (!max || max >= amount)) || pricing[0] || {}).price || 0;
|
|
114
|
+
return this.withGst ? tax(price, this.gstTax) : price;
|
|
115
|
+
},
|
|
116
|
+
disabled() {
|
|
117
|
+
return !this.product.quantityStock || !this.productPrice;
|
|
118
|
+
},
|
|
119
|
+
currentQuantityStock() {
|
|
120
|
+
return (this.product.quantityStock || 0) - (this.product.amount || 0);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
</script>
|
|
125
|
+
|
|
126
|
+
<style lang="scss" scoped>
|
|
127
|
+
@import 'product-size-selector-color.scss';
|
|
128
|
+
</style>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<table class="ProductsSizeSelectorColor__table lc_table bordered">
|
|
4
|
+
<tbody class="centered">
|
|
5
|
+
<product-size-selector-color
|
|
6
|
+
v-for="(product, index) in products"
|
|
7
|
+
:key="`${editableColor._id}_${product._id}`"
|
|
8
|
+
:rowspan="index === 0 ? products.length : 0"
|
|
9
|
+
:with-gst="withGst"
|
|
10
|
+
:product="product" />
|
|
11
|
+
</tbody>
|
|
12
|
+
</table>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
import { mapGetters } from 'vuex';
|
|
18
|
+
import { sortBySize } from '@lancom/shared/assets/js/utils/sizes';
|
|
19
|
+
import ProductSizeSelectorColor from './product_size_selector_color/product-size-selector-color';
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
name: 'ProductsSizeSelectorColor',
|
|
23
|
+
components: {
|
|
24
|
+
ProductSizeSelectorColor
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
withGst: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: false
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
computed: {
|
|
33
|
+
...mapGetters('product', ['editableColor', 'editableColorSimpleProducts']),
|
|
34
|
+
products() {
|
|
35
|
+
return sortBySize(this.editableColorSimpleProducts);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<style lang="scss" scoped>
|
|
42
|
+
@import 'products-size-selector-color.scss';
|
|
43
|
+
</style>
|
package/components/product/wizard/wizard_print_layers/wizard_print_layer/wizard-print-layer.vue
CHANGED
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
Price
|
|
107
107
|
</div>
|
|
108
108
|
<div>
|
|
109
|
-
{{ layerPrintPricing | pricingRange }}
|
|
109
|
+
{{ layerPrintPricing | pricingRange(currency) }}
|
|
110
110
|
</div>
|
|
111
111
|
<v-popover
|
|
112
112
|
ref="popover"
|
|
@@ -149,12 +149,14 @@
|
|
|
149
149
|
|
|
150
150
|
<script>
|
|
151
151
|
import { mapGetters } from 'vuex';
|
|
152
|
+
import printLayerMixin from '@lancom/shared/mixins/print-layer';
|
|
152
153
|
import { pricingRange } from '@lancom/shared/assets/js/utils/filters';
|
|
153
154
|
import PricingDiscountsTable from '@lancom/shared/components/common/pricing_discounts_table/pricing-discounts-table';
|
|
154
155
|
import WizardTextOrLogoForm from './../../wizard_print_text_or_logo/wizard_text_or_logo_form/wizard-text-or-logo-form';
|
|
155
156
|
|
|
156
157
|
export default {
|
|
157
158
|
name: 'WizardPrintLayer',
|
|
159
|
+
mixins: [printLayerMixin],
|
|
158
160
|
components: {
|
|
159
161
|
PricingDiscountsTable,
|
|
160
162
|
WizardTextOrLogoForm
|
|
@@ -163,44 +165,12 @@ export default {
|
|
|
163
165
|
pricingRange
|
|
164
166
|
},
|
|
165
167
|
props: {
|
|
166
|
-
layer: {
|
|
167
|
-
type: Object,
|
|
168
|
-
required: true
|
|
169
|
-
},
|
|
170
168
|
editable: {
|
|
171
169
|
type: Boolean
|
|
172
170
|
}
|
|
173
171
|
},
|
|
174
172
|
computed: {
|
|
175
|
-
...mapGetters(
|
|
176
|
-
type() {
|
|
177
|
-
return this.layer.type;
|
|
178
|
-
},
|
|
179
|
-
productPrintAreas() {
|
|
180
|
-
return this.product.printAreas || [];
|
|
181
|
-
},
|
|
182
|
-
layerPrintArea() {
|
|
183
|
-
return this.productPrintAreas.find(({ _id }) => _id === this.layer.printArea);
|
|
184
|
-
},
|
|
185
|
-
layerPrintSizes() {
|
|
186
|
-
const { printSize, sizes = [] } = this.layerPrintArea;
|
|
187
|
-
return [
|
|
188
|
-
printSize,
|
|
189
|
-
...sizes
|
|
190
|
-
.map(({ printSize }) => printSize)
|
|
191
|
-
.filter(({ _id }) => _id !== printSize._id)
|
|
192
|
-
];
|
|
193
|
-
},
|
|
194
|
-
layerPrintType() {
|
|
195
|
-
return this.product.printTypes.find(({ _id }) => _id === this.layer.printType);
|
|
196
|
-
},
|
|
197
|
-
layerPrintSize() {
|
|
198
|
-
return this.layerPrintSizes.find(({ _id }) => _id === this.layer.printSize);
|
|
199
|
-
},
|
|
200
|
-
layerPrintPricing() {
|
|
201
|
-
const printArea = this.layerPrintType.printAreas.find(({ printSizes }) => printSizes.map(({ _id }) => _id).includes(this.layer.printSize)) || this.layerPrintType.printAreas[0];
|
|
202
|
-
return printArea.printCost;
|
|
203
|
-
}
|
|
173
|
+
...mapGetters(['currency'])
|
|
204
174
|
}
|
|
205
175
|
};
|
|
206
176
|
</script>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</div>
|
|
15
15
|
<div class="WizardPrintAreaPrintSize__type-price mt-3">
|
|
16
16
|
<span>
|
|
17
|
-
{{ getSizePricing(size) | pricingRange }}
|
|
17
|
+
{{ getSizePricing(size) | pricingRange(currency) }}
|
|
18
18
|
</span>
|
|
19
19
|
</div>
|
|
20
20
|
<v-popover
|
|
@@ -56,6 +56,7 @@ export default {
|
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
computed: {
|
|
59
|
+
...mapGetters(['currency']),
|
|
59
60
|
...mapGetters('product', ['product', 'selectedPrintAreas', 'availablePrintTypes']),
|
|
60
61
|
selectedPrintArea() {
|
|
61
62
|
return this.selectedPrintAreas[this.editablePrintArea._id];
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
<script>
|
|
34
34
|
import { mapGetters, mapMutations } from 'vuex';
|
|
35
35
|
import { getLayerModel } from '@lancom/shared/assets/js/models/product-layers';
|
|
36
|
+
import { getPrintAreaByName } from '@lancom/shared/assets/js/models/print-area';
|
|
36
37
|
import WizardTextOrLogoForm from './wizard_text_or_logo_form/wizard-text-or-logo-form';
|
|
37
38
|
|
|
38
39
|
const DEFAULT_LAYER = {
|
|
@@ -55,7 +56,15 @@ export default {
|
|
|
55
56
|
},
|
|
56
57
|
computed: {
|
|
57
58
|
...mapGetters('layers', ['editableLayers']),
|
|
58
|
-
...mapGetters('product', [
|
|
59
|
+
...mapGetters('product', [
|
|
60
|
+
'product',
|
|
61
|
+
'editorSize',
|
|
62
|
+
'editableColor',
|
|
63
|
+
'selectedPrintAreas',
|
|
64
|
+
'selectedPrintTypes',
|
|
65
|
+
'editablePrintAreas',
|
|
66
|
+
'editableSide'
|
|
67
|
+
]),
|
|
59
68
|
isValidLayers() {
|
|
60
69
|
return !this.layers.some(l => !l.copy && !l.file);
|
|
61
70
|
}
|
|
@@ -78,9 +87,21 @@ export default {
|
|
|
78
87
|
const editablePrintArea = this.editablePrintAreas.find(pa => pa._id === printAreaId);
|
|
79
88
|
const selectedPrintArea = this.selectedPrintAreas[printAreaId];
|
|
80
89
|
const selectedPrintType = this.selectedPrintTypes[printAreaId];
|
|
90
|
+
const { width, height } = this.editorSize;
|
|
91
|
+
const { center: { top, left } } = getPrintAreaByName({
|
|
92
|
+
printArea: editablePrintArea._id,
|
|
93
|
+
printSize: selectedPrintArea,
|
|
94
|
+
printAreaOffsets: editablePrintArea?.printAreaOffsets,
|
|
95
|
+
editorWidth: width,
|
|
96
|
+
editorHeight: height
|
|
97
|
+
}, this.product);
|
|
98
|
+
|
|
81
99
|
const data = {
|
|
82
100
|
type: layer.type,
|
|
83
101
|
colorId: this.editableColor?._id,
|
|
102
|
+
sideId: editablePrintArea.side,
|
|
103
|
+
top,
|
|
104
|
+
left,
|
|
84
105
|
properties: {
|
|
85
106
|
notes: layer.notes,
|
|
86
107
|
printArea: editablePrintArea._id,
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
</div>
|
|
26
26
|
<div class="WizardPrintAreaPrintType__type-price mt-7">
|
|
27
27
|
<span>
|
|
28
|
-
{{ getPrinTypePricing(type) | pricingRange }}
|
|
28
|
+
{{ getPrinTypePricing(type) | pricingRange(currency) }}
|
|
29
29
|
</span>
|
|
30
30
|
</div>
|
|
31
31
|
<v-popover
|
|
@@ -65,6 +65,7 @@ export default {
|
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
computed: {
|
|
68
|
+
...mapGetters(['currency']),
|
|
68
69
|
...mapGetters('product', ['selectedPrintAreas', 'selectedPrintTypes', 'product', 'availablePrintTypes', 'selectedPrintUnderbases']),
|
|
69
70
|
selectedPrintArea() {
|
|
70
71
|
return this.selectedPrintAreas[this.editablePrintArea._id];
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
&__colors {
|
|
18
18
|
display: flex;
|
|
19
19
|
flex-wrap: wrap;
|
|
20
|
-
margin:
|
|
20
|
+
margin: 2px 25px 20px 25px;
|
|
21
21
|
}
|
|
22
22
|
&__color {
|
|
23
23
|
margin: 0px;
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
position: relative;
|
|
54
54
|
transition: background-color 0.5s ease;
|
|
55
55
|
background-color: white;
|
|
56
|
-
height:
|
|
57
|
-
width:
|
|
56
|
+
height: 300px;
|
|
57
|
+
width: 270px;
|
|
58
58
|
display: flex;
|
|
59
59
|
align-items: center;
|
|
60
60
|
justify-content: center;
|
|
@@ -71,9 +71,10 @@
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
&__brand {
|
|
74
|
-
width: 54px;
|
|
74
|
+
max-width: 54px;
|
|
75
|
+
max-height: 44px;
|
|
75
76
|
top: 10px;
|
|
76
|
-
left:
|
|
77
|
+
left: 10px;
|
|
77
78
|
position: absolute;
|
|
78
79
|
z-index: 10;
|
|
79
80
|
opacity: 0.7;
|
|
@@ -133,16 +134,11 @@
|
|
|
133
134
|
flex-direction: column;
|
|
134
135
|
align-items: center;
|
|
135
136
|
&-item {
|
|
136
|
-
margin-top: 4px;
|
|
137
137
|
padding: 0 20px;
|
|
138
138
|
}
|
|
139
139
|
&-name {
|
|
140
|
-
text-overflow: ellipsis;
|
|
141
|
-
white-space: nowrap;
|
|
142
|
-
overflow: hidden;
|
|
143
|
-
max-width: 180px;
|
|
144
|
-
margin-right: 5px;
|
|
145
140
|
display: block;
|
|
141
|
+
text-align: center;
|
|
146
142
|
}
|
|
147
143
|
}
|
|
148
144
|
}
|
|
@@ -35,25 +35,17 @@
|
|
|
35
35
|
v-if="product.isTearAwayTag"
|
|
36
36
|
class="ProductListProduct__tear-away-tag"
|
|
37
37
|
src="~static/images/tear-away-tag.svg" />
|
|
38
|
-
<div class="ProductListProduct__gender">
|
|
38
|
+
<!-- <div class="ProductListProduct__gender">
|
|
39
39
|
<span>{{ product.gender }}</span>
|
|
40
|
-
</div>
|
|
40
|
+
</div> -->
|
|
41
41
|
</a>
|
|
42
42
|
<div class="ProductListProduct__info">
|
|
43
43
|
<div class="ProductListProduct__info-item">
|
|
44
44
|
<a :href="productLink" class="lc_h4 row">
|
|
45
45
|
<div>
|
|
46
|
-
<
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
</span>
|
|
50
|
-
<template slot="popover">
|
|
51
|
-
{{ product.name }}
|
|
52
|
-
</template>
|
|
53
|
-
</v-popover>
|
|
54
|
-
</div>
|
|
55
|
-
<div>
|
|
56
|
-
| {{ product.SKU }}
|
|
46
|
+
<span class="ProductListProduct__info-name">
|
|
47
|
+
{{ product.name }} | {{ product.SKU }}
|
|
48
|
+
</span>
|
|
57
49
|
</div>
|
|
58
50
|
</a>
|
|
59
51
|
</div>
|
|
@@ -67,12 +59,12 @@
|
|
|
67
59
|
class="ProductListProduct__info-item lc_h4">
|
|
68
60
|
{{ product.minPrice | price(currency) }} - {{ product.maxPrice | price(currency) }}
|
|
69
61
|
</div>
|
|
70
|
-
<div class="ProductListProduct__info-item mt-
|
|
62
|
+
<div class="ProductListProduct__info-item mt-2 lc_caption">
|
|
71
63
|
{{ product.colors.length }} {{ product.colors.length === 1 ? 'Colour' : 'Colours' }} | Size: {{ product.sizes | sizesRange }}
|
|
72
64
|
</div>
|
|
73
65
|
<div
|
|
74
66
|
v-if="full"
|
|
75
|
-
class="ProductListProduct__info-item mt-
|
|
67
|
+
class="ProductListProduct__info-item mt-2 lc_caption visible-full">
|
|
76
68
|
{{ product.fabricInfoShort }} | {{ product.materialWeight }} gsm
|
|
77
69
|
</div>
|
|
78
70
|
<div
|
package/feeds/google-shopping.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
async function googleLocalShoppingFeed(axios, config, availableStores) {
|
|
2
|
-
const result = await googleShoppingFeed(axios, config, availableStores);
|
|
1
|
+
async function googleLocalShoppingFeed(axios, config, availableStores, country) {
|
|
2
|
+
const result = await googleShoppingFeed(axios, config, availableStores, country);
|
|
3
3
|
|
|
4
4
|
const fields = [
|
|
5
5
|
'g:availability',
|
|
@@ -14,8 +14,8 @@ async function googleLocalShoppingFeed(axios, config, availableStores) {
|
|
|
14
14
|
.map(i => fields.reduce((item, field) => ({ ...item, [field]: i[field] }), {}));
|
|
15
15
|
return result;
|
|
16
16
|
}
|
|
17
|
-
async function googleShoppingFeed(axios, config, availableStores) {
|
|
18
|
-
const { data } = await axios.get(`${config.LOCAL_API_URL}/feed/products?host=${config.HOST_NAME}`);
|
|
17
|
+
async function googleShoppingFeed(axios, config, availableStores, country) {
|
|
18
|
+
const { data } = await axios.get(`${config.LOCAL_API_URL}/feed/products?host=${config.HOST_NAME}&country=${country || ''}`);
|
|
19
19
|
const spliceFirstImage = images => (images || []).splice(0, 1)[0];
|
|
20
20
|
const getImages = images => (images || []).length > 0 ? images : null;
|
|
21
21
|
const channel = {
|
|
@@ -68,7 +68,7 @@ async function googleShoppingFeed(axios, config, availableStores) {
|
|
|
68
68
|
'g:color': { _text: sp.color.name },
|
|
69
69
|
'g:image_link': { _text: sp.image || image },
|
|
70
70
|
'g:additional_image_link': (sp.image ? [image, ...images] : images).map(i => ({ _text: i })),
|
|
71
|
-
'g:price': { _text: `${(sp.price || 0)} AUD` },
|
|
71
|
+
'g:price': { _text: `${(sp.price || 0)} ${sp.currency || 'AUD'}` },
|
|
72
72
|
'g:availability': { _text: sp.quantityStock > 0 ? 'in_stock' : 'out_of_stock' },
|
|
73
73
|
'g:google_product_category': { _text: product.feedGoogleProductCategory || 2047 },
|
|
74
74
|
'g:product_type': { _text: product.feedProductType || `Home > Products > ${product.productType.name}`, },
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<component
|
|
4
|
+
:is="errorPage"
|
|
5
|
+
:error="error" />
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
import { mapGetters } from 'vuex';
|
|
11
|
+
import Error404 from '@lancom/shared/components/errors/404.vue';
|
|
12
|
+
import Error500 from '@lancom/shared/components/errors/500.vue';
|
|
13
|
+
import { generateShopHeadScripts } from '@lancom/shared/utils/head';
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
name: 'ErrorLayout',
|
|
17
|
+
props: {
|
|
18
|
+
error: {
|
|
19
|
+
type: Object,
|
|
20
|
+
default: () => ({})
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
head() {
|
|
24
|
+
return {
|
|
25
|
+
title: `${this.error.statusCode} Error`,
|
|
26
|
+
...generateShopHeadScripts(this.shop)
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
computed: {
|
|
30
|
+
...mapGetters(['shop']),
|
|
31
|
+
errorPage() {
|
|
32
|
+
if (this.error.statusCode === 404) {
|
|
33
|
+
return Error404;
|
|
34
|
+
}
|
|
35
|
+
return Error500;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
</script>
|