@wikala/spmkt 2.10.4 → 2.11.1
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/Cart/CartItem.vue +16 -26
- package/components/Cart/CartPreview.vue +1 -1
- package/components/Cart/CartSummary.vue +2 -2
- package/components/Cart/Delivery/DeliveryMethods.vue +2 -1
- package/components/Cart/Store/actions.js +1 -0
- package/components/Cart/UserIdentity.vue +1 -1
- package/components/QuantityInput.vue +6 -0
- package/locales/sr.json +3 -3
- package/package.json +1 -1
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
<div :class="['cart-item', { 'ci-error': item.error }]">
|
|
3
3
|
<div class="ci-product">
|
|
4
4
|
<div class="ci-product-image">
|
|
5
|
-
<a :href="item.slug"><img :src="item.image_url" class="image is-64x64" /></a>
|
|
5
|
+
<a :href="item.slug" :class="[{ 'is-link-passive': !item.storefront_visibility }]"><img :src="item.image_url" class="image is-64x64" /></a>
|
|
6
6
|
</div>
|
|
7
7
|
<div class="ci-name">
|
|
8
8
|
<div class="ci-product-name">
|
|
9
|
-
<a :href="item.slug">{{ item.name }}</a>
|
|
9
|
+
<a :href="item.slug" :class="[{ 'is-link-passive': !item.storefront_visibility }]">{{ item.name }}</a>
|
|
10
10
|
</div>
|
|
11
11
|
</div>
|
|
12
12
|
<div class="ci-price">
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<div>{{ formatMoney(item.price, { precision: 2 }) }}</div>
|
|
15
15
|
</div>
|
|
16
16
|
<div class="ci-qty">
|
|
17
|
-
<quantity-input :value="
|
|
17
|
+
<quantity-input :value="itemQty" @input="changeQty($event, item.id)"></quantity-input>
|
|
18
18
|
</div>
|
|
19
19
|
</div>
|
|
20
20
|
<div v-if="item.error" :class="{ 'ci-error-msg': item.error }">
|
|
@@ -41,6 +41,12 @@ export default {
|
|
|
41
41
|
item: Object
|
|
42
42
|
},
|
|
43
43
|
|
|
44
|
+
data() {
|
|
45
|
+
return {
|
|
46
|
+
itemQty: 0
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
|
|
44
50
|
computed: {
|
|
45
51
|
...mapState(['cart', 'activeStep', 'steps'])
|
|
46
52
|
},
|
|
@@ -48,35 +54,14 @@ export default {
|
|
|
48
54
|
methods: {
|
|
49
55
|
...mapMutations(['setCart']),
|
|
50
56
|
formatMoney,
|
|
51
|
-
/*
|
|
52
|
-
cartItemRemoveHover(event) {
|
|
53
|
-
if (event.target.classList.contains('has-text-danger')) {
|
|
54
|
-
event.target.classList.remove('has-text-danger')
|
|
55
|
-
} else {
|
|
56
|
-
event.target.classList.add('has-text-danger')
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
cartItemRemove(productId) {
|
|
61
|
-
let irLoading = this.$buefy.loading.open({
|
|
62
|
-
container: this.$el
|
|
63
|
-
})
|
|
64
|
-
Cart.update({ id: productId, qty: 0 })
|
|
65
|
-
.then((response) => {
|
|
66
|
-
irLoading.close()
|
|
67
|
-
this.setCart(response.data)
|
|
68
|
-
})
|
|
69
|
-
.catch((error) => {
|
|
70
|
-
irLoading.close()
|
|
71
|
-
console.log(error)
|
|
72
|
-
})
|
|
73
|
-
},*/
|
|
74
57
|
|
|
75
58
|
async changeQty(qty, productId) {
|
|
76
59
|
const cqLoading = this.$buefy.loading.open({
|
|
77
60
|
container: this.$el
|
|
78
61
|
})
|
|
79
62
|
|
|
63
|
+
this.itemQty = parseInt(qty)
|
|
64
|
+
|
|
80
65
|
let requestData = {
|
|
81
66
|
id: productId,
|
|
82
67
|
qty: qty
|
|
@@ -96,6 +81,8 @@ export default {
|
|
|
96
81
|
}
|
|
97
82
|
this.$bus.$emit('updateTotalQty', response.data.sumQty)
|
|
98
83
|
cqLoading.close()
|
|
84
|
+
let responseItem = response.data.items.find(item => item.id === productId)
|
|
85
|
+
this.itemQty = responseItem.qty
|
|
99
86
|
this.setCart(response.data)
|
|
100
87
|
} catch (error) {
|
|
101
88
|
cqLoading.close()
|
|
@@ -128,6 +115,9 @@ export default {
|
|
|
128
115
|
})
|
|
129
116
|
}
|
|
130
117
|
}
|
|
118
|
+
},
|
|
119
|
+
mounted() {
|
|
120
|
+
this.itemQty = this.item.qty
|
|
131
121
|
}
|
|
132
122
|
}
|
|
133
123
|
</script>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<div class="ci-qty has-text-right has-text-grey-light">{{ $t('global.quantity') }}</div>
|
|
19
19
|
</div>
|
|
20
20
|
<div class="cart-items">
|
|
21
|
-
<CartItem v-for="item in cart.items" :key="item.id" :item="item"></CartItem>
|
|
21
|
+
<CartItem v-for="item in cart.items" :key="item.id+item.qty" :item="item"></CartItem>
|
|
22
22
|
</div>
|
|
23
23
|
|
|
24
24
|
<div v-if="cart.equivalent_qty > 0">
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
</transition>
|
|
28
28
|
</td>
|
|
29
29
|
</tr>
|
|
30
|
-
<tr>
|
|
30
|
+
<tr v-if="activeStep <= 1 && cart.shipping > 0 || activeStep > 1">
|
|
31
31
|
<td>{{ $t('global.shipping') }}</td>
|
|
32
32
|
<td class="has-text-right">
|
|
33
33
|
<transition name="slide-fade-up">
|
|
@@ -89,7 +89,7 @@ export default {
|
|
|
89
89
|
},
|
|
90
90
|
|
|
91
91
|
computed: {
|
|
92
|
-
...mapState(['cart'])
|
|
92
|
+
...mapState(['cart', 'activeStep'])
|
|
93
93
|
},
|
|
94
94
|
|
|
95
95
|
methods: {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<div v-if="!cart.free_delivery && deliveryMethods.length > 0" class="delivery-method-container mt-5" :class="[ { 'is-hidden': advancedOrdering } ]">
|
|
4
4
|
<h2 class="subtitle is-5">{{ $tc('cart.selectDeliveryMethod', hasOneChoice ? 1 : 2) }}</h2>
|
|
5
|
+
|
|
5
6
|
<div v-for="(locationMethods, ssmIndex) in deliveryMethods" class="seller-delivery-method" :key="ssmIndex">
|
|
6
7
|
<div class="columns">
|
|
7
8
|
<div class="column">
|
|
@@ -17,7 +18,7 @@
|
|
|
17
18
|
</b-radio>
|
|
18
19
|
</div>
|
|
19
20
|
<div class="sm-cost">
|
|
20
|
-
<span v-if="deliveryCost.
|
|
21
|
+
<span v-if="deliveryCost.cost > 0">{{ $t('cart.deliveryCost') }} {{formatMoney(deliveryCost.cost)}}</span>
|
|
21
22
|
<span v-else>{{ $t('cart.deliveryCostFree') }}</span>
|
|
22
23
|
</div>
|
|
23
24
|
<div class="break"></div>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<form id="user-identity" name="frmUserIndentity" @keypress="frmChange($event)" @change="frmChange($event)" action="#">
|
|
4
4
|
|
|
5
5
|
<div class="columns">
|
|
6
|
-
<div class="column" ref="emailCol">
|
|
6
|
+
<div class="column uid-email" ref="emailCol">
|
|
7
7
|
<b-field label="Email" label-position="inside" :type="{ 'is-danger': errors.email }" :message="errors.email">
|
|
8
8
|
<b-input
|
|
9
9
|
native-value="inside"
|
package/locales/sr.json
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"orderDetails": "Detalji narudžbenice",
|
|
23
23
|
"orderNumber": "Broj narudžbenice:",
|
|
24
24
|
"orderPaymentInfo": "Informacije o plaćanju",
|
|
25
|
-
"orderShippingInfo": "Informacije o
|
|
25
|
+
"orderShippingInfo": "Informacije o isporuci",
|
|
26
26
|
"orderTrackPackage": "Prati paket",
|
|
27
27
|
"orderTrackingNumber": "Broj za praćenje",
|
|
28
28
|
"orders": "Narudžbenice",
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
"save": "Snimi",
|
|
193
193
|
"seconds": "sekundi",
|
|
194
194
|
"setAsDefault": "Postavi kao podrazumevano",
|
|
195
|
-
"shipping": "
|
|
195
|
+
"shipping": "Isporuka",
|
|
196
196
|
"status": "Status",
|
|
197
197
|
"subtotal": "Ukupno",
|
|
198
198
|
"tax": "PDV",
|
|
@@ -249,7 +249,7 @@
|
|
|
249
249
|
"all": "Sve",
|
|
250
250
|
"brand": "Brand",
|
|
251
251
|
"other": "Ostalo",
|
|
252
|
-
"shipping": "
|
|
252
|
+
"shipping": "Isporuka",
|
|
253
253
|
"specifications": "Specifikacije",
|
|
254
254
|
"usage": "Upotreba"
|
|
255
255
|
},
|