Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
<div class="admin__field field-apply-coupon-code">
<label class="admin__field-label"><span><?= /* @escapeNotVerified */ __('Apply Coupon Code') ?></span></label>
<div class="admin__field-control">
<?php if (!$block->getCouponCode()): ?>
<input type="text" class="admin__control-text" id="coupons:code" value="" name="coupon_code" />
<?= $block->getButtonHtml(__('Apply'), 'order.applyCoupon($F(\'coupons:code\'))') ?>
<?php endif; ?>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be simplified with
if() { } else { }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also may be make sense to do something like coupon form in cart: disabled input + button
rqlno_2019-06-19_21-33-01

<?php if ($block->getCouponCode()): ?>
<p class="added-coupon-code">
<span><?= $block->escapeHtml($block->getCouponCode()) ?></span>
Expand Down