Sha256: 412d710a38d4283ebaba2d877dde5c0ffc60d7d2b66a495dac9717d93f30bb52
Contents?: true
Size: 677 Bytes
Versions: 13
Compression:
Stored size: 677 Bytes
Contents
Spree.ready(function() { $('[data-hook=adjustments_new_coupon_code] #add_coupon_code').click(function() { if ($("#coupon_code").val().length === 0) { return; } Spree.ajax({ type: 'PUT', url: Spree.routes.apply_coupon_code(window.order_number), data: { coupon_code: $("#coupon_code").val(), }, success: function() { window.location.reload(); }, error: function(msg) { if (msg.responseJSON["error"]) { show_flash('error', msg.responseJSON["error"]); } else { show_flash('error', "There was a problem adding this coupon code."); } } }); }); });
Version data entries
13 entries across 13 versions & 1 rubygems