@wikala/spmkt 2.29.0 → 2.29.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.
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<div
|
|
4
|
-
<div
|
|
3
|
+
<div class="pc-label">{{ $t('cart.haveACoupon') }}</div>
|
|
4
|
+
<div class="pc-input" :class="{ 'mb-4': cart.discount }">
|
|
5
5
|
<input @keyup.enter="applyCoupon" v-model="couponCode" class="input" type="text" name="coupon_code" :placeholder="$t('cart.enterCouponPlaceholder')" />
|
|
6
6
|
<button name="enter_coupon" @click="applyCoupon" class="button is-small" :class="{ 'is-loading': acLoading }">{{ $t('cart.applyCoupon') }}</button>
|
|
7
7
|
</div>
|
|
8
8
|
<div v-if="cart.discount">
|
|
9
9
|
<div class="applied-discounts has-text-weight-bold">
|
|
10
|
-
<div class="has-text-success">{{ $t('cart.discountApplied') }}</div>
|
|
10
|
+
<div class="has-text-success">{{ $t('cart.discountApplied') }} [{{ cart.coupon_code }}]</div>
|
|
11
11
|
<div v-if="cart.items.length === 1 || cart.discount === cart.order_discount" class="has-text-success">
|
|
12
12
|
{{ $t('cart.youSaved') }} {{ formatMoney(cart.discount, { precision: 2 }) }}!
|
|
13
13
|
</div>
|
|
@@ -279,14 +279,7 @@ export default {
|
|
|
279
279
|
const productDiscountInfo = window.wkl_product_discount_info
|
|
280
280
|
|
|
281
281
|
const variantDiscountInfo = productDiscountInfo.find(pdi => pdi.product_id == this.selectedVariant.id)
|
|
282
|
-
|
|
283
|
-
/*
|
|
284
|
-
@if($discountItem['coupon_applied'])
|
|
285
|
-
U korpi će vam biti obračunat popust od {{ fmt_money($discountItem['discount_amount']) }} RSD
|
|
286
|
-
@else
|
|
287
|
-
Iskoristi promo kod {!! $discountItem['coupon_code'] !!} za popust od {{ fmt_money($discountItem['discount_amount']) }} RSD
|
|
288
|
-
@endif
|
|
289
|
-
*/
|
|
282
|
+
|
|
290
283
|
if(variantDiscountInfo) {
|
|
291
284
|
discountInfoContainer.classList.remove('is-hidden')
|
|
292
285
|
if(variantDiscountInfo.coupon_applied) {
|