Sha256: 3c298e2c60d79ba61b749c278a22b126ff50f9e636ab74c4dd22c37b2c7ff013
Contents?: true
Size: 907 Bytes
Versions: 33
Compression:
Stored size: 907 Bytes
Contents
#= require spree/frontend/coupon_manager Spree.ready ($) -> if ($ 'form#update-cart').is('*') ($ 'form#update-cart a.delete').show().one 'click', -> ($ this).parents('.line-item').first().find('input.line_item_quantity').val 0 ($ this).parents('form').first().submit() false ($ 'form#update-cart').submit (event) -> ($ 'form#update-cart #update-button').attr('disabled', true) input = couponCodeField: $('#order_coupon_code') couponStatus: $('#coupon_status') if input.couponCodeField.val().trim().length > 0 if new CouponManager(input).applyCoupon() @submit() return true else ($ 'form#update-cart #update-button').attr('disabled', false) event.preventDefault() return false Spree.fetch_cart = -> $.ajax url: Spree.pathFor("cart_link"), success: (data) -> $('#link-to-cart').html data
Version data entries
33 entries across 33 versions & 1 rubygems