Sha256: 3956cab4e17f8771ad97cc666ebba43331b39fa036bb6ffa49641da82f32409d
Contents?: true
Size: 579 Bytes
Versions: 89
Compression:
Stored size: 579 Bytes
Contents
$(@).ready( -> $('[data-hook=adjustments_new_coupon_code] #add_coupon_code').click -> return if $("#coupon_code").val().length == 0 $.ajax type: 'PUT' url: Spree.url(Spree.routes.apply_coupon_code(order_number)) data: coupon_code: $("#coupon_code").val() token: Spree.api_key success: -> window.location.reload(); error: (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
89 entries across 89 versions & 2 rubygems