Skip to content

Commit 6050b09

Browse files
committed
automatically display android discount
1 parent 9574dff commit 6050b09

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

assets/js/androidkey.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class AndroidLicense {
3030
}).done(data => {
3131
this._checkoutData.price = {
3232
amount: data.response.products[0].price.gross,
33+
listAmount: data.response.products[0].list_price.gross,
3334
currency: data.response.products[0].currency
3435
};
3536
});

layouts/partials/android-getkey.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ <h3 class="font-h3 text-lg">{{ i18n "android_getkey_title" }}</h3>
66
<form x-show="!checkoutData.success" x-ref="form" class="px-4 py-8">
77
<div class="mb-4">
88
<label class="label-uppercase mb-2">{{ i18n "android_getkey_price" }}</label>
9-
<div class="input-box flex items-center w-full lg:w-1/2">
9+
<div class="input-box flex items-center gap-2 w-full lg:w-1/2">
10+
<span x-show="checkoutData.price && checkoutData.price.amount != checkoutData.price.listAmount" x-text="checkoutData.price ? checkoutData.price.listAmount.toLocaleString('{{ .Site.Language.Lang }}', { style: 'currency', currency: checkoutData.price.currency }) : '…'" class="text-gray-500 line-through decoration-red-600"></span>
1011
<span x-text="checkoutData.price ? checkoutData.price.amount.toLocaleString('{{ .Site.Language.Lang }}', { style: 'currency', currency: checkoutData.price.currency }) : '…'"></span>
1112
</div>
1213
</div>

0 commit comments

Comments
 (0)