@wikala/spmkt 2.28.2 → 2.28.3

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.
@@ -218,7 +218,7 @@ export default {
218
218
  this.updateDiscountBadge(variant)
219
219
 
220
220
  this.$nextTick(() => {
221
- this.emitEvents()
221
+ this.emitEvents('preselect')
222
222
  })
223
223
  },
224
224
 
@@ -328,7 +328,7 @@ export default {
328
328
 
329
329
  },
330
330
 
331
- emitEvents() {
331
+ emitEvents(context='') {
332
332
  if (!this.selectedVariant) {
333
333
  this.$bus.$emit('selectVariant', false)
334
334
  this.$bus.$emit('updateSKU', '')
@@ -336,9 +336,11 @@ export default {
336
336
  }
337
337
 
338
338
  this.$bus.$emit('selectVariant', this.selectedVariant.id)
339
- this.$bus.$emit('updatePrice', this.selectedVariant.price, this.selectedVariant.compare_price)
340
339
  this.$bus.$emit('changePhoto', this.selectedVariant.default_image_id)
341
340
  this.$bus.$emit('updateSKU', this.selectedVariant.sku || this.selectedVariant.id)
341
+ if(context !== 'preselect') {
342
+ this.$bus.$emit('updatePrice', this.selectedVariant.price, this.selectedVariant.compare_price)
343
+ }
342
344
  this.updateOverridePriceNotification()
343
345
  }
344
346
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikala/spmkt",
3
- "version": "2.28.2",
3
+ "version": "2.28.3",
4
4
  "private": false,
5
5
  "description": "supermarket",
6
6
  "scripts": {