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