@lancom/shared 0.0.447 → 0.0.448
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/checkout/cart/cart_entity/cart_entity_color_simple_products/cart-entity-color-simple-products.mixin.js +9 -1
- package/components/checkout/cart/cart_entity/cart_entity_color_simple_products/cart-entity-color-simple-products.vue +2 -1
- package/components/checkout/cart/cart_shipments_pricing/cart-shipments-pricing.vue +1 -1
- package/components/checkout/cart/cart_shipping/cart-shipping.vue +4 -1
- package/components/product/editor_pricing/editor-pricing.scss +16 -3
- package/components/product/editor_pricing/editor-pricing.vue +12 -8
- package/components/product/product_check_delivery/product-check-delivery.vue +5 -4
- package/feeds/google-shopping.js +2 -2
- package/package.json +1 -1
|
@@ -2,6 +2,8 @@ import { mapGetters } from 'vuex';
|
|
|
2
2
|
import ImageViewer from '@lancom/shared/components/common/image_viewer/image-viewer';
|
|
3
3
|
import { staticLink } from '@lancom/shared/assets/js/utils/filters';
|
|
4
4
|
import { getProductColorImages } from '@lancom/shared/assets/js/utils/product';
|
|
5
|
+
import { isValidImageType } from '@lancom/shared/assets/js/utils/colors';
|
|
6
|
+
import { COLORS_IMAGES_TYPES } from '@lancom/shared/assets/js/constants/colors';
|
|
5
7
|
|
|
6
8
|
export default {
|
|
7
9
|
props: {
|
|
@@ -40,6 +42,12 @@ export default {
|
|
|
40
42
|
images() {
|
|
41
43
|
return getProductColorImages(this.group, this.group.color);
|
|
42
44
|
},
|
|
45
|
+
hasFrontImage() {
|
|
46
|
+
return this.images.some(image => isValidImageType(image, COLORS_IMAGES_TYPES.FRONT));
|
|
47
|
+
},
|
|
48
|
+
hasBackImage() {
|
|
49
|
+
return this.images.some(image => isValidImageType(image, COLORS_IMAGES_TYPES.BACK));
|
|
50
|
+
},
|
|
43
51
|
product() {
|
|
44
52
|
return this.group.product;
|
|
45
53
|
},
|
|
@@ -59,7 +67,7 @@ export default {
|
|
|
59
67
|
}, 0);
|
|
60
68
|
},
|
|
61
69
|
simpleProductWithInvalidStock() {
|
|
62
|
-
return this.simpleProductsWithAmount.filter(({ amount, quantityStock }) => amount > quantityStock)
|
|
70
|
+
return this.simpleProductsWithAmount.filter(({ amount, quantityStock }) => amount > quantityStock);
|
|
63
71
|
}
|
|
64
72
|
},
|
|
65
73
|
methods: {
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
</div>
|
|
8
8
|
<div class="CartEntityColorSimpleProducts__image-wrapper">
|
|
9
9
|
<div
|
|
10
|
+
v-if="hasFrontImage"
|
|
10
11
|
class="CartEntityColorSimpleProducts__image"
|
|
11
12
|
@click="showImage(images, 0)">
|
|
12
13
|
<product-side-with-print
|
|
@@ -17,7 +18,7 @@
|
|
|
17
18
|
size="medium" />
|
|
18
19
|
</div>
|
|
19
20
|
<div
|
|
20
|
-
v-if="entity && entity.printsThumbnails && entity.printsThumbnails.back"
|
|
21
|
+
v-if="entity && entity.printsThumbnails && entity.printsThumbnails.back && hasBackImage"
|
|
21
22
|
class="CartEntityColorSimpleProducts__image"
|
|
22
23
|
@click="showImage(images, 1)">
|
|
23
24
|
<product-side-with-print
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
<div
|
|
31
31
|
v-if="!isAvailableForPickupSomeProducts"
|
|
32
32
|
class="CartShipping__pickup-warnings">
|
|
33
|
-
Pickup only available for "
|
|
33
|
+
Pickup only available for "{{ pickupBrand }}" brand
|
|
34
34
|
</div>
|
|
35
35
|
<div
|
|
36
36
|
v-if="visiblePickupError && hasNotValidProductsPickup"
|
|
@@ -84,6 +84,9 @@ export default {
|
|
|
84
84
|
'cartPricing',
|
|
85
85
|
'cartPricingError'
|
|
86
86
|
]),
|
|
87
|
+
pickupBrand() {
|
|
88
|
+
return this.SETTINGS.DEFAULT_PICKUP_BRAND || 'Code Red';
|
|
89
|
+
},
|
|
87
90
|
postcodeInfoLabel() {
|
|
88
91
|
return this.MESSAGES.CART_POSTCODE_INFO || 'Enter postcode to calculate shipping';
|
|
89
92
|
},
|
|
@@ -27,12 +27,25 @@
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
&__clearance-
|
|
30
|
+
&__clearance-messages {
|
|
31
31
|
padding: 10px;
|
|
32
32
|
text-align: center;
|
|
33
33
|
border-top: 1px solid #E5E5E5;
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
}
|
|
35
|
+
&__clearance-message {
|
|
36
|
+
background-color: #fff3cd;
|
|
37
|
+
color: #856404;
|
|
38
|
+
border: 1px solid #ffeaa7;
|
|
39
|
+
font-size: 14px;
|
|
40
|
+
font-weight: 500;
|
|
41
|
+
line-height: 20px;
|
|
42
|
+
padding: 4px 12px;
|
|
43
|
+
text-align: center;
|
|
44
|
+
border-radius: 4px;
|
|
45
|
+
margin-top: 5px;
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
gap: 5px;
|
|
36
49
|
}
|
|
37
50
|
&__footer {
|
|
38
51
|
background: $green;
|
|
@@ -70,14 +70,18 @@
|
|
|
70
70
|
</div>
|
|
71
71
|
</div>
|
|
72
72
|
<div
|
|
73
|
-
v-if="product.isClearance"
|
|
74
|
-
class="EditorPricing__clearance-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
73
|
+
v-if="product.isClearance || clearanceColorsWithQty.length > 0"
|
|
74
|
+
class="EditorPricing__clearance-messages">
|
|
75
|
+
<div
|
|
76
|
+
v-if="product.isClearance"
|
|
77
|
+
class="EditorPricing__clearance-message">
|
|
78
|
+
Product is non-returnable clearance product
|
|
79
|
+
</div>
|
|
80
|
+
<div
|
|
81
|
+
v-if="clearanceColorsWithQty.length"
|
|
82
|
+
class="EditorPricing__clearance-message">
|
|
83
|
+
{{ clearanceColorsWithQty.length > 1 ? 'Colours' : 'Colour' }}: {{ clearanceColorsText }} {{ clearanceColorsWithQty.length > 1 ? 'are' : 'is' }} non-returnable clearance {{ clearanceColorsWithQty.length > 1 ? 'colours' : 'colour' }}
|
|
84
|
+
</div>
|
|
81
85
|
</div>
|
|
82
86
|
<div
|
|
83
87
|
v-if="hasPricing"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
<div>{{ rate.name }}</div>
|
|
56
56
|
<div
|
|
57
57
|
v-if="rate.note"
|
|
58
|
-
class="
|
|
58
|
+
class="lc_regular12">
|
|
59
59
|
{{ rate.note }}
|
|
60
60
|
</div>
|
|
61
61
|
</div>
|
|
@@ -125,7 +125,7 @@ export default {
|
|
|
125
125
|
usedSimpleProducts: {
|
|
126
126
|
handler() {
|
|
127
127
|
const currentSignature = this.buildSignature();
|
|
128
|
-
if (this.hasSelection && currentSignature !== this.lastUsedSimpleProductsSignature) {
|
|
128
|
+
if (this.hasSelection && currentSignature !== this.lastUsedSimpleProductsSignature && this.currentSignature.length) {
|
|
129
129
|
if (this.pricing) {
|
|
130
130
|
this.recalcNeeded = true;
|
|
131
131
|
} else {
|
|
@@ -138,7 +138,9 @@ export default {
|
|
|
138
138
|
},
|
|
139
139
|
value() {
|
|
140
140
|
if (this.pricing) {
|
|
141
|
-
this.
|
|
141
|
+
if (this.value?.size && this.value?.quantity) {
|
|
142
|
+
this.recalcNeeded = true;
|
|
143
|
+
}
|
|
142
144
|
} else {
|
|
143
145
|
this.calculateShipping();
|
|
144
146
|
}
|
|
@@ -186,7 +188,6 @@ export default {
|
|
|
186
188
|
currency: this.currency?._id
|
|
187
189
|
};
|
|
188
190
|
this.pricing = await api.calculateProductPrice(payload, this.shop._id);
|
|
189
|
-
this.lastUsedSimpleProductsSignature = this.buildSignature(usedSimpleProducts);
|
|
190
191
|
} catch (e) {
|
|
191
192
|
this.pricing = null;
|
|
192
193
|
} finally {
|
package/feeds/google-shopping.js
CHANGED
|
@@ -135,8 +135,8 @@ async function googleShoppingFeed(axios, config, availableStores, country, isEdi
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
if (product.country) {
|
|
139
|
-
info['g:shipping_label'] = product.country;
|
|
138
|
+
if (product.country || sp.shippingLabel) {
|
|
139
|
+
info['g:shipping_label'] = sp.shippingLabel || product.country;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
if (allowSameDayDelivery && product.sameDayDelivery) {
|