This commit is contained in:
2026-09-15 10:35:56 +08:00
commit 782f8ea7aa
4086 changed files with 631288 additions and 0 deletions
@@ -0,0 +1,40 @@
<div class="esun-coupon esun-coupon--cart esun-reward-use">
<div class="esun-coupon__title" data-bind="i18n: 'Use Points'"></div>
<!-- ko if: ready -->
<!-- ko if: isLoggedIn -->
<p class="esun-reward-use__balance">
<span data-bind="i18n: 'Available balance:'"></span>
<strong data-bind="text: reward().balance"></strong>
<span data-bind="i18n: 'points'"></span>
</p>
<form data-bind="submit: apply">
<div class="esun-coupon__controls">
<label class="esun-coupon__label" for="esun-checkout-reward-points"
data-bind="i18n: 'Points to use'"></label>
<input id="esun-checkout-reward-points"
class="input-text esun-coupon__input"
type="number"
min="0"
data-bind="value: points,
attr: {max: Math.min(Number(reward().balance), Number(reward().maximum))},
disable: loading"/>
<button class="action esun-coupon__button" type="submit" data-bind="disable: loading">
<span data-bind="i18n: 'Apply'"></span>
</button>
</div>
<p class="note">
<span data-bind="text: reward().rate"></span>
<span data-bind="i18n: 'points = $1. Maximum'"></span>
<span data-bind="text: reward().maximum"></span>
<span data-bind="i18n: 'points per order.'"></span>
</p>
<div class="esun-coupon__message"
data-bind="text: message, css: {'is-success': message()}"></div>
</form>
<!-- /ko -->
<!-- ko ifnot: isLoggedIn -->
<p><a data-bind="attr: {href: window.BASE_URL + 'customer/account/login/'},
i18n: 'Sign in to view and use your points.'"></a></p>
<!-- /ko -->
<!-- /ko -->
</div>