CouponInput
DomainKupon kodu giriş + uygula/kaldır akışı. Sunucu taraflı doğrulama ile hata/başarı mesajları.
Have a coupon?
Try: SAVE20
<%- include('modules/domain/common/discount/CouponInput', {
action: '/cart/coupon/apply'
}) %>
Have a coupon?
SAVE20 applied
<%- include('modules/domain/common/discount/CouponInput', {
appliedCode: 'SAVE20',
removeAction: '/cart/coupon/remove'
}) %>
<%
var _action = locals.action || '#';
var _appliedCode = locals.appliedCode || null;
var _removeAction = locals.removeAction || null;
%>
<% if (_appliedCode) { %>
<%= _appliedCode %> applied
<% if (_removeAction) { %>
<% } %>
<% } else { %>
<% } %>