From 07637747078a13e0aefdbbddabc42ff6f44bef0d Mon Sep 17 00:00:00 2001 From: gRoussac Date: Mon, 11 Feb 2013 16:13:46 +0100 Subject: [PATCH] [-] FO : Fix bug #PSCFI-6686 when url param has no value set 1 to valuePSCFI-6686 --- modules/blockcart/ajax-cart.js | 6 +++--- modules/blockcart/blockcart.tpl | 4 ++-- themes/default/mobile/js/cart.js | 4 ++-- themes/default/mobile/js/opc.js | 2 +- themes/default/mobile/shopping-cart.tpl | 2 +- themes/default/modules/blockcart/blockcart.tpl | 4 ++-- themes/default/order-address-product-line.tpl | 4 ++-- themes/default/order-payment.tpl | 6 +++--- themes/default/product-list.tpl | 4 ++-- themes/default/shopping-cart-product-line.tpl | 4 ++-- themes/default/shopping-cart.tpl | 6 +++--- 11 files changed, 23 insertions(+), 23 deletions(-) diff --git a/modules/blockcart/ajax-cart.js b/modules/blockcart/ajax-cart.js index 40d5f9480..a15000549 100644 --- a/modules/blockcart/ajax-cart.js +++ b/modules/blockcart/ajax-cart.js @@ -352,7 +352,7 @@ var ajaxCart = { } var removeLinks = $('#cart_block_product_' + domIdProduct).find('a.ajax_cart_block_remove_link'); if (!product.hasCustomizedDatas && !removeLinks.length) - $('#' + domIdProduct + ' span.remove_link').html(' '); + $('#' + domIdProduct + ' span.remove_link').html(' '); if (product.is_gift) $('#' + domIdProduct + ' span.remove_link').html(''); }, @@ -449,7 +449,7 @@ var ajaxCart = { content += '' + name + ''; if (parseFloat(this.price_float) > 0) - content += ' '; + content += ' '; else content += ''; if (typeof(freeShippingTranslation) != 'undefined') @@ -525,7 +525,7 @@ var ajaxCart = { var done = 0; customizationId = parseInt(this.customizationId); productAttributeId = typeof(product.idCombination) == 'undefined' ? 0 : parseInt(product.idCombination); - content += '
  • ' + parseInt(this.quantity) + 'x'; + content += '
  • ' + parseInt(this.quantity) + 'x'; // Give to the customized product the first textfield value as name $(this.datas).each(function(){ diff --git a/modules/blockcart/blockcart.tpl b/modules/blockcart/blockcart.tpl index 348c3a26e..0d0bbe011 100644 --- a/modules/blockcart/blockcart.tpl +++ b/modules/blockcart/blockcart.tpl @@ -78,7 +78,7 @@ var delete_txt = '{l s='Delete' mod='blockcart' js=1}'; {$product.cart_quantity}x {$product.name|truncate:13:'...'|escape:html:'UTF-8'} - {if !isset($customizedDatas.$productId.$productAttributeId) && (!isset($product.is_gift) || !$product.is_gift)} {/if} + {if !isset($customizedDatas.$productId.$productAttributeId) && (!isset($product.is_gift) || !$product.is_gift)} {/if} {if !isset($product.is_gift) || !$product.is_gift} {if $priceDisplay == $smarty.const.PS_TAX_EXC}{displayWtPrice p="`$product.total`"}{else}{displayWtPrice p="`$product.total_wt`"}{/if} @@ -98,7 +98,7 @@ var delete_txt = '{l s='Delete' mod='blockcart' js=1}';
      {foreach from=$customizedDatas.$productId.$productAttributeId[$product.id_address_delivery] key='id_customization' item='customization' name='customizations'}
    • - + {$customization.quantity}x{if isset($customization.datas.$CUSTOMIZE_TEXTFIELD.0)} {$customization.datas.$CUSTOMIZE_TEXTFIELD.0.value|escape:html:'UTF-8'|replace:"
      ":" "|truncate:28} {else} diff --git a/themes/default/mobile/js/cart.js b/themes/default/mobile/js/cart.js index 01031afba..8e13ed4ba 100644 --- a/themes/default/mobile/js/cart.js +++ b/themes/default/mobile/js/cart.js @@ -61,7 +61,7 @@ var CartUpd = (function() async: true, cache: false, dataType: 'json', - data: 'controller=cart&ajax=true&add&getproductprice&summary&id_product='+id+'&ipa='+productAttributeId+'&id_address_delivery='+id_address_delivery+ ( op == 0 ? '&op=down' : '' ) + ( (customizationId != 0) ? '&id_customization='+customizationId : '') + '&qty='+qty+'&token=' + static_token , + data: 'controller=cart&ajax=true&add=true&getproductprice&summary&id_product='+id+'&ipa='+productAttributeId+'&id_address_delivery='+id_address_delivery+ ( op == 0 ? '&op=down' : '' ) + ( (customizationId != 0) ? '&id_customization='+customizationId : '') + '&qty='+qty+'&token=' + static_token , success: function(jsonData) { if (!jsonData.hasError) @@ -81,7 +81,7 @@ var CartUpd = (function() async: true, cache: false, dataType: 'json', - data: 'controller=cart&ajax=true&delete&summary&id_product='+id+'&ipa='+productAttributeId+'&id_address_delivery='+id_address_delivery+ ( (customizationId != 0) ? '&id_customization='+customizationId : '') + '&token=' + static_token , + data: 'controller=cart&ajax=true&delete=true&summary=true&id_product='+id+'&ipa='+productAttributeId+'&id_address_delivery='+id_address_delivery+ ( (customizationId != 0) ? '&id_customization='+customizationId : '') + '&token=' + static_token , success: function(jsonData) { if (!jsonData.hasError) diff --git a/themes/default/mobile/js/opc.js b/themes/default/mobile/js/opc.js index 5baa99707..ff319e6d2 100644 --- a/themes/default/mobile/js/opc.js +++ b/themes/default/mobile/js/opc.js @@ -24,7 +24,7 @@ function initEvent() url: baseDir, async: true, cache: false, - data: 'controller=cart&add&id_product='+$(this).data('id-product')+'&ipa='+$(this).data('id-product-attribute')+'&op='+op+'&qty='+qty+'&id_address_delivery=0&token='+static_token, + data: 'controller=cart&add=true&id_product='+$(this).data('id-product')+'&ipa='+$(this).data('id-product-attribute')+'&op='+op+'&qty='+qty+'&id_address_delivery=0&token='+static_token, success: function() { window.location.href = orderOpcUrl; diff --git a/themes/default/mobile/shopping-cart.tpl b/themes/default/mobile/shopping-cart.tpl index ca2e38960..f0bf0ea82 100644 --- a/themes/default/mobile/shopping-cart.tpl +++ b/themes/default/mobile/shopping-cart.tpl @@ -58,7 +58,7 @@ - {l s='Delete'} + {l s='Delete'}
    • {/foreach}
    diff --git a/themes/default/modules/blockcart/blockcart.tpl b/themes/default/modules/blockcart/blockcart.tpl index b728c0c8a..654dead07 100644 --- a/themes/default/modules/blockcart/blockcart.tpl +++ b/themes/default/modules/blockcart/blockcart.tpl @@ -78,7 +78,7 @@ var delete_txt = '{l s='Delete' mod='blockcart' js=1}'; {$product.cart_quantity}x {$product.name|truncate:13:'...'|escape:html:'UTF-8'} - {if !isset($customizedDatas.$productId.$productAttributeId) && (!isset($product.is_gift) || !$product.is_gift)} {/if} + {if !isset($customizedDatas.$productId.$productAttributeId) && (!isset($product.is_gift) || !$product.is_gift)} {/if} {if !isset($product.is_gift) || !$product.is_gift} {if $priceDisplay == $smarty.const.PS_TAX_EXC}{displayWtPrice p="`$product.total`"}{else}{displayWtPrice p="`$product.total_wt`"}{/if} @@ -98,7 +98,7 @@ var delete_txt = '{l s='Delete' mod='blockcart' js=1}';
      {foreach from=$customizedDatas.$productId.$productAttributeId[$product.id_address_delivery] key='id_customization' item='customization' name='customizations'}
    • - + {$customization.quantity}x{if isset($customization.datas.$CUSTOMIZE_TEXTFIELD.0)} {$customization.datas.$CUSTOMIZE_TEXTFIELD.0.value|escape:html:'UTF-8'|replace:"
      ":" "|truncate:28} {else} diff --git a/themes/default/order-address-product-line.tpl b/themes/default/order-address-product-line.tpl index da0052527..4e7acf037 100644 --- a/themes/default/order-address-product-line.tpl +++ b/themes/default/order-address-product-line.tpl @@ -38,9 +38,9 @@ {else} {if !isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed > 0}
      - {l s='Add'}
      + {l s='Add'}
      {if $product.minimal_quantity < ($product.cart_quantity-$quantityDisplayed) OR $product.minimal_quantity <= 1} - + {l s='Subtract'} {else} diff --git a/themes/default/order-payment.tpl b/themes/default/order-payment.tpl index c9b203608..e2ab3be78 100644 --- a/themes/default/order-payment.tpl +++ b/themes/default/order-payment.tpl @@ -273,12 +273,12 @@ {if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if} {else}
      - {l s='Delete'} + {l s='Delete'}
      - {l s='Add'}
      + {l s='Add'}
      {if $product.minimal_quantity < ($customization.quantity -$quantityDisplayed) OR $product.minimal_quantity <= 1} - + {l s='Subtract'} {else} diff --git a/themes/default/product-list.tpl b/themes/default/product-list.tpl index fe0ca85f5..344c743cc 100644 --- a/themes/default/product-list.tpl +++ b/themes/default/product-list.tpl @@ -57,9 +57,9 @@ {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE} {if ($product.allow_oosp || $product.quantity > 0)} {if isset($static_token)} - {l s='Add to cart'} + {l s='Add to cart'} {else} - {l s='Add to cart'} + {l s='Add to cart'} {/if} {else} {l s='Add to cart'}
      diff --git a/themes/default/shopping-cart-product-line.tpl b/themes/default/shopping-cart-product-line.tpl index 14c3be9d4..fb11ef178 100644 --- a/themes/default/shopping-cart-product-line.tpl +++ b/themes/default/shopping-cart-product-line.tpl @@ -62,9 +62,9 @@ {/if} {if !isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed > 0}
      - {l s='Add'}
      + {l s='Add'}
      {if $product.minimal_quantity < ($product.cart_quantity-$quantityDisplayed) OR $product.minimal_quantity <= 1} - + {l s='Subtract'} {else} diff --git a/themes/default/shopping-cart.tpl b/themes/default/shopping-cart.tpl index 11ca7779e..158d47a63 100644 --- a/themes/default/shopping-cart.tpl +++ b/themes/default/shopping-cart.tpl @@ -265,9 +265,9 @@ {if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if} {else}
      - {l s='Add'}
      + {l s='Add'}
      {if $product.minimal_quantity < ($customization.quantity -$quantityDisplayed) OR $product.minimal_quantity <= 1} - + {l s='Subtract'} {else} @@ -284,7 +284,7 @@ {if isset($cannotModify) AND $cannotModify == 1} {else} {/if}