@lancom/shared 0.0.267 → 0.0.268
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 +11 -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 +12 -4
- 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_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/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
|
},
|
|
@@ -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() {
|
|
@@ -10,20 +10,21 @@
|
|
|
10
10
|
right: 0;
|
|
11
11
|
top: 41px;
|
|
12
12
|
padding: 10px;
|
|
13
|
-
background-color:
|
|
14
|
-
|
|
13
|
+
background-color: white;
|
|
14
|
+
border: 1px solid $medium_gray;
|
|
15
|
+
z-index: 999;
|
|
15
16
|
}
|
|
16
17
|
&__result-item {
|
|
17
18
|
padding-bottom: 10px;
|
|
18
19
|
margin-bottom: 10px;
|
|
19
|
-
border-bottom: 1px solid $
|
|
20
|
+
border-bottom: 1px solid $medium_gray;
|
|
20
21
|
&:last-child {
|
|
21
22
|
border-bottom: none;
|
|
22
23
|
margin-bottom: 0px;
|
|
23
24
|
}
|
|
24
25
|
::v-deep {
|
|
25
26
|
a {
|
|
26
|
-
color: $
|
|
27
|
+
color: $gray_main;
|
|
27
28
|
font-size: 13px;
|
|
28
29
|
text-decoration: none;
|
|
29
30
|
}
|
|
@@ -33,24 +34,22 @@
|
|
|
33
34
|
padding: 10px;
|
|
34
35
|
text-align: center;
|
|
35
36
|
display: block;
|
|
36
|
-
background-color: $
|
|
37
|
+
background-color: $black;
|
|
38
|
+
color: $white !important;
|
|
37
39
|
&:hover {
|
|
38
|
-
background-color: $
|
|
39
|
-
color: $
|
|
40
|
+
background-color: $white;
|
|
41
|
+
color: $black !important;
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
}
|
|
43
45
|
&__input {
|
|
44
46
|
input {
|
|
45
|
-
|
|
46
|
-
border: none;
|
|
47
|
+
border-color: $medium_gray;
|
|
47
48
|
border-radius: 0px;
|
|
48
|
-
color: $white;
|
|
49
49
|
height: 41px;
|
|
50
50
|
position: relative;
|
|
51
51
|
z-index: 1;
|
|
52
52
|
&::placeholder {
|
|
53
|
-
font-weight: 600;
|
|
54
53
|
font-size: 14px;
|
|
55
54
|
color: $grey_3;
|
|
56
55
|
}
|
|
@@ -61,7 +60,6 @@
|
|
|
61
60
|
right: 10px;
|
|
62
61
|
font-size: 17px;
|
|
63
62
|
pointer-events: none;
|
|
64
|
-
color: $white;
|
|
65
63
|
&.icon-search {
|
|
66
64
|
z-index: 2;
|
|
67
65
|
pointer-events: all;
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
<div>Products Total: <b>{{ option.productsTotal | price(currency) }}</b></div>
|
|
12
12
|
<div>Prints Total: <b>{{ option.printsTotal | price(currency) }}</b></div>
|
|
13
13
|
<div>Shipping Total: <b>{{ option.shippingTotal | price(currency) }}</b></div>
|
|
14
|
-
<div>Total ex
|
|
15
|
-
<div>
|
|
16
|
-
<div>Total inc
|
|
14
|
+
<div>Total ex {{ taxName }}: <b>{{ option.total | price(currency) }}</b></div>
|
|
15
|
+
<div>{{ taxName }}: <b>{{ optionGst(option) | price(currency) }}</b></div>
|
|
16
|
+
<div>Total inc {{ taxName }}: <b>{{ option.total | tax(gstTax) | price(currency) }}</b></div>
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
19
19
|
</template>
|
|
@@ -40,7 +40,8 @@ export default {
|
|
|
40
40
|
},
|
|
41
41
|
computed: {
|
|
42
42
|
...mapGetters([
|
|
43
|
-
'gstTax'
|
|
43
|
+
'gstTax',
|
|
44
|
+
'taxName'
|
|
44
45
|
])
|
|
45
46
|
},
|
|
46
47
|
methods: {
|
package/mixins/meta-info.js
CHANGED
|
@@ -34,7 +34,10 @@ const metaInfo = {
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
head() {
|
|
37
|
-
const hasQueryParams = Object
|
|
37
|
+
const hasQueryParams = Object
|
|
38
|
+
.keys(this.$route.query || {})
|
|
39
|
+
.filter(key => !['color', 'store'].includes(`${key || ''}`.toLowerCase()))
|
|
40
|
+
.length > 0;
|
|
38
41
|
|
|
39
42
|
const { short_text: shortText, image, meta = {} } = this.routeInfo || {};
|
|
40
43
|
const pageItemMeta = this.pageItem?.meta || {};
|
package/mixins/products-price.js
CHANGED
|
@@ -22,7 +22,7 @@ const productsPrice = {
|
|
|
22
22
|
};
|
|
23
23
|
},
|
|
24
24
|
computed: {
|
|
25
|
-
...mapGetters(['pricingSettings', 'shop']),
|
|
25
|
+
...mapGetters(['pricingSettings', 'shop', 'country']),
|
|
26
26
|
printsPricing() {
|
|
27
27
|
const pricing = {};
|
|
28
28
|
if (this.productPricing) {
|
|
@@ -72,7 +72,8 @@ const productsPrice = {
|
|
|
72
72
|
const playload = {
|
|
73
73
|
products: this.calcProducts,
|
|
74
74
|
postcode: this.postcode,
|
|
75
|
-
screenPrint: this.screenPrint
|
|
75
|
+
screenPrint: this.screenPrint,
|
|
76
|
+
country: this.country?._id
|
|
76
77
|
};
|
|
77
78
|
this.productPricing = await api.calculateProductPrice(playload, this.shop._id);
|
|
78
79
|
}
|
package/package.json
CHANGED
package/store/cart.js
CHANGED
|
@@ -148,9 +148,9 @@ export const actions = {
|
|
|
148
148
|
await api.saveCart(payload, shop._id);
|
|
149
149
|
commit('setEntities', entities);
|
|
150
150
|
},
|
|
151
|
-
async calculateCartPrice({ state: { suburb, entities, coupon, cartPricing }, commit }, { shop }) {
|
|
151
|
+
async calculateCartPrice({ state: { suburb, entities, coupon, cartPricing }, commit }, { shop, country }) {
|
|
152
152
|
const selectedSuppliersWithRates = cartPricing?.shipping?.suppliersWithRates;
|
|
153
|
-
const payload = generateCalculatePriceData(entities, suburb, null, coupon, selectedSuppliersWithRates);
|
|
153
|
+
const payload = generateCalculatePriceData(entities, suburb, null, coupon, selectedSuppliersWithRates, country);
|
|
154
154
|
try {
|
|
155
155
|
commit('setCartPricingCalculating', true);
|
|
156
156
|
const response = await api.calculateProductPrice(payload, shop._id);
|
|
@@ -179,7 +179,7 @@ export const actions = {
|
|
|
179
179
|
clearCart({ commit }) {
|
|
180
180
|
commit('clearCart');
|
|
181
181
|
},
|
|
182
|
-
async selectRate({ state: { cartPricing, entities, suburb, coupon }, commit }, { supplier, rate, shop }) {
|
|
182
|
+
async selectRate({ state: { cartPricing, entities, suburb, coupon }, commit }, { supplier, rate, shop, country }) {
|
|
183
183
|
const suppliersWithRates = cartPricing.shipping.suppliersWithRates
|
|
184
184
|
.map(supplierWithRates => ({
|
|
185
185
|
...(
|
|
@@ -190,7 +190,7 @@ export const actions = {
|
|
|
190
190
|
})
|
|
191
191
|
: supplierWithRates)
|
|
192
192
|
}));
|
|
193
|
-
const payload = generateCalculatePriceData(entities, suburb, suppliersWithRates, coupon);
|
|
193
|
+
const payload = generateCalculatePriceData(entities, suburb, suppliersWithRates, coupon, null, country);
|
|
194
194
|
try {
|
|
195
195
|
commit('setCartPricingCalculating', true);
|
|
196
196
|
const response = await api.calculateProductPrice(payload, shop._id);
|
|
@@ -245,7 +245,7 @@ export const mutations = {
|
|
|
245
245
|
}
|
|
246
246
|
};
|
|
247
247
|
|
|
248
|
-
function generateCalculatePriceData(entities, suburb, suppliersWithRates, coupon, selectedSuppliersWithRates) {
|
|
248
|
+
function generateCalculatePriceData(entities, suburb, suppliersWithRates, coupon, selectedSuppliersWithRates, country) {
|
|
249
249
|
const getSimpleObj = i => i && ({ _id: i._id, name: i.name });
|
|
250
250
|
return {
|
|
251
251
|
entities: entities.map(({ _id, guid, prints, simpleProducts, product }) => ({
|
|
@@ -285,6 +285,7 @@ function generateCalculatePriceData(entities, suburb, suppliersWithRates, coupon
|
|
|
285
285
|
address: suburb ? [suburb.locality, suburb.state, suburb.postcode].filter(i => !!i).join(', ') : null,
|
|
286
286
|
coupon,
|
|
287
287
|
suppliersWithRates,
|
|
288
|
-
selectedSuppliersWithRates
|
|
288
|
+
selectedSuppliersWithRates,
|
|
289
|
+
country: country?._id
|
|
289
290
|
};
|
|
290
291
|
}
|
package/store/index.js
CHANGED
|
@@ -35,6 +35,7 @@ export const getters = {
|
|
|
35
35
|
pricingSettings: ({ pricing }) => pricing || {},
|
|
36
36
|
orderSettings: ({ orderInfo }) => orderInfo || {},
|
|
37
37
|
gstTax: ({ pricing }) => pricing?.gstTax || 0,
|
|
38
|
+
taxName: ({ pricing }) => pricing?.taxName || 'GST',
|
|
38
39
|
displayPricingWithTax: ({ pricing }) => !!pricing?.displayPricingWithTax,
|
|
39
40
|
screenPrintsPrices: ({ pricing }) => pricing?.screenPrintsPrices || {},
|
|
40
41
|
depositInfo: ({ depositInfo }) => depositInfo || {}
|
|
@@ -55,14 +56,15 @@ export const actions = {
|
|
|
55
56
|
commit('setCountry', settings.country);
|
|
56
57
|
commit('setCurrency', settings.currency);
|
|
57
58
|
|
|
59
|
+
const countrySettings = (shop.countries || []).find(c => c.country?._id === settings.country?._id) || { settings: [] };
|
|
60
|
+
|
|
58
61
|
if (process.env.PINPAYMENT_PUBLISHABLE_API_KEY) {
|
|
59
62
|
commit('setPayment', {
|
|
60
63
|
type: 'pinpayment',
|
|
61
64
|
clientKey: process.env.PINPAYMENT_PUBLISHABLE_API_KEY
|
|
62
65
|
});
|
|
63
66
|
} else {
|
|
64
|
-
const
|
|
65
|
-
const countrySetting = countrySettings.settings.find(s => !!s.settings.app.STRIPE_PUBLIC_KEY);
|
|
67
|
+
const countrySetting = (countrySettings?.settings || []).find(s => !!s.settings.app.STRIPE_PUBLIC_KEY);
|
|
66
68
|
if (countrySetting) {
|
|
67
69
|
commit('setPayment', {
|
|
68
70
|
type: 'stripe',
|
|
@@ -71,6 +73,13 @@ export const actions = {
|
|
|
71
73
|
}
|
|
72
74
|
}
|
|
73
75
|
|
|
76
|
+
|
|
77
|
+
const pricingSetting = (countrySettings?.settings || []).find(s => !!s.settings.pricing);
|
|
78
|
+
commit('setPricing', {
|
|
79
|
+
...shop.settings.pricing,
|
|
80
|
+
...(pricingSetting?.settings?.pricing || {})
|
|
81
|
+
});
|
|
82
|
+
|
|
74
83
|
// }
|
|
75
84
|
try {
|
|
76
85
|
if (req.headers.cookie) {
|
|
@@ -99,7 +108,7 @@ export const actions = {
|
|
|
99
108
|
commit('cart/setCoupon', coupon);
|
|
100
109
|
} catch (e) {}
|
|
101
110
|
}
|
|
102
|
-
dispatch('cart/calculateCartPrice', { shop });
|
|
111
|
+
dispatch('cart/calculateCartPrice', { shop, country });
|
|
103
112
|
}
|
|
104
113
|
}
|
|
105
114
|
const closedNotification = localStorage.getItem(CLOSED_NOTIFICATION);
|
|
@@ -121,15 +130,17 @@ export const mutations = {
|
|
|
121
130
|
setPayment(state, payment) {
|
|
122
131
|
state.payment = payment;
|
|
123
132
|
},
|
|
133
|
+
setPricing(state, pricing) {
|
|
134
|
+
state.pricing = pricing;
|
|
135
|
+
},
|
|
124
136
|
setCountry(state, country) {
|
|
125
137
|
state.country = country;
|
|
126
138
|
},
|
|
127
139
|
setCurrency(state, currency) {
|
|
128
140
|
state.currency = currency;
|
|
129
141
|
},
|
|
130
|
-
setSettings(state, { contacts,
|
|
142
|
+
setSettings(state, { contacts, notificationBar, discountPopup, order, depositInfo }) {
|
|
131
143
|
state.contacts = contacts;
|
|
132
|
-
state.pricing = pricing;
|
|
133
144
|
state.orderInfo = order;
|
|
134
145
|
state.notificationBar = notificationBar;
|
|
135
146
|
state.discountPopup = discountPopup;
|
package/store/product.js
CHANGED
|
@@ -161,6 +161,7 @@ export const actions = {
|
|
|
161
161
|
commit('setSelectedPrintArea', { printArea: first._id, size: first.printSize });
|
|
162
162
|
}
|
|
163
163
|
} catch (e) {
|
|
164
|
+
console.log(e);
|
|
164
165
|
const { status, data } = e?.response || {};
|
|
165
166
|
const statusCode = status || 500;
|
|
166
167
|
commit('setLoadError', {
|
|
@@ -200,10 +201,10 @@ export const actions = {
|
|
|
200
201
|
async updatePriceIncludeGST({ commit }, value) {
|
|
201
202
|
commit('setPriceIncludeGST', value);
|
|
202
203
|
},
|
|
203
|
-
async calculateProductPrice({ state: { template, product, isPrintPricing }, commit, getters }, shop) {
|
|
204
|
+
async calculateProductPrice({ state: { template, product, isPrintPricing }, commit, getters }, { shop, country }) {
|
|
204
205
|
commit('setCalculatingPrice', true);
|
|
205
206
|
const entities = getProductsForCalculatePricing(product, getters.usedSimpleProducts, template.layers, isPrintPricing, true);
|
|
206
|
-
const response = await api.calculateProductPrice({ entities }, shop._id);
|
|
207
|
+
const response = await api.calculateProductPrice({ entities, country: country?._id }, shop._id);
|
|
207
208
|
commit('setProductPricing', response);
|
|
208
209
|
commit('setCalculatingPrice', false);
|
|
209
210
|
},
|