Sha256: 6fa1a4148c77e894207d4a1e7b26b5d4a0d63d0b069d38ca344c7893944267a5
Contents?: true
Size: 582 Bytes
Versions: 28
Compression:
Stored size: 582 Bytes
Contents
$(@).ready( -> $('[data-hook=adjustments_new_coupon_code] #add_coupon_code').click -> return if $("#coupon_code").val().length == 0 Spree.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
28 entries across 28 versions & 1 rubygems