Skip to content

Commit

Permalink
preserve previous/default tax and shipping rates
Browse files Browse the repository at this point in the history
  • Loading branch information
David Tai committed May 24, 2017
1 parent 5491fe8 commit 13fbac4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/cart.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,9 @@ class Cart
@data.set 'order.subtotal', subtotal

taxRates = @data.get 'taxRates'
@data.set 'order.taxRate', 0
rate = @data.get 'order.taxRate'
if !rate?
@data.set 'order.taxRate', 0

if taxRates?
for taxRateFilter in taxRates
Expand All @@ -368,7 +370,9 @@ class Cart
break

shippingRates = @data.get 'shippingRates'
@data.set 'order.shippingRate', 0
rate = @data.get 'order.shippingRate'
if !rate?
@data.set 'order.shippingRate', 0

if shippingRates?
for shippingRateFilter in shippingRates
Expand Down

0 comments on commit 13fbac4

Please sign in to comment.