@lancom/shared 0.0.264 → 0.0.266
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 +14 -11
- package/assets/js/constants/country.js +1 -1
- package/assets/scss/ui_kit/_forms.scss +2 -2
- package/assets/scss/ui_kit/_tooltip.scss +3 -1
- package/assets/scss/variables/_theme.scss +3 -3
- package/components/checkout/cart/cart.mixin.js +5 -5
- package/components/checkout/cart/cart_price_info/cart-price-info.vue +2 -2
- package/components/checkout/cart/cart_shipments_pricing/cart-shipments-pricing.vue +2 -2
- package/components/checkout/order/address-form/address-form.vue +4 -3
- package/components/checkout/order/order-shipping-method/order-shipping-method.vue +2 -2
- package/components/checkout/order/order.vue +1 -1
- package/components/common/payment/payment_card/pinpayment/pinpayment.vue +34 -5
- package/components/common/postcode_select/postcode-select.vue +5 -1
- package/components/common/products_total_pricing/products-total-pricing.vue +5 -1
- package/components/design/approve_design_header/approve-design-header.vue +1 -1
- package/components/editor/editor.vue +8 -2
- package/components/editor/editor_pricing/editor-pricing.vue +2 -2
- package/components/editor/editor_pricing/editor_pricing_details/editor_pricing_details_prints/editor-pricing-details-prints.vue +8 -7
- package/components/editor/editor_pricing/editor_pricing_details/editor_pricing_details_products/editor-pricing-details-products.vue +13 -5
- package/components/editor/editor_product_details/editor-product-details.scss +6 -0
- package/components/editor/editor_product_details/editor-product-details.vue +12 -2
- package/components/faq/faq.vue +2 -2
- package/components/modals/order_modal/order-modal.vue +17 -3
- package/components/order/order_price/order-price.vue +5 -3
- package/components/order/order_prints_groups/order-prints-groups.vue +3 -1
- package/components/order/order_products_groups/order-products-groups.vue +3 -1
- package/components/order/order_refund_view/order-refund-view.vue +5 -3
- package/components/order/order_setup_groups/order-setup-groups.vue +4 -2
- package/components/order/order_sku_groups/order-sku-groups.vue +3 -1
- package/components/order/order_view/order-view.vue +10 -6
- package/components/pricing/pricing_digital_printing/pricing-digital-printing.vue +3 -1
- package/components/pricing/pricing_example/pricing-example.vue +3 -3
- package/components/pricing/pricing_how_we_calculate/pricing-how-we-calculate.vue +7 -2
- package/components/pricing/pricing_products_calculator/pricing_product_calculator/pricing-product-calculator.vue +2 -2
- package/components/pricing/pricing_screen_printing/pricing-screen-printing.vue +3 -1
- package/components/product/product_multipacks_carousel/product-multipacks-carousel.scss +60 -0
- package/components/product/product_multipacks_carousel/product-multipacks-carousel.vue +80 -0
- package/components/product/product_multipacks_carousel/product_multipack/product-multipack.scss +43 -0
- package/components/product/product_multipacks_carousel/product_multipack/product-multipack.vue +81 -0
- package/components/product/product_price_range/product-price-range.vue +6 -5
- package/components/product/product_prints_price_info/product-prints-price-info.vue +2 -2
- package/components/products/products_autocomplete/products-autocomplete.scss +10 -12
- package/components/quotes/quote_request/quote-request.vue +1 -1
- package/components/quotes/quote_view/quote_option_view/quote-option-view.vue +5 -4
- package/feeds/google-shopping.js +16 -11
- package/mixins/meta-info.js +4 -1
- package/mixins/products-price.js +3 -2
- package/package.json +1 -1
- package/store/cart.js +7 -6
- package/store/index.js +16 -5
- package/store/product.js +3 -2
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
<td>{{ total.price | price(currency) }}</td>
|
|
52
52
|
</tr>
|
|
53
53
|
<tr v-if="totalsWithGst">
|
|
54
|
-
<td>Total inc.
|
|
54
|
+
<td>Total inc. {{ taxName }}</td>
|
|
55
55
|
<td colspan="3"></td>
|
|
56
56
|
<td>{{ total.amount }}</td>
|
|
57
57
|
<td></td>
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
</template>
|
|
66
66
|
|
|
67
67
|
<script>
|
|
68
|
+
import { mapGetters } from 'vuex';
|
|
68
69
|
import ProductSideWithPrint from '@lancom/shared/components/common/product_side_with_print/product-side-with-print';
|
|
69
70
|
import { COLORS_IMAGES_TYPES } from '@lancom/shared/assets/js/constants/colors';
|
|
70
71
|
import { groupProductsByPrints } from '@lancom/shared/assets/js/utils/products-grouping';
|
|
@@ -94,6 +95,7 @@ export default {
|
|
|
94
95
|
}
|
|
95
96
|
},
|
|
96
97
|
computed: {
|
|
98
|
+
...mapGetters(['taxName']),
|
|
97
99
|
printsGroups() {
|
|
98
100
|
return groupProductsByPrints(this.order.products, this.order.price.products);
|
|
99
101
|
},
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
<td>{{ total.price | price(currency) }}</td>
|
|
41
41
|
</tr>
|
|
42
42
|
<tr v-if="totalsWithGst">
|
|
43
|
-
<td>Total inc.
|
|
43
|
+
<td>Total inc. {{ taxName }}</td>
|
|
44
44
|
<td colspan="3"></td>
|
|
45
45
|
<td>{{ total.amount }}</td>
|
|
46
46
|
<td>{{ total.prints.amount }}</td>
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
</template>
|
|
60
60
|
|
|
61
61
|
<script>
|
|
62
|
+
import { mapGetters } from 'vuex';
|
|
62
63
|
import { print, price } from '@lancom/shared/assets/js/utils/filters';
|
|
63
64
|
import { groupProductsByDesign } from '@lancom/shared/assets/js/utils/products-grouping';
|
|
64
65
|
import OrderProductsGroup from './order_products_group/order-products-group';
|
|
@@ -91,6 +92,7 @@ export default {
|
|
|
91
92
|
}
|
|
92
93
|
},
|
|
93
94
|
computed: {
|
|
95
|
+
...mapGetters(['taxName']),
|
|
94
96
|
productsGroups() {
|
|
95
97
|
return groupProductsByDesign(this.order.products, this.order.price.products);
|
|
96
98
|
},
|
|
@@ -88,13 +88,13 @@
|
|
|
88
88
|
'OrderRefundView__totals--paid': isPaid
|
|
89
89
|
}">
|
|
90
90
|
<div class="lc_regular16">
|
|
91
|
-
Total ex
|
|
91
|
+
Total ex {{ taxName }}: <b>{{ refund.total | price(currency) }}</b>
|
|
92
92
|
</div>
|
|
93
93
|
<div class="lc_regular16">
|
|
94
|
-
|
|
94
|
+
{{ taxName }}: <b>{{ refund.totalGST - refund.total | price(currency) }}</b>
|
|
95
95
|
</div>
|
|
96
96
|
<div class="lc_regular16">
|
|
97
|
-
Total inc
|
|
97
|
+
Total inc {{ taxName }}: <b>{{ refund.totalGST | price(currency) }}</b>
|
|
98
98
|
</div>
|
|
99
99
|
</div>
|
|
100
100
|
</div>
|
|
@@ -103,6 +103,7 @@
|
|
|
103
103
|
</template>
|
|
104
104
|
|
|
105
105
|
<script>
|
|
106
|
+
import { mapGetters } from 'vuex';
|
|
106
107
|
import OrderViewMixin from './../order_view/order-view.mixin';
|
|
107
108
|
import OrderViewProduct from './../order_view/order_view_product/order-view-product';
|
|
108
109
|
|
|
@@ -123,6 +124,7 @@ export default {
|
|
|
123
124
|
}
|
|
124
125
|
},
|
|
125
126
|
computed: {
|
|
127
|
+
...mapGetters(['taxName']),
|
|
126
128
|
isPaid() {
|
|
127
129
|
return this.refund.status === 'refunded';
|
|
128
130
|
},
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
<th>SKU</th>
|
|
13
13
|
<th>Quantity</th>
|
|
14
14
|
<th>Price</th>
|
|
15
|
-
<th>
|
|
16
|
-
<th>Total Inc.
|
|
15
|
+
<th>{{ taxName }}</th>
|
|
16
|
+
<th>Total Inc. {{ taxName }}</th>
|
|
17
17
|
</tr>
|
|
18
18
|
</thead>
|
|
19
19
|
<tbody class="centered">
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
</template>
|
|
47
47
|
|
|
48
48
|
<script>
|
|
49
|
+
import { mapGetters } from 'vuex';
|
|
49
50
|
import { COLORS_IMAGES_TYPES } from '@lancom/shared/assets/js/constants/colors';
|
|
50
51
|
import { groupProductsByPrints } from '@lancom/shared/assets/js/utils/products-grouping';
|
|
51
52
|
import { price, print } from '@lancom/shared/assets/js/utils/filters';
|
|
@@ -67,6 +68,7 @@ export default {
|
|
|
67
68
|
}
|
|
68
69
|
},
|
|
69
70
|
computed: {
|
|
71
|
+
...mapGetters(['taxName']),
|
|
70
72
|
printsGroups() {
|
|
71
73
|
return groupProductsByPrints(this.order.products, this.order.price.products);
|
|
72
74
|
},
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
</td>
|
|
50
50
|
</tr>
|
|
51
51
|
<tr v-if="totalsWithGst">
|
|
52
|
-
<td> Total inc.
|
|
52
|
+
<td> Total inc. {{ taxName }}</td>
|
|
53
53
|
<td colspan="3"></td>
|
|
54
54
|
<td>{{ total.amount }}</td>
|
|
55
55
|
<td></td>
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
</template>
|
|
69
69
|
|
|
70
70
|
<script>
|
|
71
|
+
import { mapGetters } from 'vuex';
|
|
71
72
|
import { groupProductsBySKU } from '@lancom/shared/assets/js/utils/products-grouping';
|
|
72
73
|
import { price } from '@lancom/shared/assets/js/utils/filters';
|
|
73
74
|
import { copyToClipboard } from '@lancom/shared/assets/js/utils/copy-to-clipboard';
|
|
@@ -96,6 +97,7 @@ export default {
|
|
|
96
97
|
}
|
|
97
98
|
},
|
|
98
99
|
computed: {
|
|
100
|
+
...mapGetters(['taxName']),
|
|
99
101
|
featureGroups() {
|
|
100
102
|
return groupProductsBySKU(this.order.products, this.order.price.products);
|
|
101
103
|
},
|
|
@@ -127,10 +127,10 @@
|
|
|
127
127
|
Shipping Total: <b>{{ model.shippingTotal | price(order.currency) }}</b>
|
|
128
128
|
</div>
|
|
129
129
|
<div class="lc_regular16">
|
|
130
|
-
Total ex
|
|
130
|
+
Total ex {{ taxName }}: <b>{{ (model.total + couponTotal) | price(order.currency) }}</b>
|
|
131
131
|
</div>
|
|
132
132
|
<div class="lc_regular16">
|
|
133
|
-
|
|
133
|
+
{{ taxName }}: <b>{{ model.totalGST - model.total | price(order.currency) }}</b>
|
|
134
134
|
</div>
|
|
135
135
|
<div
|
|
136
136
|
v-if="!invoice && order.couponCode"
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
Coupon: <b>{{ couponTotal | price(order.currency) }}</b>
|
|
139
139
|
</div>
|
|
140
140
|
<div class="lc_regular16">
|
|
141
|
-
Total inc
|
|
141
|
+
Total inc {{ taxName }}: <b>{{ model.totalGST | price(order.currency) }}</b>
|
|
142
142
|
</div>
|
|
143
143
|
<div class="lc_regular16">
|
|
144
144
|
{{ isPaid ? 'Paid' : 'Pending Payment' }}: <b>{{ model.totalGST | price(order.currency) }}</b>
|
|
@@ -175,10 +175,10 @@
|
|
|
175
175
|
Shipping Total: <b>{{ model.shippingTotal | price(order.currency) }}</b>
|
|
176
176
|
</div>
|
|
177
177
|
<div class="lc_regular16">
|
|
178
|
-
Total ex
|
|
178
|
+
Total ex {{ taxName }}: <b>{{ (model.total + couponTotal) | price(order.currency) }}</b>
|
|
179
179
|
</div>
|
|
180
180
|
<div class="lc_regular16">
|
|
181
|
-
|
|
181
|
+
{{ taxName }}: <b>{{ model.totalGST - model.total | price(order.currency) }}</b>
|
|
182
182
|
</div>
|
|
183
183
|
<div
|
|
184
184
|
v-if="!invoice && order.couponCode"
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
Coupon: <b>{{ couponTotal | price(order.currency) }}</b>
|
|
187
187
|
</div>
|
|
188
188
|
<div class="lc_regular16">
|
|
189
|
-
Total inc
|
|
189
|
+
Total inc {{ taxName }}: <b>{{ model.totalGST | price(order.currency) }}</b>
|
|
190
190
|
</div>
|
|
191
191
|
<div class="lc_regular16">
|
|
192
192
|
{{ isPaid ? 'Paid' : 'Pending Payment' }}: <b>{{ model.totalGST | price(order.currency) }}</b>
|
|
@@ -198,6 +198,7 @@
|
|
|
198
198
|
</template>
|
|
199
199
|
|
|
200
200
|
<script>
|
|
201
|
+
import { mapGetters } from 'vuex';
|
|
201
202
|
import OrderViewMixin from './order-view.mixin';
|
|
202
203
|
import OrderViewProduct from './order_view_product/order-view-product';
|
|
203
204
|
|
|
@@ -212,6 +213,9 @@ export default {
|
|
|
212
213
|
type: Boolean,
|
|
213
214
|
default: true
|
|
214
215
|
}
|
|
216
|
+
},
|
|
217
|
+
computed: {
|
|
218
|
+
...mapGetters(['taxName'])
|
|
215
219
|
}
|
|
216
220
|
};
|
|
217
221
|
</script>
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
v-if="isSelectedPrint"
|
|
206
206
|
class="form-row">
|
|
207
207
|
<span class="PricingMainSection__section-content-label">
|
|
208
|
-
Inclusive of
|
|
208
|
+
Inclusive of {{ taxName }}:
|
|
209
209
|
</span>
|
|
210
210
|
<span class="PricingMainSection__section-content-value">
|
|
211
211
|
{{ productPricing.tax.totalPrice | price(currency) }}
|
|
@@ -225,6 +225,7 @@
|
|
|
225
225
|
</template>
|
|
226
226
|
|
|
227
227
|
<script>
|
|
228
|
+
import { mapGetters } from 'vuex';
|
|
228
229
|
import { PRODUCT_TYPES, PRODUCT_TYPES_LIST } from '@lancom/shared/assets/js/constants/product';
|
|
229
230
|
import productsPrice from '@lancom/shared/mixins/products-price';
|
|
230
231
|
import Range from '@lancom/shared/components/common/range/range';
|
|
@@ -254,6 +255,7 @@ export default {
|
|
|
254
255
|
};
|
|
255
256
|
},
|
|
256
257
|
computed: {
|
|
258
|
+
...mapGetters(['taxName']),
|
|
257
259
|
productEditorLink() {
|
|
258
260
|
return `/${this.product.SKU}/${this.product.alias}/editor`;
|
|
259
261
|
},
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
{{ productPricing.totalPrice | price(currency) }}
|
|
64
64
|
</div>
|
|
65
65
|
<div class="PricingExample__example-tax">
|
|
66
|
-
Inclusive of
|
|
66
|
+
Inclusive of {{ taxName }}: {{ productPricing.tax.totalPrice | price(currency) }}
|
|
67
67
|
</div>
|
|
68
68
|
<div class="mt-10">
|
|
69
69
|
+ Delivery
|
|
@@ -139,7 +139,7 @@ export default {
|
|
|
139
139
|
};
|
|
140
140
|
},
|
|
141
141
|
computed: {
|
|
142
|
-
...mapGetters(['shop']),
|
|
142
|
+
...mapGetters(['shop', 'country', 'taxName']),
|
|
143
143
|
printsPricing() {
|
|
144
144
|
return this.productPricing?.products[this.product._id]?.prints.prints || [];
|
|
145
145
|
}
|
|
@@ -152,7 +152,7 @@ export default {
|
|
|
152
152
|
const prints = this.generateSidesPrints();
|
|
153
153
|
const layers = prints.map(({ printType, printSize, printArea }) => ({ printType: printType?._id, printSize: printSize?._id, printArea: printArea?._id }));
|
|
154
154
|
const entities = getProductsForCalculatePricing(this.product, [this.simpleProduct], layers, true, true);
|
|
155
|
-
this.productPricing = await api.calculateProductPrice({ entities }, this.shop._id);
|
|
155
|
+
this.productPricing = await api.calculateProductPrice({ entities, country: this.country?._id }, this.shop._id);
|
|
156
156
|
},
|
|
157
157
|
generateSidesPrints() {
|
|
158
158
|
return this.sides
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
Your Total Price
|
|
77
77
|
</div>
|
|
78
78
|
<div class="PricingHowWeCalculate__entity-description">
|
|
79
|
-
(inclusive of
|
|
79
|
+
(inclusive of {{ taxName }})
|
|
80
80
|
</div>
|
|
81
81
|
</div>
|
|
82
82
|
</div>
|
|
@@ -86,8 +86,13 @@
|
|
|
86
86
|
</template>
|
|
87
87
|
|
|
88
88
|
<script>
|
|
89
|
+
import { mapGetters } from 'vuex';
|
|
90
|
+
|
|
89
91
|
export default {
|
|
90
|
-
name: 'PricingHowWeCalculate'
|
|
92
|
+
name: 'PricingHowWeCalculate',
|
|
93
|
+
computed: {
|
|
94
|
+
...mapGetters(['taxName'])
|
|
95
|
+
}
|
|
91
96
|
};
|
|
92
97
|
</script>
|
|
93
98
|
|
|
@@ -216,7 +216,7 @@ export default {
|
|
|
216
216
|
};
|
|
217
217
|
},
|
|
218
218
|
computed: {
|
|
219
|
-
...mapGetters(['shop']),
|
|
219
|
+
...mapGetters(['shop', 'country']),
|
|
220
220
|
maxScreenPrintColors() {
|
|
221
221
|
const printTypes = this.product.printTypes.filter(printType => printType.type === 'screen print');
|
|
222
222
|
return Math.max(...printTypes.map(printType => printType.colorsQuantity));
|
|
@@ -262,7 +262,7 @@ export default {
|
|
|
262
262
|
const prints = this.generateSidesPrints(type);
|
|
263
263
|
const layers = prints.map(({ printType, printSize, printArea }) => ({ printType: printType?._id, printSize: printSize?._id, printArea: printArea?._id }));
|
|
264
264
|
const entities = getProductsForCalculatePricing(this.product, [this.simpleProduct], layers, true, true);
|
|
265
|
-
const pricing = await api.calculateProductPrice({ entities, postcode: this.postcode }, this.shop._id);
|
|
265
|
+
const pricing = await api.calculateProductPrice({ entities, postcode: this.postcode, country: this.country?._id }, this.shop._id);
|
|
266
266
|
return { pricing, prints, type };
|
|
267
267
|
})
|
|
268
268
|
);
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
v-if="isSelectedPrint"
|
|
206
206
|
class="form-row">
|
|
207
207
|
<span class="PricingScreenPrintSection__section-content-label">
|
|
208
|
-
Inclusive of
|
|
208
|
+
Inclusive of {{ taxName }}:
|
|
209
209
|
</span>
|
|
210
210
|
<span class="PricingScreenPrintSection__section-content-value">
|
|
211
211
|
{{ productPricing.tax.totalPrice | price(currency) }}
|
|
@@ -226,6 +226,7 @@
|
|
|
226
226
|
|
|
227
227
|
<script>
|
|
228
228
|
import Multiselect from 'vue-multiselect';
|
|
229
|
+
import { mapGetters } from 'vuex';
|
|
229
230
|
import { PRODUCT_TYPES, PRODUCT_TYPES_LIST } from '@lancom/shared/assets/js/constants/product';
|
|
230
231
|
import productsPrice from '@lancom/shared/mixins/products-price';
|
|
231
232
|
import Range from '@lancom/shared/components/common/range/range';
|
|
@@ -285,6 +286,7 @@ export default {
|
|
|
285
286
|
};
|
|
286
287
|
},
|
|
287
288
|
computed: {
|
|
289
|
+
...mapGetters(['taxName']),
|
|
288
290
|
productEditorLink() {
|
|
289
291
|
return `/${this.product.SKU}/${this.product.alias}/editor`;
|
|
290
292
|
},
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
@import "@/assets/scss/variables";
|
|
2
|
+
|
|
3
|
+
.ProductMultipacksCarousel {
|
|
4
|
+
&__wrapper {
|
|
5
|
+
width: 100%;
|
|
6
|
+
position: relative;
|
|
7
|
+
z-index: 1;
|
|
8
|
+
overflow-x: hidden;
|
|
9
|
+
display: block;
|
|
10
|
+
// align-items: center;
|
|
11
|
+
|
|
12
|
+
::v-deep .slick-dots {
|
|
13
|
+
display: none !important;
|
|
14
|
+
}
|
|
15
|
+
::v-deep .slick-list {
|
|
16
|
+
min-height: 205px;
|
|
17
|
+
}
|
|
18
|
+
::v-deep .slick-arrow.slick-prev,
|
|
19
|
+
::v-deep .slick-arrow.slick-next {
|
|
20
|
+
position: absolute;
|
|
21
|
+
bottom: 25px;
|
|
22
|
+
right: 0;
|
|
23
|
+
background-color: black;
|
|
24
|
+
border: 1px solid white;
|
|
25
|
+
background-image: url(./../../../static/icons/arrow-left.svg);
|
|
26
|
+
background-position: center;
|
|
27
|
+
background-repeat: no-repeat;
|
|
28
|
+
background-size: 15px 15px;
|
|
29
|
+
width: 41px;
|
|
30
|
+
height: 41px;
|
|
31
|
+
text-indent: -9999px;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
z-index: 2;
|
|
34
|
+
|
|
35
|
+
&:hover {
|
|
36
|
+
box-shadow: 0 0 3px $grey_2;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
::v-deep .slick-arrow.slick-prev {
|
|
40
|
+
transform: rotateZ(180deg);
|
|
41
|
+
left: 0;
|
|
42
|
+
right: auto;
|
|
43
|
+
}
|
|
44
|
+
::v-deep .slick-arrow.slick-prev:focus,
|
|
45
|
+
::v-deep .slick-arrow.slick-next:focus {
|
|
46
|
+
outline: none;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
&__items {
|
|
50
|
+
display: flex;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
}
|
|
53
|
+
&__item {
|
|
54
|
+
padding: 10px;
|
|
55
|
+
width: 180px;
|
|
56
|
+
height: 200px;
|
|
57
|
+
max-width: 300px;
|
|
58
|
+
flex-grow: 1;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ProductMultipacksCarousel__wrapper">
|
|
3
|
+
<div class="ProductMultipacksCarousel__items">
|
|
4
|
+
<div
|
|
5
|
+
v-for="multipack in visibleMultipacks"
|
|
6
|
+
:key="multipack._id"
|
|
7
|
+
class="ProductMultipacksCarousel__item">
|
|
8
|
+
<product-multipack
|
|
9
|
+
:multipack="multipack"
|
|
10
|
+
:simple-products="simpleProducts"
|
|
11
|
+
class="elevation2" />
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
<button
|
|
15
|
+
type="button"
|
|
16
|
+
class="slick-arrow slick-prev slick-disabled"
|
|
17
|
+
@click="goToPrevPage()">
|
|
18
|
+
Previous
|
|
19
|
+
</button>
|
|
20
|
+
<button
|
|
21
|
+
type="button"
|
|
22
|
+
class="slick-arrow slick-next"
|
|
23
|
+
@click="goToNextPage()">
|
|
24
|
+
Next
|
|
25
|
+
</button>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script>
|
|
30
|
+
import ProductMultipack from './product_multipack/product-multipack';
|
|
31
|
+
|
|
32
|
+
export default {
|
|
33
|
+
name: 'LancomProductMultipacks',
|
|
34
|
+
components: {
|
|
35
|
+
ProductMultipack
|
|
36
|
+
},
|
|
37
|
+
data() {
|
|
38
|
+
return {
|
|
39
|
+
thumbsPage: 0
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
props: {
|
|
43
|
+
product: {
|
|
44
|
+
type: Array,
|
|
45
|
+
required: true
|
|
46
|
+
},
|
|
47
|
+
simpleProducts: {
|
|
48
|
+
type: Array,
|
|
49
|
+
required: true
|
|
50
|
+
},
|
|
51
|
+
slidesPerRow: {
|
|
52
|
+
type: Number,
|
|
53
|
+
default: 3
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
computed: {
|
|
57
|
+
multipacks() {
|
|
58
|
+
return this.product.multipacks || [];
|
|
59
|
+
},
|
|
60
|
+
visibleFrom() {
|
|
61
|
+
return this.thumbsPage * this.slidesPerRow;
|
|
62
|
+
},
|
|
63
|
+
visibleMultipacks() {
|
|
64
|
+
return this.multipacks.slice(this.visibleFrom, this.visibleFrom + this.slidesPerRow);
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
methods: {
|
|
68
|
+
goToPrevPage() {
|
|
69
|
+
this.thumbsPage = Math.max(0, this.thumbsPage - 1);
|
|
70
|
+
},
|
|
71
|
+
goToNextPage() {
|
|
72
|
+
this.thumbsPage = Math.min(Math.ceil((this.multipacks.length) / this.slidesPerRow) - 1, this.thumbsPage + 1);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
</script>
|
|
77
|
+
|
|
78
|
+
<style lang="scss" scoped>
|
|
79
|
+
@import 'product-multipacks-carousel';
|
|
80
|
+
</style>
|
package/components/product/product_multipacks_carousel/product_multipack/product-multipack.scss
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@import "@/assets/scss/variables";
|
|
2
|
+
|
|
3
|
+
.ProductMultipack {
|
|
4
|
+
&__price {
|
|
5
|
+
padding: 15px;
|
|
6
|
+
text-align: center;
|
|
7
|
+
font-size: 14px;
|
|
8
|
+
font-weight: bold;
|
|
9
|
+
background-color: $gray;
|
|
10
|
+
}
|
|
11
|
+
&__image {
|
|
12
|
+
position: absolute;
|
|
13
|
+
left: 0;
|
|
14
|
+
top: 0;
|
|
15
|
+
right: 0;
|
|
16
|
+
bottom: 0;
|
|
17
|
+
background-position: left top;
|
|
18
|
+
background-repeat: no-repeat;
|
|
19
|
+
background-size: contain;
|
|
20
|
+
}
|
|
21
|
+
&__banner {
|
|
22
|
+
position: relative;
|
|
23
|
+
height: 140px;
|
|
24
|
+
&-info {
|
|
25
|
+
position: absolute;
|
|
26
|
+
top: 20px;
|
|
27
|
+
right: 10px;
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
align-items: end;
|
|
31
|
+
&-item span {
|
|
32
|
+
margin-bottom: 10px;
|
|
33
|
+
text-align: center;
|
|
34
|
+
padding: 6px;
|
|
35
|
+
background-color: $orange;
|
|
36
|
+
color: $white;
|
|
37
|
+
display: inline-block;
|
|
38
|
+
font-weight: bold;
|
|
39
|
+
font-size: 15px;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
package/components/product/product_multipacks_carousel/product_multipack/product-multipack.vue
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:id="`product-multipack-${multipack._id}`"
|
|
4
|
+
class="ProductMultipack__wrapper">
|
|
5
|
+
<div class="ProductMultipack__banner">
|
|
6
|
+
<div
|
|
7
|
+
class="ProductMultipack__image"
|
|
8
|
+
:style="{
|
|
9
|
+
'background-image': multipack.image ? `url('${multipack.image.small}'` : null
|
|
10
|
+
}">
|
|
11
|
+
</div>
|
|
12
|
+
<div class="ProductMultipack__banner-info">
|
|
13
|
+
<div class="ProductMultipack__banner-info-item">
|
|
14
|
+
<btn
|
|
15
|
+
style="padding: 10px; height: 35px; margin-bottom: 10px;"
|
|
16
|
+
btn-class="green"
|
|
17
|
+
btn-label="BUY"
|
|
18
|
+
size="sm"
|
|
19
|
+
@onclick="buyMultipack()" />
|
|
20
|
+
</div>
|
|
21
|
+
<div class="ProductMultipack__banner-info-item">
|
|
22
|
+
<span>{{ multipack.qty }}</span>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="ProductMultipack__banner-info-item">
|
|
25
|
+
<span>{{ totalPrice | priceWithTax(pricingSettings, currency) }}</span>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="ProductMultipack__price">
|
|
30
|
+
Only {{ oneItemPrice | priceWithTax(pricingSettings, currency) }} each
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script>
|
|
36
|
+
import { mapGetters, mapMutations } from 'vuex';
|
|
37
|
+
import { priceWithTax, inRange } from '@lancom/shared/assets/js/utils/filters';
|
|
38
|
+
|
|
39
|
+
export default {
|
|
40
|
+
name: 'LancomProductMultipack',
|
|
41
|
+
filters: {
|
|
42
|
+
priceWithTax
|
|
43
|
+
},
|
|
44
|
+
props: {
|
|
45
|
+
multipack: {
|
|
46
|
+
type: Object,
|
|
47
|
+
required: true
|
|
48
|
+
},
|
|
49
|
+
simpleProducts: {
|
|
50
|
+
type: Array,
|
|
51
|
+
required: true
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
computed: {
|
|
55
|
+
...mapGetters(['pricingSettings', 'currency']),
|
|
56
|
+
simpleProduct() {
|
|
57
|
+
return (this.simpleProducts || []).find(sp => sp.SKU === this.multipack.SKU);
|
|
58
|
+
},
|
|
59
|
+
totalPrice() {
|
|
60
|
+
return this.oneItemPrice * this.multipack.qty;
|
|
61
|
+
},
|
|
62
|
+
oneItemPrice() {
|
|
63
|
+
return (this.simpleProduct?.pricing || []).find(p => p.min === this.multipack.qty)?.price || 0;
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
methods: {
|
|
67
|
+
...mapMutations('product', ['setSimpleProductAmount']),
|
|
68
|
+
buyMultipack() {
|
|
69
|
+
this.setSimpleProductAmount({
|
|
70
|
+
colorId: this.simpleProduct.color._id,
|
|
71
|
+
sizeId: this.simpleProduct.size._id,
|
|
72
|
+
amount: inRange(this.multipack.qty, 0, this.simpleProduct.quantityStock || 999)
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<style lang="scss" scoped>
|
|
80
|
+
@import 'product-multipack.scss';
|
|
81
|
+
</style>
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
{{ product[minPriceAttr] | tax(gstTax) | price(currency) }}
|
|
11
11
|
<span
|
|
12
12
|
v-if="visiblePriceInfo"
|
|
13
|
-
class="lc_regular11 lc_bold">inc.
|
|
13
|
+
class="lc_regular11 lc_bold">inc. {{ taxName }}</span>
|
|
14
14
|
</div>
|
|
15
15
|
<div
|
|
16
16
|
v-if="withoutGst"
|
|
17
17
|
:class="withGst ? 'lc_regular11' : 'lc_h4'">
|
|
18
|
-
{{ prePriceText }} {{ product[minPriceAttr] | price(currency) }} +
|
|
18
|
+
{{ prePriceText }} {{ product[minPriceAttr] | price(currency) }} + {{ taxName }}
|
|
19
19
|
</div>
|
|
20
20
|
</div>
|
|
21
21
|
<div
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
{{ product[minPriceAttr] | tax(gstTax) | price(currency) }} {{ rangeDivider }} {{ product[maxPriceAttr] | tax(gstTax) | price(currency) }}
|
|
28
28
|
<span
|
|
29
29
|
v-if="visiblePriceInfo"
|
|
30
|
-
class="lc_regular11 lc_bold"> inc.
|
|
30
|
+
class="lc_regular11 lc_bold"> inc. {{ taxName }}</span>
|
|
31
31
|
</div>
|
|
32
32
|
<div
|
|
33
33
|
v-if="withoutGst"
|
|
34
34
|
:class="withGst ? 'lc_regular11' : 'lc_h4'">
|
|
35
|
-
{{ prePriceText }} {{ product[minPriceAttr] | price(currency) }} {{ rangeDivider }} {{ product[maxPriceAttr] | price(currency) }} +
|
|
35
|
+
{{ prePriceText }} {{ product[minPriceAttr] | price(currency) }} {{ rangeDivider }} {{ product[maxPriceAttr] | price(currency) }} + {{ taxName }}
|
|
36
36
|
</div>
|
|
37
37
|
</div>
|
|
38
38
|
</div>
|
|
@@ -84,7 +84,8 @@ export default {
|
|
|
84
84
|
},
|
|
85
85
|
computed: {
|
|
86
86
|
...mapGetters([
|
|
87
|
-
'gstTax'
|
|
87
|
+
'gstTax',
|
|
88
|
+
'taxName'
|
|
88
89
|
])
|
|
89
90
|
}
|
|
90
91
|
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<checkbox
|
|
5
5
|
v-model="inclGST"
|
|
6
6
|
:dark="true">
|
|
7
|
-
<div class="ml-5">Inc.
|
|
7
|
+
<div class="ml-5">Inc. {{ taxName }}</div>
|
|
8
8
|
</checkbox>
|
|
9
9
|
</div>
|
|
10
10
|
<tabs
|
|
@@ -88,7 +88,7 @@ export default {
|
|
|
88
88
|
};
|
|
89
89
|
},
|
|
90
90
|
computed: {
|
|
91
|
-
...mapGetters(['shop']),
|
|
91
|
+
...mapGetters(['shop', 'taxName']),
|
|
92
92
|
...mapGetters('product', ['priceIncludeGST']),
|
|
93
93
|
...mapGetters(['helpMessages']),
|
|
94
94
|
hasPrintSurcharge() {
|