@wikala/spmkt 2.28.1 → 2.28.2
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.
|
@@ -61,6 +61,14 @@ export default {
|
|
|
61
61
|
},
|
|
62
62
|
variantId: {
|
|
63
63
|
type: Number
|
|
64
|
+
},
|
|
65
|
+
badgeSelector: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: '.product-in-stock .discount.badge'
|
|
68
|
+
},
|
|
69
|
+
overridePriceNotificationSelector: {
|
|
70
|
+
type: String,
|
|
71
|
+
default: '.override-price-active'
|
|
64
72
|
}
|
|
65
73
|
},
|
|
66
74
|
|
|
@@ -215,7 +223,7 @@ export default {
|
|
|
215
223
|
},
|
|
216
224
|
|
|
217
225
|
updateDiscountBadge() {
|
|
218
|
-
let badge = document.querySelector(
|
|
226
|
+
let badge = document.querySelector(this.badgeSelector)
|
|
219
227
|
if(!badge) {
|
|
220
228
|
return
|
|
221
229
|
}
|
|
@@ -232,18 +240,21 @@ export default {
|
|
|
232
240
|
},
|
|
233
241
|
|
|
234
242
|
updateOverridePriceNotification() {
|
|
235
|
-
let opActiveContainer = document.querySelector(
|
|
243
|
+
let opActiveContainer = document.querySelector(this.overridePriceNotificationSelector)
|
|
236
244
|
if(!opActiveContainer) {
|
|
237
245
|
return
|
|
238
246
|
}
|
|
239
247
|
opActiveContainer.textContent = ''
|
|
240
|
-
|
|
248
|
+
|
|
241
249
|
if(!this.selectedVariant) {
|
|
242
250
|
return
|
|
243
251
|
}
|
|
244
252
|
|
|
245
253
|
if(this.selectedVariant.override_price_active) {
|
|
246
|
-
opActiveContainer.textContent = 'Trajanje akcije od ' +
|
|
254
|
+
opActiveContainer.textContent = 'Trajanje akcije od ' +
|
|
255
|
+
formatDate(new Date(this.selectedVariant.override_start_at), 'DD.MM.YYYY HH:mm') +
|
|
256
|
+
' do ' +
|
|
257
|
+
formatDate(new Date(this.selectedVariant.override_stop_at), 'DD.MM.YYYY HH:mm')
|
|
247
258
|
}
|
|
248
259
|
},
|
|
249
260
|
|