Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit b65129c

Browse files
committed
fixed issue where the coupon discount type was not showing correctly in the edit listing modal
1 parent e5413d1 commit b65129c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

js/templates/modals/editListing/coupon.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@
1919
} else if (typeof ob.percentDiscount !== 'undefined') {
2020
discountAmount = ob.percentDiscount;
2121
}
22+
23+
const isFixedDiscount = !!ob.bigPriceDiscount;
2224
%>
2325
<input type="text" class="clrBr clrP clrSh2" name="discountAmount" value="<%= discountAmount %>" placeholder="0.00">
2426
<select name="discountType" class="clrBr clrP nestInputRight">
25-
<option value="PERCENTAGE" <% if (typeof ob.percentDiscount !== 'undefined') print('selected') %>><%= ob.polyT('editListing.coupons.discountTypePercent') %></option>
26-
<option value="FIXED" <% if (typeof ob.bigPriceDiscount !== 'undefined') print('selected') %>><%= ob.polyT('editListing.coupons.discountTypeFixed') %></option>
27+
<option value="PERCENTAGE" <% if (!isFixedDiscount) print('selected') %>><%= ob.polyT('editListing.coupons.discountTypePercent') %></option>
28+
<option value="FIXED" <% if (isFixedDiscount) print('selected') %>><%= ob.polyT('editListing.coupons.discountTypeFixed') %></option>
2729
</select>
2830
</div>
2931

0 commit comments

Comments
 (0)