From 9686562d85b8388de3291c1012ed1f177e4036a1 Mon Sep 17 00:00:00 2001 From: dMetzger Date: Fri, 21 Sep 2012 13:43:20 +0000 Subject: [PATCH] [-] FO : changed confusing "free shipping" mention #PSCFV-4151 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17463 b9a71923-0436-4b27-9f14-aed3839534dd --- modules/blockcart/ajax-cart.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/modules/blockcart/ajax-cart.js b/modules/blockcart/ajax-cart.js index c2d892025..c37e999e1 100644 --- a/modules/blockcart/ajax-cart.js +++ b/modules/blockcart/ajax-cart.js @@ -591,7 +591,7 @@ var ajaxCart = { updateCartEverywhere : function(jsonData) { $('.ajax_cart_total').text(jsonData.productTotal); - if (parseFloat(jsonData.shippingCostFloat) > 0) + if (parseFloat(jsonData.shippingCostFloat) > 0 || jsonData.nbTotalProducts < 1) $('.ajax_cart_shipping_cost').text(jsonData.shippingCost); else $('.ajax_cart_shipping_cost').html(freeShippingTranslation); @@ -601,23 +601,22 @@ var ajaxCart = { this.nb_total_products = jsonData.nbTotalProducts; - if(parseInt(jsonData.nbTotalProducts) > 0) + if (parseInt(jsonData.nbTotalProducts) > 0) { $('.ajax_cart_no_product').hide(); $('.ajax_cart_quantity').text(jsonData.nbTotalProducts); $('.ajax_cart_quantity').fadeIn('slow'); $('.ajax_cart_total').fadeIn('slow'); - if(parseInt(jsonData.nbTotalProducts) > 1) + if (parseInt(jsonData.nbTotalProducts) > 1) { $('.ajax_cart_product_txt').each( function () { - $(this).hide (); + $(this).hide(); }); $('.ajax_cart_product_txt_s').each( function () { $(this).show(); }); - } else { @@ -632,9 +631,9 @@ var ajaxCart = { } else { - $('.ajax_cart_quantity, .ajax_cart_product_txt_s, .ajax_cart_product_txt, .ajax_cart_total').each( function () { - $(this).hide(); - }); + $('.ajax_cart_quantity, .ajax_cart_product_txt_s, .ajax_cart_product_txt, .ajax_cart_total').each(function(){ + $(this).hide(); + }); $('.ajax_cart_no_product').show('slow'); } }