diff --git a/ruby/lib/jam_ruby/models/shopping_cart.rb b/ruby/lib/jam_ruby/models/shopping_cart.rb index 7d4cffac9..75faf2b7d 100644 --- a/ruby/lib/jam_ruby/models/shopping_cart.rb +++ b/ruby/lib/jam_ruby/models/shopping_cart.rb @@ -25,7 +25,7 @@ module JamRuby def product_info product = self.cart_product - {name: product.name, price: product.price, product_id: cart_id, plan_code: product.plan_code, real_price: real_price(product), total_price: total_price(product), quantity: quantity, marked_for_redeem: marked_for_redeem} unless product.nil? + {name: product.name, price: product.price, product_id: cart_id, plan_code: product.plan_code, real_price: real_price(product), total_price: total_price(product), quantity: quantity, marked_for_redeem: marked_for_redeem, free: free?} unless product.nil? end # multiply quantity by price diff --git a/web/app/assets/stylesheets/client/checkout_order.css.scss b/web/app/assets/stylesheets/client/checkout_order.css.scss index ca2ef994a..456bfaafd 100644 --- a/web/app/assets/stylesheets/client/checkout_order.css.scss +++ b/web/app/assets/stylesheets/client/checkout_order.css.scss @@ -155,6 +155,12 @@ @include border_box_sizing; } + .first-one-free { + font-size:14px; + font-style:italic; + margin-left:15px; + } + .cart-item-price { width: 25%; text-align: right; diff --git a/web/app/views/clients/_checkout_order.html.slim b/web/app/views/clients/_checkout_order.html.slim index 83b939b05..4aacb4d58 100644 --- a/web/app/views/clients/_checkout_order.html.slim +++ b/web/app/views/clients/_checkout_order.html.slim @@ -108,8 +108,13 @@ script type='text/template' id='template-order-content' .cart-item cart-id="{{cart.id}}" .cart-item-caption = "{{cart.cart_type}}: {{cart.product_info.name}}" + = "{% if (cart.product_info.free) { %}" + span.first-one-free + | (first one free) + = "{% } %}" + .cart-item-price - = "$ {{Number(cart.product_info.total_price).toFixed(2)}}" + = "$ {{Number(cart.product_info.real_price).toFixed(2)}}" .cart-item-quantity = "{{cart.quantity}}" .clearall @@ -146,11 +151,11 @@ script type='text/template' id='template-order-content' .order-help span By placing your order, you agree to JamKazam's ' - a href="http://www.jamkazam.com/corp/terms" rel="external" terms of service + a href="/corp/terms" rel="external" terms of service + span + | , including the ' - span and - ' - a href="http://www.jamkazam.com/corp/returns" rel="external" returns policy + a href="/corp/terms#purchasing-jamtracks" rel="external" JamTracks purchase terms span . .clearall diff --git a/web/spec/features/jamtrack_shopping_spec.rb b/web/spec/features/jamtrack_shopping_spec.rb index 4d7425f26..4dd20a058 100644 --- a/web/spec/features/jamtrack_shopping_spec.rb +++ b/web/spec/features/jamtrack_shopping_spec.rb @@ -50,9 +50,9 @@ describe "JamTrack Shopping", :js => true, :type => :feature, :capybara_feature end if options[:added_cart] - jamtrack_record.find('a.jamtrack-add-cart-disabled', text: 'Already In Cart') + jamtrack_record.find('a.jamtrack-add-cart-disabled', text: 'ALREADY IN CART') else - jamtrack_record.find('a.jamtrack-add-cart.button-orange', text: 'Add to Cart') + jamtrack_record.find('a.jamtrack-add-cart.button-orange', text: 'ADD TO CART') end jamtrack_record end