Jump to content

[Resolu] Prestashop 1.5.2 Supprimer Les Frais De Port Du Panier ?


Recommended Posts

Bonjour,

Je cherche a supprimer les lignes de frais de port surligné en rouge et surtout enlever les frais de port du calcule du panier...

 

J'arrive a supprimer la ligne du récapitulatif de commande via le fichier shopping-cart.tpl, mais apres je seche...

 

post-440897-0-49844700-1360840676_thumb.jpg

 

Merci d'avance...

Edited by arftbird (see edit history)
Link to comment
Share on other sites

Bonjour,

 

il faut regarder dans le fichier cart-summary.js (dans themes/nomdutheme/js/) et rechercher "cart_total_delivery"

 

il y a un bout de code qui va faire un fadeOut et fadeIn , il faudrait mettre hide() partout, ex:

Remplacez :
 $('.cart_total_delivery').fadeOut();
et
 $('.cart_total_delivery').fadeIn();
par
 $('.cart_total_delivery').hide();

Link to comment
Share on other sites

Deja je te remerci pour ton aide...

Par contre je n'ai pas "cart_total_delivery", ci-joint la totalité de mon ficher cart-summary.js

 

/*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2012 PrestaShop SA
*  @version  Release: $Revision: 7040 $
*  @license	http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*/
$(document).ready(function()
{
// If block cart isn't used, we don't bind the handle actions
if (window.ajaxCart !== undefined)
{
 $('.cart_quantity_up').unbind('click').live('click', function(){ upQuantity($(this).attr('id').replace('cart_quantity_up_', '')); return false; });
 $('.cart_quantity_down').unbind('click').live('click', function(){ downQuantity($(this).attr('id').replace('cart_quantity_down_', '')); return false; });
 $('.cart_quantity_delete' ).unbind('click').live('click', function(){ deleteProductFromSummary($(this).attr('id')); return false; });
 $('.cart_quantity_input').typeWatch({ highlight: true, wait: 600, captureLength: 0, callback: function(val) { updateQty(val, true, this.el) } });
}

$('.cart_address_delivery').live('change', function(){ changeAddressDelivery($(this)); });

cleanSelectAddressDelivery();
});
function cleanSelectAddressDelivery()
{
if (window.ajaxCart !== undefined)
{
 //Removing "Ship to an other address" from the address delivery select option if there is not enought address
 $.each($('.cart_address_delivery'), function(it, item)
 {
  var options = $(item).find('option');
  var address_count = 0;

  var ids = $(item).attr('id').split('_');
  var id_product = ids[3];
  var id_product_attribute = ids[4];
  var id_address_delivery = ids[5];

  $.each(options, function(i) {
if ($(options[i]).val() > 0
 && ($('#product_' + id_product + '_' + id_product_attribute + '_0_' + $(options[i]).val()).length == 0 // Check the address is not already used for a similare products
  || id_address_delivery == $(options[i]).val()
 )
)
 address_count++;
  });

  if (address_count < 2) // Need at least two address to allow skipping products to multiple address
$($(item).find('option[value=-2]')).remove();
  else if($($(item).find('option[value=-2]')).length == 0)
$(item).append($('<option value="-2">' + ShipToAnOtherAddress + '</option>'));
 });
}
}
function changeAddressDelivery(obj)
{
var ids = obj.attr('id').split('_');
var id_product = ids[3];
var id_product_attribute = ids[4];
var old_id_address_delivery = ids[5];
var new_id_address_delivery = obj.val();

if (new_id_address_delivery == old_id_address_delivery)
 return;

if (new_id_address_delivery > 0) // Change the delivery address
{
 $.ajax({
  type: 'GET',
  url: baseUri,
  async: true,
  cache: false,
  dataType: 'json',
  data: 'controller=cart&ajax=true&changeAddressDelivery&summary&id_product='+id_product
+'&id_product_attribute='+id_product_attribute
+'&old_id_address_delivery='+old_id_address_delivery
+'&new_id_address_delivery='+new_id_address_delivery
+'&token='+static_token
+'&allow_refresh=1',
  success: function(jsonData)
  {
if (typeof(jsonData.hasErrors) != 'undefined' && jsonData.hasErrors)
{
 alert(jsonData.error);
 // Reset the old address
 $('#select_address_delivery_'+id_product+'_'+id_product_attribute+'_'+old_id_address_delivery).val(old_id_address_delivery);
}
else
{
 // The product exist
 if ($('#product_'+id_product+'_'+id_product_attribute+'_0_'+new_id_address_delivery).length)
 {
  updateCartSummary(jsonData.summary);
  updateCustomizedDatas(jsonData.customizedDatas);
  updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART);
  updateHookShoppingCartExtra(jsonData.HOOK_SHOPPING_CART_EXTRA);
  if (typeof(getCarrierListAndUpdate) != 'undefined')
   getCarrierListAndUpdate();

  // @todo reverse the remove order
  // This effect remove the current line, but it's better to remove the other one, and refresshing this one
  $('#product_'+id_product+'_'+id_product_attribute+'_0_'+old_id_address_delivery).remove();

  // @todo improve customization upgrading
  $('.product_'+id_product+'_'+id_product_attribute+'_0_'+old_id_address_delivery).remove();
 }

 if (window.ajaxCart !== undefined)
  ajaxCart.refresh();
 updateAddressId(id_product, id_product_attribute, old_id_address_delivery, new_id_address_delivery);
 cleanSelectAddressDelivery();
}
  }
 });
}
else if (new_id_address_delivery == -1) // Adding a new address
  window.location = $($('.address_add a')[0]).attr('href');
else if (new_id_address_delivery == -2) // Add a new line for this product
{
 // This test is will not usefull in the future
 if (old_id_address_delivery == 0)
 {
  alert(txtSelectAnAddressFirst);
  return false;
 }

 // Get new address to deliver
 var id_address_delivery = 0;
 var options = $('#select_address_delivery_'+id_product+'_'+id_product_attribute+'_'+old_id_address_delivery+' option');
 $.each(options, function(i) {
  if ($(options[i]).val() > 0 && $(options[i]).val() != old_id_address_delivery
&& $('#product_' + id_product + '_' + id_product_attribute + '_0_' + $(options[i]).val()).length == 0 // Check the address is not already used for a similare products
  )
  {
id_address_delivery = $(options[i]).val();
return false;
  }
 });

 $.ajax({
  type: 'GET',
  url: baseUri,
  async: true,
  cache: false,
  dataType: 'json',
  context: obj,
  data: 'controller=cart'
+'&ajax=true&duplicate&summary'
+'&id_product='+id_product
+'&id_product_attribute='+id_product_attribute
+'&id_address_delivery='+old_id_address_delivery
+'&new_id_address_delivery='+id_address_delivery
+'&token='+static_token
+'&allow_refresh=1',
  success: function(jsonData)
  {
if (jsonData.error)
{
 alert(jsonData.reason);
 return;
}

var line = $('#product_' + id_product+'_' + id_product_attribute + '_0_' + old_id_address_delivery);
var new_line = line.clone();
updateAddressId(id_product, id_product_attribute, old_id_address_delivery, id_address_delivery, new_line);
line.after(new_line);
new_line.find('input[name=quantity_' + id_product+'_' + id_product_attribute + '_0_' + old_id_address_delivery + '_hidden]')
 .val(1);
new_line.find('.cart_quantity_input')
 .val(1);
$('#select_address_delivery_' + id_product+'_' + id_product_attribute + '_' + old_id_address_delivery).val(old_id_address_delivery);
$('#select_address_delivery_' + id_product+'_' + id_product_attribute + '_' + id_address_delivery).val(id_address_delivery);


cleanSelectAddressDelivery();

updateCartSummary(jsonData.summary);

if (window.ajaxCart !== undefined)
 ajaxCart.refresh();
  }
 });
}
return true;
}
function updateAddressId(id_product, id_product_attribute, old_id_address_delivery, id_address_delivery, line)
{
if (typeof(line) == 'undefined')
 var line = $('#product_' + id_product+'_' + id_product_attribute + '_0_' + old_id_address_delivery);

line.attr('id', 'product_' + id_product+'_' + id_product_attribute + '_0_' + id_address_delivery);
line.find('.cart_quantity_input')
 .attr('name', 'quantity_' + id_product+'_' + id_product_attribute + '_0_' + id_address_delivery);
line.find('input[name=quantity_' + id_product+'_' + id_product_attribute + '_0_' + old_id_address_delivery + '_hidden]')
 .attr('name', 'quantity_' + id_product+'_' + id_product_attribute + '_0_' + id_address_delivery + '_hidden');
line.find('#cart_quantity_down_' + id_product+'_' + id_product_attribute + '_0_' + old_id_address_delivery)
 .attr('id', 'cart_quantity_down_' + id_product+'_' + id_product_attribute + '_0_' + id_address_delivery);
line.find('#cart_quantity_up_' + id_product+'_' + id_product_attribute + '_0_' + old_id_address_delivery)
 .attr('id', 'cart_quantity_up_' + id_product+'_' + id_product_attribute + '_0_' + id_address_delivery);
line.find('#' + id_product+'_' + id_product_attribute + '_0_' + old_id_address_delivery)
 .attr('id', id_product+'_' + id_product_attribute + '_0_' + id_address_delivery);
line.find('#select_address_delivery_' + id_product+'_' + id_product_attribute + '_' + old_id_address_delivery)
 .attr('id', 'select_address_delivery_' + id_product+'_' + id_product_attribute + '_' + id_address_delivery);
}
function updateQty(val, cart, el)
{
if (typeof(cart) == 'undefined' || cart)
 var prefix = '#order-detail-content ';
else
 var prefix = '#fancybox-content ';
var id = $(el).attr('name');
var exp = new RegExp("^[0-9]+$");
if (exp.test(val) == true)
{
 var hidden = $(prefix+'input[name='+ id +'_hidden]').val();
 var input = $(prefix+'input[name='+ id +']').val();
 var QtyToUp = parseInt(input) - parseInt(hidden);
 if (parseInt(QtyToUp) > 0)
  upQuantity(id.replace('quantity_', ''), QtyToUp);
 else if(parseInt(QtyToUp) < 0)
  downQuantity(id.replace('quantity_', ''), QtyToUp);
}
else
 $(prefix+'input[name='+ id +']').val($(prefix+'input[name='+ id +'_hidden]').val());

if (typeof(getCarrierListAndUpdate) != 'undefined')
 getCarrierListAndUpdate();
}
function deleteProductFromSummary(id)
{
var customizationId = 0;
var productId = 0;
var productAttributeId = 0;
var id_address_delivery = 0;
var ids = 0;
ids = id.split('_');
productId = parseInt(ids[0]);
if (typeof(ids[1]) != 'undefined')
 productAttributeId = parseInt(ids[1]);
if (typeof(ids[2]) != 'undefined')
 customizationId = parseInt(ids[2]);
if (typeof(ids[3]) != 'undefined')
 id_address_delivery = parseInt(ids[3]);
$.ajax({
 type: 'GET',
 url: baseUri,
 async: true,
 cache: false,
 dataType: 'json',
 data: 'controller=cart'
  +'&ajax=true&delete&summary'
  +'&id_product='+productId
  +'&ipa='+productAttributeId
  +'&id_address_delivery='+id_address_delivery+ ( (customizationId != 0) ? '&id_customization='+customizationId : '')
  +'&token=' + static_token
  +'&allow_refresh=1',
 success: function(jsonData)
 {
  if (jsonData.hasError)
  {
var errors = '';
for(error in jsonData.errors)
//IE6 bug fix
if (error != 'indexOf')
 errors += jsonData.errors[error] + "\n";
  }
  else
  {
if (jsonData.refresh)
 location.reload();
if (parseInt(jsonData.summary.products.length) == 0)
{
 if (typeof(orderProcess) == 'undefined' || orderProcess != 'order-opc')
  document.location.href = document.location.href; // redirection
 else
 {
  $('#center_column').children().each(function() {
   if ($(this).attr('id') != 'emptyCartWarning' && $(this).attr('class') != 'breadcrumb' && $(this).attr('id') != 'cart_title')
   {
	$(this).fadeOut('slow', function () {
	 $(this).remove();
	});
   }
  });
  $('#summary_products_label').remove();
  $('#emptyCartWarning').fadeIn('slow');
 }
}
else
{
 $('#product_'+ id).fadeOut('slow', function() {
  $(this).remove();
  cleanSelectAddressDelivery();
  if (!customizationId)
   refreshOddRow();
 });
 var exist = false;
 for (i=0;i<jsonData.summary.products.length;i++)
  if (jsonData.summary.products[i].id_product == productId
   && jsonData.summary.products[i].id_product_attribute == productAttributeId
   && jsonData.summary.products[i].id_address_delivery == id_address_delivery)
   exist = true;
 // if all customization removed => delete product line
 if (!exist && customizationId)
  $('#product_' + productId + '_' + productAttributeId + '_0_' + id_address_delivery).fadeOut('slow', function() {
   $(this).remove();
   refreshOddRow();
  });
}
updateCartSummary(jsonData.summary);
updateCustomizedDatas(jsonData.customizedDatas);
updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART);
updateHookShoppingCartExtra(jsonData.HOOK_SHOPPING_CART_EXTRA);
if (typeof(getCarrierListAndUpdate) != 'undefined')
 getCarrierListAndUpdate();
  }
 },
 error: function(XMLHttpRequest, textStatus, errorThrown) {
  if (textStatus != 'abort')
alert("TECHNICAL ERROR: unable to save update quantity \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);
 }
});
}
function refreshOddRow()
{
var odd_class = 'odd';
var even_class = 'even';
$.each($('.cart_item'), function(i, it)
{
 if (i == 0) // First item
 {
  if ($(this).hasClass('even'))
  {
odd_class = 'even';
even_class = 'odd';
  }
  $(this).addClass('first_item');
 }
 if(i % 2)
  $(this).removeClass(odd_class).addClass(even_class);
 else
  $(this).removeClass(even_class).addClass(odd_class);
});
$('.cart_item:last-child, .customization:last-child').addClass('last_item');
}
function upQuantity(id, qty)
{
if (typeof(qty) == 'undefined' || !qty)
 qty = 1;
var customizationId = 0;
var productId = 0;
var productAttributeId = 0;
var id_address_delivery = 0;
var ids = 0;
ids = id.split('_');
productId = parseInt(ids[0]);
if (typeof(ids[1]) != 'undefined')
 productAttributeId = parseInt(ids[1]);
if (typeof(ids[2]) != 'undefined')
 customizationId = parseInt(ids[2]);
if (typeof(ids[3]) != 'undefined')
 id_address_delivery = parseInt(ids[3]);
$.ajax({
 type: 'GET',
 url: baseUri,
 async: true,
 cache: false,
 dataType: 'json',
 data: 'controller=cart'
  +'&ajax=true'
  +'&add'
  +'&getproductprice'
  +'&summary'
  +'&id_product='+productId
  +'&ipa='+productAttributeId
  +'&id_address_delivery='+id_address_delivery
  + ( (customizationId != 0) ? '&id_customization='+customizationId : '')
  +'&qty='+qty
  +'&token='+static_token
  +'&allow_refresh=1',
 success: function(jsonData)
 {
  if (jsonData.hasError)
  {
var errors = '';
for(error in jsonData.errors)
 //IE6 bug fix
 if(error != 'indexOf')
  errors += jsonData.errors[error] + "\n";
alert(errors);
$('input[name=quantity_'+ id +']').val($('input[name=quantity_'+ id +'_hidden]').val());
  }
  else
  {
if (jsonData.refresh)
 location.reload();
updateCartSummary(jsonData.summary);
updateCustomizedDatas(jsonData.customizedDatas);
updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART);
updateHookShoppingCartExtra(jsonData.HOOK_SHOPPING_CART_EXTRA);
if (typeof(getCarrierListAndUpdate) != 'undefined')
 getCarrierListAndUpdate();
  }
 },
 error: function(XMLHttpRequest, textStatus, errorThrown) {
  if (textStatus != 'abort')
alert("TECHNICAL ERROR: unable to save update quantity \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);
 }
});
}
function downQuantity(id, qty)
{
var val = $('input[name=quantity_'+id+']').val();
var newVal = val;
if(typeof(qty)=='undefined' || !qty)
{
 qty = 1;
 newVal = val - 1;
}
else if (qty < 0)
 qty = -qty;

var customizationId = 0;
var productId = 0;
var productAttributeId = 0;
var id_address_delivery = 0;
var ids = 0;

ids = id.split('_');
productId = parseInt(ids[0]);
if (typeof(ids[1]) != 'undefined')
 productAttributeId = parseInt(ids[1]);
if (typeof(ids[2]) != 'undefined')
 customizationId = parseInt(ids[2]);
if (typeof(ids[3]) != 'undefined')
 id_address_delivery = parseInt(ids[3]);
if (newVal > 0 || $('#product_'+id+'_gift').length)
{
 $.ajax({
  type: 'GET',
  url: baseUri,
  async: true,
  cache: false,
  dataType: 'json',
  data: 'controller=cart'
+'&ajax=true'
+'&add'
+'&getproductprice'
+'&summary'
+'&id_product='+productId
+'&ipa='+productAttributeId
+'&id_address_delivery='+id_address_delivery
+'&op=down'
+ ((customizationId != 0) ? '&id_customization='+customizationId : '')
+'&qty='+qty
+'&token='+static_token
+'&allow_refresh=1',
  success: function(jsonData)
  {
if (jsonData.hasError)
{
 var errors = '';
 for(error in jsonData.errors)
  //IE6 bug fix
  if(error != 'indexOf')
   errors += jsonData.errors[error] + "\n";
 alert(errors);
 $('input[name=quantity_'+ id +']').val($('input[name=quantity_'+ id +'_hidden]').val());
}
else
{
 if (jsonData.refresh)
  location.reload();
 updateCartSummary(jsonData.summary);
 updateCustomizedDatas(jsonData.customizedDatas);
 updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART);
 updateHookShoppingCartExtra(jsonData.HOOK_SHOPPING_CART_EXTRA);

 if (newVal == 0)
  $('#product_'+id).hide();

 if (typeof(getCarrierListAndUpdate) != 'undefined')
  getCarrierListAndUpdate();
}
  },
  error: function(XMLHttpRequest, textStatus, errorThrown) {
if (textStatus != 'abort')
 alert("TECHNICAL ERROR: unable to save update quantity \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);
  }
 });
}
else
{
 deleteProductFromSummary(id);
}
}
function updateCartSummary(json)
{
// Update products prices + discount
var i;
var nbrProducts = 0;
if (typeof json == 'undefined')
 return;
$('.cart_quantity_input').val(0);
product_list = {};
for (i=0;i<json.products.length;i++)
 product_list[json.products[i].id_product+'_'+json.products[i].id_product_attribute+'_'+json.products[i].id_address_delivery] = json.products[i];
if (!$('.multishipping-cart:visible').length)
{
 for (i=0;i<json.gift_products.length;i++)
 {
  if (typeof(product_list[json.gift_products[i].id_product+'_'+json.gift_products[i].id_product_attribute+'_'+json.gift_products[i].id_address_delivery]) != 'undefined')
product_list[json.gift_products[i].id_product+'_'+json.gift_products[i].id_product_attribute+'_'+json.gift_products[i].id_address_delivery].quantity -= json.gift_products[i].cart_quantity;
 }
}
else
{
 for (i=0;i<json.gift_products.length;i++)
 {
  if (typeof(product_list[json.gift_products[i].id_product+'_'+json.gift_products[i].id_product_attribute+'_'+json.gift_products[i].id_address_delivery]) == 'undefined')
product_list[json.gift_products[i].id_product+'_'+json.gift_products[i].id_product_attribute+'_'+json.gift_products[i].id_address_delivery] = json.gift_products[i];
 }
}
for (i in product_list)
{
 // if reduction, we need to show it in the cart by showing the initial price above the current one
 var reduction = product_list[i].reduction_applies;
 var initial_price_text = '';
 initial_price = '';
 if (typeof(product_list[i].price_without_quantity_discount) != 'undefined')
  initial_price = formatCurrency(product_list[i].price_without_quantity_discount, currencyFormat, currencySign, currencyBlank);
 var current_price = '';
 if (priceDisplayMethod != 0)
  current_price = formatCurrency(product_list[i].price, currencyFormat, currencySign, currencyBlank);
 else
  current_price = formatCurrency(product_list[i].price_wt, currencyFormat, currencySign, currencyBlank);
 if (reduction && typeof(initial_price) != 'undefined')
 {
  if (initial_price != '' && initial_price > current_price)
initial_price_text = '<span style="text-decoration:line-through;">'+initial_price+'</span><br />';
 }
 key_for_blockcart = product_list[i].id_product+'_'+product_list[i].id_product_attribute+'_'+product_list[i].id_address_delivery;
 $('#cart_block_product_'+key_for_blockcart+' span.quantity').html(product_list[i].quantity);
 if (priceDisplayMethod != 0)
 {
  $('#cart_block_product_'+key_for_blockcart+' span.price').html(formatCurrency(product_list[i].total, currencyFormat, currencySign, currencyBlank));
  $('#product_price_'+product_list[i].id_product+'_'+product_list[i].id_product_attribute+'_'+product_list[i].id_address_delivery).html(initial_price_text+current_price);
  $('#total_product_price_'+product_list[i].id_product+'_'+product_list[i].id_product_attribute+'_'+product_list[i].id_address_delivery).html(formatCurrency(product_list[i].total, currencyFormat, currencySign, currencyBlank));
 }
 else
 {
  $('#cart_block_product_'+key_for_blockcart+' span.price').html(formatCurrency(product_list[i].total_wt, currencyFormat, currencySign, currencyBlank));
  $('#product_price_'+product_list[i].id_product+'_'+product_list[i].id_product_attribute+'_'+product_list[i].id_address_delivery).html(initial_price_text+current_price);
  $('#total_product_price_'+product_list[i].id_product+'_'+product_list[i].id_product_attribute+'_'+product_list[i].id_address_delivery).html(formatCurrency(product_list[i].total_wt, currencyFormat, currencySign, currencyBlank));
 }
 nbrProducts += parseInt(product_list[i].quantity);
 $('input[name=quantity_'+product_list[i].id_product+'_'+product_list[i].id_product_attribute+'_0_'+product_list[i].id_address_delivery+']').val(product_list[i].quantity_without_customization);
 $('input[name=quantity_'+product_list[i].id_product+'_'+product_list[i].id_product_attribute+'_0_'+product_list[i].id_address_delivery+'_hidden]').val(product_list[i].quantity_without_customization);

 if (typeof(product_list[i].customizationQuantityTotal) != 'undefined')
 {
  $('#cart_quantity_custom_'+product_list[i].id_product+'_'+product_list[i].id_product_attribute+'_'+product_list[i].id_address_delivery)
 .html(product_list[i].customizationQuantityTotal);
  $('input[name=quantity_'+product_list[i].id_product+'_'+product_list[i].id_product_attribute+'_'+product_list[i].id_customization+'_'+product_list[i].id_address_delivery+']')
 .val(product_list[i].customizationQuantityTotal);
 }
 // Show / hide quantity button if minimal quantity
 if (parseInt(product_list[i].minimal_quantity) == parseInt(product_list[i].quantity) && product_list[i].minimal_quantity != 1)
  $('#cart_quantity_down_'+product_list[i].id_product+'_'+product_list[i].id_product_attribute+'_'+Number(product_list[i].id_customization)+'_'+product_list[i].id_address_delivery).fadeTo('slow',0.3);
 else
  $('#cart_quantity_down_'+product_list[i].id_product+'_'+product_list[i].id_product_attribute+'_'+Number(product_list[i].id_customization)+'_'+product_list[i].id_address_delivery).fadeTo('slow',1);
}
// Update discounts
if (json.discounts.length == 0)
{
 $('.cart_discount').each(function(){$(this).remove()});
 $('.cart_total_voucher').remove();
}
else
{
 if ($('.cart_discount').length == 0)
  location.reload();
 if (priceDisplayMethod != 0)
  $('#total_discount').html(formatCurrency(json.total_discounts_tax_exc, currencyFormat, currencySign, currencyBlank));
 else
  $('#total_discount').html(formatCurrency(json.total_discounts, currencyFormat, currencySign, currencyBlank));
 $('.cart_discount').each(function(){
  var idElmt = $(this).attr('id').replace('cart_discount_','');
  var toDelete = true;
  for (i=0;i<json.discounts.length;i++)
  {
if (json.discounts[i].id_discount == idElmt)
{
 if (json.discounts[i].value_real != '!')
 {
  if (priceDisplayMethod != 0)
   $('#cart_discount_' + idElmt + ' td.cart_discount_price span.price-discount').html(formatCurrency(json.discounts[i].value_tax_exc * -1, currencyFormat, currencySign, currencyBlank));
  else
   $('#cart_discount_' + idElmt + ' td.cart_discount_price span.price-discount').html(formatCurrency(json.discounts[i].value_real * -1, currencyFormat, currencySign, currencyBlank));
 }
 toDelete = false;
}
  }
  if (toDelete)
$('#cart_discount_' + idElmt + ', #cart_total_voucher').fadeTo('fast', 0, function(){ $(this).remove(); });
 });
}
// Block cart
if (priceDisplayMethod != 0)
{
 $('#cart_block_shipping_cost').html(formatCurrency(json.total_shipping_tax_exc, currencyFormat, currencySign, currencyBlank));
 $('#cart_block_wrapping_cost').html(formatCurrency(json.total_wrapping_tax_exc, currencyFormat, currencySign, currencyBlank));
 $('#cart_block_total').html(formatCurrency(json.total_price_without_tax, currencyFormat, currencySign, currencyBlank));
} else {
 $('#cart_block_shipping_cost').html(formatCurrency(json.total_shipping, currencyFormat, currencySign, currencyBlank));
 $('#cart_block_wrapping_cost').html(formatCurrency(json.total_wrapping, currencyFormat, currencySign, currencyBlank));
 $('#cart_block_total').html(formatCurrency(json.total_price, currencyFormat, currencySign, currencyBlank));
}
$('#cart_block_tax_cost').html(formatCurrency(json.total_tax, currencyFormat, currencySign, currencyBlank));
$('.ajax_cart_quantity').html(nbrProducts);
// Cart summary
$('#summary_products_quantity').html(nbrProducts+' '+(nbrProducts > 1 ? txtProducts : txtProduct));
if (priceDisplayMethod != 0)
 $('#total_product').html(formatCurrency(json.total_products, currencyFormat, currencySign, currencyBlank));
else
 $('#total_product').html(formatCurrency(json.total_products_wt, currencyFormat, currencySign, currencyBlank));
$('#total_price').html(formatCurrency(json.total_price, currencyFormat, currencySign, currencyBlank));
$('#total_price_without_tax').html(formatCurrency(json.total_price_without_tax, currencyFormat, currencySign, currencyBlank));
$('#total_tax').html(formatCurrency(json.total_tax, currencyFormat, currencySign, currencyBlank));
if (json.total_shipping > 0)
{
 if (priceDisplayMethod != 0)
 {
  $('#total_shipping').html(formatCurrency(json.total_shipping_tax_exc, currencyFormat, currencySign, currencyBlank));
 }
 else
 {
  $('#total_shipping').html(formatCurrency(json.total_shipping, currencyFormat, currencySign, currencyBlank));
 }
}
else
{
 $('#total_shipping').html(freeShippingTranslation);
}
if (json.free_ship > 0 && !json.is_virtual_cart)
{
 $('.cart_free_shipping').fadeIn();
 $('#free_shipping').html(formatCurrency(json.free_ship, currencyFormat, currencySign, currencyBlank));
}
else
 $('.cart_free_shipping').hide();
if (json.total_wrapping > 0)
{
 $('#total_wrapping').html(formatCurrency(json.total_wrapping, currencyFormat, currencySign, currencyBlank));
 $('#total_wrapping').parent().show();
}
else
{
 $('#total_wrapping').html(formatCurrency(json.total_wrapping, currencyFormat, currencySign, currencyBlank));
 $('#total_wrapping').parent().hide();
}
if (window.ajaxCart !== undefined)
 ajaxCart.refresh();
}
function updateCustomizedDatas(json)
{
for(i in json)
 for(j in json[i])
  for(k in json[i][j])
for(l in json[i][j][k])
{
 var quantity = json[i][j][k][l]['quantity'];
 $('input[name=quantity_'+i+'_'+j+'_'+l+'_'+k+'_hidden]').val(quantity);
 $('input[name=quantity_'+i+'_'+j+'_'+l+'_'+k+']').val(quantity);
}
}
function updateHookShoppingCart(html)
{
$('#HOOK_SHOPPING_CART').html(html);
}
function updateHookShoppingCartExtra(html)
{
$('#HOOK_SHOPPING_CART_EXTRA').html(html);
}
function refreshDeliveryOptions()
{
$.each($('.delivery_option_radio'), function() {
 if ($(this).prop('checked'))
 {
  if ($(this).parent().find('.delivery_option_carrier.not-displayable').length == 0)
$(this).parent().find('.delivery_option_carrier').show();
  var carrier_id_list = $(this).val().split(',');
  carrier_id_list.pop();
  var it = this;
  $(carrier_id_list).each(function() {
$(it).parent().find('input[value="'+this.toString()+'"]').change();
  });
 }
 else
  $(this).parent().find('.delivery_option_carrier').hide();
});
}
$(document).ready(function() {

refreshDeliveryOptions();

$('.delivery_option_radio').live('change', function() {
 refreshDeliveryOptions();
});

$('#allow_seperated_package').live('click', function() {
 $.ajax({
  type: 'GET',
  url: baseUri,
  async: true,
  cache: false,
  data: 'controller=cart&ajax=true&allowSeperatedPackage&value='
+($(this).prop('checked') ? '1' : '0')
+'&token='+static_token
+'&allow_refresh=1',
  success: function(jsonData)
  {
if (typeof(getCarrierListAndUpdate) != 'undefined')
 getCarrierListAndUpdate();
  }
 });
});

$('#gift').checkboxChange(function() { $('#gift_div').show('slow'); }, function() { $('#gift_div').hide('slow'); });

$('#enable-multishipping').checkboxChange(
 function() {
  $('.standard-checkout').hide(0);
  $('.multishipping-checkout').show(0);
 },
 function() {
  $('.standard-checkout').show(0);
  $('.multishipping-checkout').hide(0);
 }
);
});
function updateExtraCarrier(id_delivery_option, id_address)
{
if(typeof(orderOpcUrl) != 'undefined')
 var url = orderOpcUrl;
else
 var url = orderUrl;

$.ajax({
 type: 'POST',
 url: url,
 async: true,
 cache: false,
 dataType : "json",
 data: 'ajax=true'
  +'&method=updateExtraCarrier'
  +'&id_address='+id_address
  +'&id_delivery_option='+id_delivery_option
  +'&token='+static_token
  +'&allow_refresh=1',
 success: function(jsonData)
 {
  $('#HOOK_EXTRACARRIER_'+id_address).html(jsonData['content']);
 }
});
}

Link to comment
Share on other sites

ah ok effectivement sur la 1.5 il n'y a plus ce bout de code

 

Avez-vous enlevé les lignes 141 à 165 du fichier shopping-cart.tpl ?

 

{if $total_shipping_tax_exc <= 0 && !isset($virtualCart)}
   <tr class="cart_total_delivery">
 <td colspan="5">{l s='Shipping:'}</td>
 <td colspan="2" class="price" id="total_shipping">{l s='Free Shipping!'}</td>
   </tr>
  {else}
   {if $use_taxes}
 {if $priceDisplay}
  <tr class="cart_total_delivery" {if $total_shipping_tax_exc <= 0} style="display:none;"{/if}>
   <td colspan="5">{if $display_tax_label}{l s='Total shipping (tax excl.):'}{else}{l s='Total shipping:'}{/if}</td>
   <td colspan="2" class="price" id="total_shipping">{displayPrice price=$total_shipping_tax_exc}</td>
  </tr>
 {else}
  <tr class="cart_total_delivery"{if $total_shipping <= 0} style="display:none;"{/if}>
   <td colspan="5">{if $display_tax_label}{l s='Total shipping (tax incl.):'}{else}{l s='Total shipping:'}{/if}</td>
   <td colspan="2" class="price" id="total_shipping" >{displayPrice price=$total_shipping}</td>
  </tr>
 {/if}
   {else}
 <tr class="cart_total_delivery"{if $total_shipping_tax_exc <= 0} style="display:none;"{/if}>
  <td colspan="5">{l s='Total shipping:'}</td>
  <td colspan="2" class="price" id="total_shipping" >{displayPrice price=$total_shipping_tax_exc}</td>
 </tr>
   {/if}
  {/if}

Link to comment
Share on other sites

Oui et ça m’amène a ça :

 

post-440897-0-24699300-1360849674_thumb.jpg

 

La ligne "Total frais de port" disparait bien du recap de commande, mais reste dans le bloc panier en haut a droite et surtout les frais de port restent comptabilisé.

 

ça fait plusieurs jours que je butte la dessus, j'ai trouvé plein d'info pour Prestashop 1.3 ou 1.4, mais rien pour 1.5 et comme vous-avez pu le voir le code est différent et je n'arrive pas a adapter.

Link to comment
Share on other sites

Pour ne plus comptabiliser les frais de ports, il faudrait créer un transporteur gratuit par défaut

 

Pour ne plus afficher cette ligne dans le bloc panier, il faut modifier le fichier se trouvant dans ce chemin :

modules/blockcart/blockcart.tpl , et soit vous supprimer soit vous rajoutez un span autour pour faire un display none et masquer la ligne

 

Entre la ligne 138 et 141 de blockcart.tpl :

 

Supprimez :

  <span id="cart_block_shipping_cost" class="price ajax_cart_shipping_cost">{$shipping_cost}</span>
  <span>{l s='Shipping' mod='blockcart'}</span>

ou rajoutez un span autour comme ceci :


<span style="display:none">
  <span id="cart_block_shipping_cost" class="price ajax_cart_shipping_cost">{$shipping_cost}</span>
  <span>{l s='Shipping' mod='blockcart'}</span>
</span>

Link to comment
Share on other sites

Petit a petit ça avance :)

 

post-440897-0-79451800-1360852320_thumb.jpg

 

Pour que les frais de transport ne soit plus comptabilisé j'avais trouvé cette solution :

 

 

Mais un fois désactivé les totaux seront toujours calculé en incluant le transport.

2 - Modification des totaux par suppression du prix du transport

Le prix de transport est créer dans la variable $shippingCost avant d'être affiché, il suffit de soustraire cette variable à vos totaux.

exemple : {displayPrice price=$total_price} devient {displayPrice price=
(
$total_price
-$shippingCost)
}

NE pas oublier de faire tout les montant sauf la tva sinon cela ne collera pas.

3 - Modification de la ligne de tva car elle inclu de la tva sur le transport.

Le montant de la taxe total est repris dans la variable $total_tax, par contre celle-ci intègre de de la tva pour le transport qu'il faut enlever si il y en a.

exemple : {displayPrice price=$total_tax} devient {displayPrice price=($total_tax-($shippingCostTaxExc*19.6/100))}

 

Mais il n'y a pas la variable $shippingCost dans mon fichier shopping-cart.tpl, voir ci-dessous :

 

{*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2012 PrestaShop SA
*  @version  Release: $Revision: 7476 $
*  @license	http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
{capture name=path}{l s='Your shopping cart'}{/capture}
{include file="$tpl_dir./breadcrumb.tpl"}
<h1 id="cart_title">{l s='Shopping cart summary'}</h1>
{if isset($account_created)}
<p class="success">
 {l s='Your account has been created.'}
</p>
{/if}
{assign var='current_step' value='summary'}
{include file="$tpl_dir./order-steps.tpl"}
{include file="$tpl_dir./errors.tpl"}
{if isset($empty)}
<p class="warning">{l s='Your shopping cart is empty.'}</p>
{elseif $PS_CATALOG_MODE}
<p class="warning">{l s='This store has not accepted your new order.'}</p>
{else}
<script type="text/javascript">
// <![CDATA[
var currencySign = '{$currencySign|html_entity_decode:2:"UTF-8"}';
var currencyRate = '{$currencyRate|floatval}';
var currencyFormat = '{$currencyFormat|intval}';
var currencyBlank = '{$currencyBlank|intval}';
var txtProduct = "{l s='product'}";
var txtProducts = "{l s='products'}";
var deliveryAddress = {$cart->id_address_delivery|intval};
// ]]>
</script>
<p style="display:none" id="emptyCartWarning" class="warning">{l s='Your shopping cart is empty.'}</p>
{if isset($lastProductAdded) AND $lastProductAdded}
<div class="cart_last_product">
 <div class="cart_last_product_header">
  <div class="left">{l s='Last product added'}</div>
 </div>
 <a  class="cart_last_product_img" href="{$link->getProductLink($lastProductAdded.id_product, $lastProductAdded.link_rewrite, $lastProductAdded.category, null, null, $lastProductAdded.id_shop)|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($lastProductAdded.link_rewrite, $lastProductAdded.id_image, 'small_default')}" alt="{$lastProductAdded.name|escape:'htmlall':'UTF-8'}"/></a>
 <div class="cart_last_product_content">
  <h5><a href="{$link->getProductLink($lastProductAdded.id_product, $lastProductAdded.link_rewrite, $lastProductAdded.category, null, null, null, $lastProductAdded.id_product_attribute)|escape:'htmlall':'UTF-8'}">{$lastProductAdded.name|escape:'htmlall':'UTF-8'}</a></h5>
  {if isset($lastProductAdded.attributes) && $lastProductAdded.attributes}<a href="{$link->getProductLink($lastProductAdded.id_product, $lastProductAdded.link_rewrite, $lastProductAdded.category, null, null, null, $lastProductAdded.id_product_attribute)|escape:'htmlall':'UTF-8'}">{$lastProductAdded.attributes|escape:'htmlall':'UTF-8'}</a>{/if}
 </div>
 <br class="clear" />
</div>
{/if}
<p>{l s='Your shopping cart contains:'} <span id="summary_products_quantity">{$productNumber} {if $productNumber == 1}{l s='product'}{else}{l s='products'}{/if}</span></p>
<div id="order-detail-content" class="table_block">
<table id="cart_summary" class="std">
 <thead>
  <tr>
<th class="cart_product first_item">{l s='Product'}</th>
<th class="cart_description item">{l s='Description'}</th>
<th class="cart_ref item">{l s='Ref.'}</th>
<th class="cart_unit item">{l s='Unit price'}</th>
<th class="cart_quantity item">{l s='Qty'}</th>
<th class="cart_total item">{l s='Total'}</th>
<th class="cart_delete last_item"> </th>
  </tr>
 </thead>
 <tfoot>
 {if $use_taxes}
  {if $priceDisplay}
<tr class="cart_total_price">
 <td colspan="5">{if $display_tax_label}{l s='Total products (tax excl.):'}{else}{l s='Total products:'}{/if}</td>
 <td colspan="2" class="price" id="total_product">{displayPrice price=$total_products}</td>
</tr>
  {else}
<tr class="cart_total_price">
 <td colspan="5">{if $display_tax_label}{l s='Total products (tax incl.):'}{else}{l s='Total products:'}{/if}</td>
 <td colspan="2" class="price" id="total_product">{displayPrice price=$total_products_wt}</td>
</tr>
  {/if}
 {else}
  <tr class="cart_total_price">
<td colspan="5">{l s='Total products:'}</td>
<td colspan="2" class="price" id="total_product">{displayPrice price=$total_products}</td>
  </tr>
 {/if}
  <tr class="cart_total_voucher" {if $total_discounts == 0}style="display:none"{/if}>
<td colspan="5">
{if $use_taxes && $display_tax_label}
 {l s='Total vouchers (tax excl.):'}
{else}
 {l s='Total vouchers:'}
{/if}
</td>
<td colspan="2" class="price-discount price" id="total_discount">
{if $use_taxes && !$priceDisplay}
 {assign var='total_discounts_negative' value=$total_discounts * -1}
{else}
 {assign var='total_discounts_negative' value=$total_discounts_tax_exc * -1}
{/if}
{displayPrice price=$total_discounts_negative}
</td>
  </tr>
  <tr class="cart_total_voucher" {if $total_wrapping == 0}style="display: none;"{/if}>
<td colspan="5">
{if $use_taxes}
 {if $display_tax_label}{l s='Total gift-wrapping (tax incl.):'}{else}{l s='Total gift-wrapping:'}{/if}
{else}
 {l s='Total gift-wrapping:'}
{/if}
</td>
<td colspan="2" class="price-discount price" id="total_wrapping">
{if $use_taxes}
 {if $priceDisplay}
  {displayPrice price=$total_wrapping_tax_exc}
 {else}
  {displayPrice price=$total_wrapping}
 {/if}
{else}
 {displayPrice price=$total_wrapping_tax_exc}
{/if}
</td>
  </tr>
{*
  {if $total_shipping_tax_exc <= 0 && !isset($virtualCart)}
<tr class="cart_total_delivery">
 <td colspan="5">{l s='Shipping:'}</td>
 <td colspan="2" class="price" id="total_shipping">{l s='Free Shipping!'}</td>
</tr>
  {else}
{if $use_taxes}
 {if $priceDisplay}
  <tr class="cart_total_delivery" {if $total_shipping_tax_exc <= 0} style="display:none;"{/if}>
   <td colspan="5">{if $display_tax_label}{l s='Total shipping (tax excl.):'}{else}{l s='Total shipping:'}{/if}</td>
   <td colspan="2" class="price" id="total_shipping">{displayPrice price=$total_shipping_tax_exc}</td>
  </tr>
 {else}
  <tr class="cart_total_delivery"{if $total_shipping <= 0} style="display:none;"{/if}>
   <td colspan="5">{if $display_tax_label}{l s='Total shipping (tax incl.):'}{else}{l s='Total shipping:'}{/if}</td>
   <td colspan="2" class="price" id="total_shipping" >{displayPrice price=$total_shipping}</td>
  </tr>
 {/if}
{else}
 <tr class="cart_total_delivery"{if $total_shipping_tax_exc <= 0} style="display:none;"{/if}>
  <td colspan="5">{l s='Total shipping:'}</td>
  <td colspan="2" class="price" id="total_shipping" >{displayPrice price=$total_shipping_tax_exc}</td>
 </tr>
{/if}
  {/if}
*}
  {if $use_taxes}
  <tr class="cart_total_price">
<td colspan="5">{l s='Total (tax excl.):'}</td>
<td colspan="2" class="price" id="total_price_without_tax">{displayPrice price=$total_price_without_tax}</td>
  </tr>
  <tr class="cart_total_tax">
<td colspan="5">{l s='Total tax:'}</td>
<td colspan="2" class="price" id="total_tax">{displayPrice price=$total_tax}</td>
  </tr>
  {/if}
  <tr class="cart_total_price">
<td colspan="5" id="cart_voucher" class="cart_voucher">
{if $voucherAllowed}
 {if isset($errors_discount) && $errors_discount}
  <ul class="error">
  {foreach $errors_discount as $k=>$error}
   <li>{$error|escape:'htmlall':'UTF-8'}</li>
  {/foreach}
  </ul>
 {/if}
 <form action="{if $opc}{$link->getPageLink('order-opc', true)}{else}{$link->getPageLink('order', true)}{/if}" method="post" id="voucher">
  <fieldset>
   <h4><label for="discount_name">{l s='Vouchers'}</label></h4>
   <p>
	<input type="text" class="discount_name" id="discount_name" name="discount_name" value="{if isset($discount_name) && $discount_name}{$discount_name}{/if}" />
   </p>
   <p class="submit"><input type="hidden" name="submitDiscount" /><input type="submit" name="submitAddDiscount" value="{l s='OK'}" class="button" /></p>
  {if $displayVouchers}
   <h4 class="title_offers">{l s='Take advantage of our offers:'}</h4>
   <div id="display_cart_vouchers">
   {foreach $displayVouchers as $voucher}
	<span onclick="$('#discount_name').val('{$voucher.name}');return false;" class="voucher_name">{$voucher.name}</span> - {$voucher.description} <br />
   {/foreach}
   </div>
  {/if}
  </fieldset>
 </form>
{/if}
</td>
{if $use_taxes}
<td colspan="2" class="price total_price_container" id="total_price_container">
 <p>{l s='Total:'}</p>
 <span id="total_price">{displayPrice price=$total_price}</span>
</td>
{else}
<td colspan="2" class="price total_price_container" id="total_price_container">
 <p>{l s='Total:'}</p>
 <span id="total_price">{displayPrice price=$total_price_without_tax}</span>
</td>
{/if}
  </tr>
 </tfoot>
 <tbody>
 {foreach $products as $product}
  {assign var='productId' value=$product.id_product}
  {assign var='productAttributeId' value=$product.id_product_attribute}
  {assign var='quantityDisplayed' value=0}
  {assign var='odd' value=$product@iteration%2}
  {assign var='ignoreProductLast' value=isset($customizedDatas.$productId.$productAttributeId) || count($gift_products)}
  {* Display the product line *}
  {include file="./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first}
  {* Then the customized datas ones*}
  {if isset($customizedDatas.$productId.$productAttributeId)}
{foreach $customizedDatas.$productId.$productAttributeId[$product.id_address_delivery] as $id_customization=>$customization}
 <tr id="product_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" class="product_customization_for_{$product.id_product}_{$product.id_product_attribute}_{$product.id_address_delivery|intval} {if $odd}odd{else}even{/if} customization alternate_item {if $product@last && $customization@last && !count($gift_products)}last_item{/if}">
  <td></td>
  <td colspan="3">
   {foreach $customization.datas as $type => $custom_data}
	{if $type == $CUSTOMIZE_FILE}
	 <div class="customizationUploaded">
	  <ul class="customizationUploaded">
	   {foreach $custom_data as $picture}
		<li><img src="{$pic_dir}{$picture.value}_small" alt="" class="customizationUploaded" /></li>
	   {/foreach}
	  </ul>
	 </div>
	{elseif $type == $CUSTOMIZE_TEXTFIELD}
	 <ul class="typedText">
	  {foreach $custom_data as $textField}
	   <li>
		{if $textField.name}
		 {$textField.name}
		{else}
		 {l s='Text #'}{$textField@index+1}
		{/if}
		{l s=':'} {$textField.value}
	   </li>
	  {/foreach}

	 </ul>
	{/if}
   {/foreach}
  </td>
  <td class="cart_quantity" colspan="2">
   {if isset($cannotModify) AND $cannotModify == 1}
	<span style="float:left">{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}</span>
   {else}
	<div id="cart_quantity_button" class="cart_quantity_button" style="float:left">
	<a rel="nofollow" class="cart_quantity_up" id="cart_quantity_up_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "add&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery}&id_customization={$id_customization}&token={$token_cart}")}" title="{l s='Add'}"><img src="{$img_dir}icon/quantity_up.gif" alt="{l s='Add'}" width="14" height="9" /></a><br />
	{if $product.minimal_quantity < ($customization.quantity -$quantityDisplayed) OR $product.minimal_quantity <= 1}
	<a rel="nofollow" class="cart_quantity_down" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "add&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery}&id_customization={$id_customization}&op=down&token={$token_cart}")}" title="{l s='Subtract'}">
	 <img src="{$img_dir}icon/quantity_down.gif" alt="{l s='Subtract'}" width="14" height="9" />
	</a>
	{else}
	<a class="cart_quantity_down" style="opacity: 0.3;" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" href="#" title="{l s='Subtract'}">
	 <img src="{$img_dir}icon/quantity_down.gif" alt="{l s='Subtract'}" width="14" height="9" />
	</a>
	{/if}
	</div>
	<input type="hidden" value="{$customization.quantity}" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_hidden"/>
	<input size="2" type="text" value="{$customization.quantity}" class="cart_quantity_input" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}"/>
   {/if}
  </td>
  <td class="cart_delete">
   {if isset($cannotModify) AND $cannotModify == 1}
   {else}
	<div>
	 <a rel="nofollow" class="cart_quantity_delete" id="{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "delete&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_customization={$id_customization}&id_address_delivery={$product.id_address_delivery}&token={$token_cart}")}">{l s='Delete'}</a>
	</div>
   {/if}
  </td>
 </tr>
 {assign var='quantityDisplayed' value=$quantityDisplayed+$customization.quantity}
{/foreach}
{* If it exists also some uncustomized products *}
{if $product.quantity-$quantityDisplayed > 0}{include file="./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first}{/if}
  {/if}
 {/foreach}
 {assign var='last_was_odd' value=$product@iteration%2}
 {foreach $gift_products as $product}
  {assign var='productId' value=$product.id_product}
  {assign var='productAttributeId' value=$product.id_product_attribute}
  {assign var='quantityDisplayed' value=0}
  {assign var='odd' value=($product@iteration+$last_was_odd)%2}
  {assign var='ignoreProductLast' value=isset($customizedDatas.$productId.$productAttributeId)}
  {assign var='cannotModify' value=1}
  {* Display the gift product line *}
  {include file="./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first}
 {/foreach}
 </tbody>
{if sizeof($discounts)}
 <tbody>
 {foreach $discounts as $discount}
  <tr class="cart_discount {if $discount@last}last_item{elseif $discount@first}first_item{else}item{/if}" id="cart_discount_{$discount.id_discount}">
<td class="cart_discount_name" colspan="3">{$discount.name}</td>
<td class="cart_discount_price"><span class="price-discount">
 {if !$priceDisplay}{displayPrice price=$discount.value_real*-1}{else}{displayPrice price=$discount.value_tax_exc*-1}{/if}
</span></td>
<td class="cart_discount_delete">1</td>
<td class="cart_discount_price">
 <span class="price-discount price">{if !$priceDisplay}{displayPrice price=$discount.value_real*-1}{else}{displayPrice price=$discount.value_tax_exc*-1}{/if}</span>
</td>
<td class="price_discount_del">
 {if strlen($discount.code)}<a href="{if $opc}{$link->getPageLink('order-opc', true)}{else}{$link->getPageLink('order', true)}{/if}?deleteDiscount={$discount.id_discount}" class="price_discount_delete" title="{l s='Delete'}">{l s='Delete'}</a>{/if}
</td>
  </tr>
 {/foreach}
 </tbody>
{/if}
</table>
</div>
{if $show_option_allow_separate_package}
<p>
<input type="checkbox" name="allow_seperated_package" id="allow_seperated_package" {if $cart->allow_seperated_package}checked="checked"{/if} />
<label for="allow_seperated_package">{l s='Send the available products first'}</label>
</p>
{/if}
{if !$opc}
{if Configuration::get('PS_ALLOW_MULTISHIPPING')}
 <p>
  <input type="checkbox" {if $multi_shipping}checked="checked"{/if} id="enable-multishipping" />
  <label for="enable-multishipping">{l s='I want to specify a delivery address for each individual product.'}</label>
 </p>
{/if}
{/if}
<div id="HOOK_SHOPPING_CART">{$HOOK_SHOPPING_CART}</div>
{* Define the style if it doesn't exist in the PrestaShop version*}
{* Will be deleted for 1.5 version and more *}
{if !isset($addresses_style)}
{$addresses_style.company = 'address_company'}
{$addresses_style.vat_number = 'address_company'}
{$addresses_style.firstname = 'address_name'}
{$addresses_style.lastname = 'address_name'}
{$addresses_style.address1 = 'address_address1'}
{$addresses_style.address2 = 'address_address2'}
{$addresses_style.city = 'address_city'}
{$addresses_style.country = 'address_country'}
{$addresses_style.phone = 'address_phone'}
{$addresses_style.phone_mobile = 'address_phone_mobile'}
{$addresses_style.alias = 'address_title'}
{/if}
{if ((!empty($delivery_option) AND !isset($virtualCart)) OR $delivery->id OR $invoice->id) AND !$opc}
<div class="order_delivery clearfix">
{if !isset($formattedAddresses)}
{if $delivery->id}
<ul id="delivery_address" class="address item">
 <li class="address_title">{l s='Delivery address'}</li>
 {if $delivery->company}<li class="address_company">{$delivery->company|escape:'htmlall':'UTF-8'}</li>{/if}
 <li class="address_name">{$delivery->firstname|escape:'htmlall':'UTF-8'} {$delivery->lastname|escape:'htmlall':'UTF-8'}</li>
 <li class="address_address1">{$delivery->address1|escape:'htmlall':'UTF-8'}</li>
 {if $delivery->address2}<li class="address_address2">{$delivery->address2|escape:'htmlall':'UTF-8'}</li>{/if}
 <li class="address_city">{$delivery->postcode|escape:'htmlall':'UTF-8'} {$delivery->city|escape:'htmlall':'UTF-8'}</li>
 <li class="address_country">{$delivery->country|escape:'htmlall':'UTF-8'} {if $delivery_state}({$delivery_state|escape:'htmlall':'UTF-8'}){/if}</li>
</ul>
{/if}
{if $invoice->id}
<ul id="invoice_address" class="address alternate_item">
 <li class="address_title">{l s='Invoice address'}</li>
 {if $invoice->company}<li class="address_company">{$invoice->company|escape:'htmlall':'UTF-8'}</li>{/if}
 <li class="address_name">{$invoice->firstname|escape:'htmlall':'UTF-8'} {$invoice->lastname|escape:'htmlall':'UTF-8'}</li>
 <li class="address_address1">{$invoice->address1|escape:'htmlall':'UTF-8'}</li>
 {if $invoice->address2}<li class="address_address2">{$invoice->address2|escape:'htmlall':'UTF-8'}</li>{/if}
 <li class="address_city">{$invoice->postcode|escape:'htmlall':'UTF-8'} {$invoice->city|escape:'htmlall':'UTF-8'}</li>
 <li class="address_country">{$invoice->country|escape:'htmlall':'UTF-8'} {if $invoice_state}({$invoice_state|escape:'htmlall':'UTF-8'}){/if}</li>
</ul>
{/if}
{else}
 {foreach $formattedAddresses as $address}
  <ul class="address {if $address@last}last_item{elseif $address@first}first_item{/if} {if $address@index % 2}alternate_item{else}item{/if}">
<li class="address_title">{$address.object.alias}</li>
{foreach $address.ordered as $pattern}
 {assign var=addressKey value=" "|explode:$pattern}
 <li>
 {foreach $addressKey as $key}
  <span class="{if isset($addresses_style[$key])}{$addresses_style[$key]}{/if}">
   {if isset($address.formated[$key])}
	{$address.formated[$key]|escape:'htmlall':'UTF-8'}
   {/if}
  </span>
 {/foreach}
 </li>
{/foreach}
</ul>
 {/foreach}
 <p class="clear" />
{/if}
</div>
{/if}
<p class="cart_navigation">
{if !$opc}
 <a href="{if $back}{$link->getPageLink('order', true, NULL, 'step=1&back={$back}')}{else}{$link->getPageLink('order', true, NULL, 'step=1')}{/if}" class="exclusive standard-checkout" title="{l s='Next'}">{l s='Next'} »</a>
 {if Configuration::get('PS_ALLOW_MULTISHIPPING')}
  <a href="{if $back}{$link->getPageLink('order', true, NULL, 'step=1&back={$back}')}{else}{$link->getPageLink('order', true, NULL, 'step=1')}{/if}&multi-shipping=1" class="multishipping-button multishipping-checkout exclusive" title="{l s='Next'}">{l s='Next'} »</a>
 {/if}
{/if}
<a href="{if (isset($smarty.server.HTTP_REFERER) && strstr($smarty.server.HTTP_REFERER, 'order.php')) || isset($smarty.server.HTTP_REFERER) && strstr($smarty.server.HTTP_REFERER, 'order-opc') || !isset($smarty.server.HTTP_REFERER)}{$link->getPageLink('index')}{else}{$smarty.server.HTTP_REFERER|escape:'htmlall':'UTF-8'|secureReferrer}{/if}" class="button_large" title="{l s='Continue shopping'}">« {l s='Continue shopping'}</a>
</p>
{if !empty($HOOK_SHOPPING_CART_EXTRA)}
 <div class="clear"></div>
 <div class="cart_navigation_extra">
  <div id="HOOK_SHOPPING_CART_EXTRA">{$HOOK_SHOPPING_CART_EXTRA}</div>
 </div>
{/if}
{/if}

 

La variable a du changer de nom...

je voudrais eviter dans la mesure du possible le recoure au transporteur gratuit pour éviter les quiproquos ;)

Link to comment
Share on other sites

le probleme de cette solution (modifier le montant dans le tpl) : si vous avez le panier en ajax, lors de l'ajout du produit le port sera recalculé.

 

à mon avis il faut essayer de faire un frais de port à 0 (donc créer un transporteur gratuit par défaut) afin qu'il ne comptabilise jamais le port dans le bloc panier, puis selon les tranches le transporteur s'affichera ou non

Link to comment
Share on other sites

le probleme de cette solution (modifier le montant dans le tpl) : si vous avez le panier en ajax, lors de l'ajout du produit le port sera recalculé.

 

Je vois pas ou est le problème vu que le port ne s'affiche plus, hors mis le faite que ça alourdi le processus, c'est vrais.

 

Bon en attendant mieux j'ai suivi votre conseil et mis "enlèvement en magasin" comme transporteur par défaut et ça fonctionne...

Mais existe t-il d'autre module de panier plus performant qui gère ce genre de chose ?

 

en tous cas merci de votre aide ;)

Link to comment
Share on other sites

  • 3 months later...
  • 7 months later...
  • 1 month later...

Si c'est toujours d'actualité .. pour prestashop 1.5

 

Pour enlever les frais de port du panier quand le client n'est pas connecté faut modifier le fichier shopping-cart.tpl car pour un client hors France le panier affiche un port France.

 

Voir le code modifier.

{*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2013 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}

{capture name=path}{l s='Your shopping cart'}{/capture}
{include file="$tpl_dir./breadcrumb.tpl"}

<h1 id="cart_title">{l s='Shopping-cart summary'}</h1>

{if isset($account_created)}
	<p class="success">
		{l s='Your account has been created.'}
	</p>
{/if}
{assign var='current_step' value='summary'}
{include file="$tpl_dir./order-steps.tpl"}
{include file="$tpl_dir./errors.tpl"}

{if isset($empty)}
	<p class="warning">{l s='Your shopping cart is empty.'}</p>
{elseif $PS_CATALOG_MODE}
	<p class="warning">{l s='This store has not accepted your new order.'}</p>
{else}
	<script type="text/javascript">
	// <![CDATA[
	var currencySign = '{$currencySign|html_entity_decode:2:"UTF-8"}';
	var currencyRate = '{$currencyRate|floatval}';
	var currencyFormat = '{$currencyFormat|intval}';
	var currencyBlank = '{$currencyBlank|intval}';
	var txtProduct = "{l s='product' js=1}";
	var txtProducts = "{l s='products' js=1}";
	var deliveryAddress = {$cart->id_address_delivery|intval};
	// ]]>
	</script>
	<p style="display:none" id="emptyCartWarning" class="warning">{l s='Your shopping cart is empty.'}</p>
{if isset($lastProductAdded) AND $lastProductAdded}
	<div class="cart_last_product">
		<div class="cart_last_product_header">
			<div class="left">{l s='Last product added'}</div>
		</div>
		<a  class="cart_last_product_img" href="{$link->getProductLink($lastProductAdded.id_product, $lastProductAdded.link_rewrite, $lastProductAdded.category, null, null, $lastProductAdded.id_shop)|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($lastProductAdded.link_rewrite, $lastProductAdded.id_image, 'small_default')|escape:'html'}" alt="{$lastProductAdded.name|escape:'htmlall':'UTF-8'}"/></a>
		<div class="cart_last_product_content">
			<p class="s_title_block"><a href="{$link->getProductLink($lastProductAdded.id_product, $lastProductAdded.link_rewrite, $lastProductAdded.category, null, null, null, $lastProductAdded.id_product_attribute)|escape:'htmlall':'UTF-8'}">{$lastProductAdded.name|escape:'htmlall':'UTF-8'}</a></p>
			{if isset($lastProductAdded.attributes) && $lastProductAdded.attributes}<a href="{$link->getProductLink($lastProductAdded.id_product, $lastProductAdded.link_rewrite, $lastProductAdded.category, null, null, null, $lastProductAdded.id_product_attribute)|escape:'htmlall':'UTF-8'}">{$lastProductAdded.attributes|escape:'htmlall':'UTF-8'}</a>{/if}
		</div>
		<br class="clear" />
	</div>
{/if}
<p>{l s='Your shopping cart contains:'} <span id="summary_products_quantity">{$productNumber} {if $productNumber == 1}{l s='product'}{else}{l s='products'}{/if}</span></p>
<div id="order-detail-content" class="table_block">
	<table id="cart_summary" class="std">
		<thead>
			<tr>
				<th class="cart_product first_item">{l s='Product'}</th>
				<th class="cart_description item">{l s='Description'}</th>
				<th class="cart_ref item">{l s='Ref.'}</th>
				<th class="cart_unit item">{l s='Unit price'}</th>
				<th class="cart_quantity item">{l s='Qty'}</th>
				<th class="cart_total item">{l s='Total'}</th>
				<th class="cart_delete last_item"> </th>
			</tr>
		</thead>
		<tfoot>
		{if $use_taxes}
			{if $priceDisplay}
				<tr class="cart_total_price">
					<td colspan="5">{if $display_tax_label}{l s='Total products (tax excl.)'}{else}{l s='Total products'}{/if}</td>
					<td colspan="2" class="price" id="total_product">{displayPrice price=$total_products}</td>
				</tr>
			{else}
				<tr class="cart_total_price">
					<td colspan="5">{if $display_tax_label}{l s='Total products (tax incl.)'}{else}{l s='Total products'}{/if}</td>
					<td colspan="2" class="price" id="total_product">{displayPrice price=$total_products_wt}</td>
				</tr>
			{/if}
		{else}
			<tr class="cart_total_price">
				<td colspan="5">{l s='Total products'}</td>
				<td colspan="2" class="price" id="total_product">{displayPrice price=$total_products}</td>
			</tr>
		{/if}
			<tr{if $total_wrapping == 0} style="display: none;"{/if}>
				
				<!-- Gérard supprim 17 lignes -->

				<td colspan="5">
				{if $use_taxes}
					{if $display_tax_label}{l s='Total gift wrapping (tax incl.):'}{else}{l s='Total gift-wrapping cost:'}{/if}
				{else}
					{l s='Total gift-wrapping cost:'}
				{/if}
				</td>
				<td colspan="2" class="price-discount price" id="total_wrapping">
				{if $use_taxes}
					{if $priceDisplay}
						{displayPrice price=$total_wrapping_tax_exc}
					{else}
						{displayPrice price=$total_wrapping}
					{/if}
				{else}
					{displayPrice price=$total_wrapping_tax_exc}
				{/if}
				</td>
			</tr>
			
						               

			<!-- Gérard  -->
			
			{if $total_shipping_tax_exc <= 0 && !isset($virtualCart)}
				<tr class="cart_total_delivery" style="{if !isset($carrier->id) || is_null($carrier->id)}display:none;{/if}">
					<td colspan="5">{l s='Shipping'}</td>
					<td colspan="2" class="price" id="total_shipping">{l s='Free Shipping!'}</td>
				</tr>
						{/if}
			<tr class="cart_total_voucher" {if $total_discounts == 0}style="display:none"{/if}>
				<td colspan="5">
				{if $display_tax_label}
					{if $use_taxes && $priceDisplay == 0}
						{l s='Total vouchers (tax incl.):'}
					{else}
						{l s='Total vouchers (tax excl.)'}
					{/if}
				{else}
					{l s='Total vouchers'}
				{/if}
				</td>
				<td colspan="2" class="price-discount price" id="total_discount">
				{if $use_taxes && $priceDisplay == 0}
					{assign var='total_discounts_negative' value=$total_discounts * -1}
				{else}
					{assign var='total_discounts_negative' value=$total_discounts_tax_exc * -1}
				{/if}
				{displayPrice price=$total_discounts_negative}
				</td>
			</tr>
			{if $use_taxes && $show_taxes}
			<tr class="cart_total_price">
				<td colspan="5">{l s='Total (tax excl.)'}</td>
				<td colspan="2" class="price" id="total_price_without_tax">{displayPrice price=$total_price_without_tax}</td>
			</tr>
			<tr class="cart_total_tax">
				<td colspan="5">{l s='Total tax'}</td>
				<td colspan="2" class="price" id="total_tax">{displayPrice price=$total_tax}</td>
			</tr>
			{/if}
			<tr class="cart_total_price">
				<td colspan="5" id="cart_voucher" class="cart_voucher">
				{if $voucherAllowed}
					{if isset($errors_discount) && $errors_discount}
						<ul class="error">
						{foreach $errors_discount as $k=>$error}
							<li>{$error|escape:'htmlall':'UTF-8'}</li>
						{/foreach}
						</ul>
					{/if}					
					
					<!-- Gérard  -->
					
					
					
								
					
					<form action="{if $opc}{$link->getPageLink('order-opc', true)}{else}{$link->getPageLink('order', true)}{/if}" method="post" id="voucher">
						<fieldset>
							<p class="title_block"><label for="discount_name">{l s='Vouchers'}</label></p>
							<p class="discount_name_block">
								<input type="text" class="discount_name" id="discount_name" name="discount_name" value="{if isset($discount_name) && $discount_name}{$discount_name}{/if}" />
							</p>
							<p class="submit"><input type="hidden" name="submitDiscount" /><input type="submit" name="submitAddDiscount" value="{l s='OK'}" class="button" /></p>
						</fieldset>
					</form>
					{if $displayVouchers}
						<p id="title" class="title_offers">{l s='Take advantage of our exclusive offers:'}</p>
						<div id="display_cart_vouchers">
						{foreach $displayVouchers as $voucher}
							{if $voucher.code != ''}<span onclick="$('#discount_name').val('{$voucher.code}');return false;" class="voucher_name">{$voucher.code}</span> - {/if}{$voucher.name}<br />
						{/foreach}
						</div>
					{/if}
				{/if}
				</td>
				{if $use_taxes}
			
				<td colspan="2" class="price total_price_container" id="total_price_container">
					<p style="font-size:16px;">{l s='Total'} :
					<span id="total_price">{displayPrice price=$total_products_wt}</span></p>
				</td>
				{/if}
			</tr>
		</tfoot>
		
		
		
		
		
		
		<tbody>
		{assign var='odd' value=0}
		{foreach $products as $product}
			{assign var='productId' value=$product.id_product}
			{assign var='productAttributeId' value=$product.id_product_attribute}
			{assign var='quantityDisplayed' value=0}
			{assign var='odd' value=($odd+1)%2}
			{assign var='ignoreProductLast' value=isset($customizedDatas.$productId.$productAttributeId) || count($gift_products)}
			{* Display the product line *}
			{include file="$tpl_dir./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first}
			{* Then the customized datas ones*}
			{if isset($customizedDatas.$productId.$productAttributeId)}
				{foreach $customizedDatas.$productId.$productAttributeId[$product.id_address_delivery] as $id_customization=>$customization}
					<tr id="product_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" class="product_customization_for_{$product.id_product}_{$product.id_product_attribute}_{$product.id_address_delivery|intval}{if $odd} odd{else} even{/if} customization alternate_item {if $product@last && $customization@last && !count($gift_products)}last_item{/if}">
						<td></td>
						<td colspan="3">
							{foreach $customization.datas as $type => $custom_data}
								{if $type == $CUSTOMIZE_FILE}
									<div class="customizationUploaded">
										<ul class="customizationUploaded">
											{foreach $custom_data as $picture}
												<li><img src="{$pic_dir}{$picture.value}_small" alt="" class="customizationUploaded" /></li>
											{/foreach}
										</ul>
									</div>
								{elseif $type == $CUSTOMIZE_TEXTFIELD}
									<ul class="typedText">
										{foreach $custom_data as $textField}
											<li>
												{if $textField.name}
													{$textField.name}
												{else}
													{l s='Text #'}{$textField@index+1}
												{/if}
												{l s=':'} {$textField.value}
											</li>
										{/foreach}
										
									</ul>
								{/if}

							{/foreach}
						</td>
						<td class="cart_quantity" colspan="2">
							{if isset($cannotModify) AND $cannotModify == 1}
								<span style="float:left">{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}</span>
							{else}
								<div class="cart_quantity_button">
								<a rel="nofollow" class="cart_quantity_up" id="cart_quantity_up_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "add=1&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery}&id_customization={$id_customization}&token={$token_cart}")|escape:'html'}" title="{l s='Add'}"><img src="{$img_dir}icon/quantity_up.gif" alt="{l s='Add'}" width="14" height="9" /></a><br />
								{if $product.minimal_quantity < ($customization.quantity -$quantityDisplayed) OR $product.minimal_quantity <= 1}
								<a rel="nofollow" class="cart_quantity_down" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "add=1&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery}&id_customization={$id_customization}&op=down&token={$token_cart}")|escape:'html'}" title="{l s='Subtract'}">
									<img src="{$img_dir}icon/quantity_down.gif" alt="{l s='Subtract'}" width="14" height="9" />
								</a>
								{else}
								<a class="cart_quantity_down" style="opacity: 0.3;" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" href="#" title="{l s='Subtract'}">
									<img src="{$img_dir}icon/quantity_down.gif" alt="{l s='Subtract'}" width="14" height="9" />
								</a>
								{/if}
								</div>
								<input type="hidden" value="{$customization.quantity}" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}_hidden"/>
								<input size="2" type="text" value="{$customization.quantity}" class="cart_quantity_input" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}"/>
							{/if}
						</td>
						<td class="cart_delete">
							{if isset($cannotModify) AND $cannotModify == 1}
							{else}
								<div>
									<a rel="nofollow" class="cart_quantity_delete" id="{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "delete=1&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_customization={$id_customization}&id_address_delivery={$product.id_address_delivery}&token={$token_cart}")|escape:'html'}">{l s='Delete'}</a>
								</div>
							{/if}
						</td>
					</tr>
					{assign var='quantityDisplayed' value=$quantityDisplayed+$customization.quantity}
				{/foreach}
				{* If it exists also some uncustomized products *}
				{if $product.quantity-$quantityDisplayed > 0}{include file="$tpl_dir./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first}{/if}
			{/if}
		{/foreach}
		{assign var='last_was_odd' value=$product@iteration%2}
		{foreach $gift_products as $product}
			{assign var='productId' value=$product.id_product}
			{assign var='productAttributeId' value=$product.id_product_attribute}
			{assign var='quantityDisplayed' value=0}
			{assign var='odd' value=($product@iteration+$last_was_odd)%2}
			{assign var='ignoreProductLast' value=isset($customizedDatas.$productId.$productAttributeId)}
			{assign var='cannotModify' value=1}
			{* Display the gift product line *}
			{include file="$tpl_dir./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first}
		{/foreach}
		</tbody>
	{if sizeof($discounts)}
		<tbody>
		{foreach $discounts as $discount}
			<tr class="cart_discount {if $discount@last}last_item{elseif $discount@first}first_item{else}item{/if}" id="cart_discount_{$discount.id_discount}">
				<td class="cart_discount_name" colspan="3">{$discount.name}</td>
				<td class="cart_discount_price"><span class="price-discount">
					{if !$priceDisplay}{displayPrice price=$discount.value_real*-1}{else}{displayPrice price=$discount.value_tax_exc*-1}{/if}
				</span></td>
				<td class="cart_discount_delete">1</td>
				<td class="cart_discount_price">
					<span class="price-discount price">{if !$priceDisplay}{displayPrice price=$discount.value_real*-1}{else}{displayPrice price=$discount.value_tax_exc*-1}{/if}</span>
				</td>
				<td class="price_discount_del">
					{if strlen($discount.code)}<a href="{if $opc}{$link->getPageLink('order-opc', true)}{else}{$link->getPageLink('order', true)}{/if}?deleteDiscount={$discount.id_discount}" class="price_discount_delete" title="{l s='Delete'}">{l s='Delete'}</a>{/if}
				</td>
			</tr>
		{/foreach}
		</tbody>
	{/if}
	</table>
</div>
{if !$logged && $total_shipping_tax_exc != 0 }
<div class="avertissement_client" style="text-align:center;"><label>{l s='You must register and login to calculate shipping costs.'}</label></div>

{else}										

{if $total_shipping_tax_exc <= 0 && $cookie->id_lang == 5}


<div class="avertissement_client" style="text-align:center;color:red;"><label>Les frais de livraison de votre commande vous sont offerts !</label></div>

{else}

{if !$logged }
<div class="avertissement_client" style="text-align:center;"><label>{l s='You must register and login to calculate shipping costs.'}</label></div>

{/if}

{/if}


{/if}		

{if $show_option_allow_separate_package}
<p>
	<input type="checkbox" name="allow_seperated_package" id="allow_seperated_package" {if $cart->allow_seperated_package}checked="checked"{/if} autocomplete="off"/>
	<label for="allow_seperated_package">{l s='Send available products first'}</label>
</p>
{/if}
{if !$opc}
	{if Configuration::get('PS_ALLOW_MULTISHIPPING')}
		<p>
			<input type="checkbox" {if $multi_shipping}checked="checked"{/if} id="enable-multishipping" />
			<label for="enable-multishipping">{l s='I would like to specify a delivery address for each individual product.'}</label>
		</p>
	{/if}
{/if}

<div id="HOOK_SHOPPING_CART">{$HOOK_SHOPPING_CART}</div>

{* Define the style if it doesn't exist in the PrestaShop version*}
{* Will be deleted for 1.5 version and more *}
{if !isset($addresses_style)}
	{$addresses_style.company = 'address_company'}
	{$addresses_style.vat_number = 'address_company'}
	{$addresses_style.firstname = 'address_name'}
	{$addresses_style.lastname = 'address_name'}
	{$addresses_style.address1 = 'address_address1'}
	{$addresses_style.address2 = 'address_address2'}
	{$addresses_style.city = 'address_city'}
	{$addresses_style.country = 'address_country'}
	{$addresses_style.phone = 'address_phone'}
	{$addresses_style.phone_mobile = 'address_phone_mobile'}
	{$addresses_style.alias = 'address_title'}
{/if}

{if ((!empty($delivery_option) AND !isset($virtualCart)) OR $delivery->id OR $invoice->id) AND !$opc}
<div class="order_delivery clearfix">
	{if !isset($formattedAddresses) || (count($formattedAddresses.invoice) == 0 && count($formattedAddresses.delivery) == 0) || (count($formattedAddresses.invoice.formated) == 0 && count($formattedAddresses.delivery.formated) == 0)}
		{if $delivery->id}
		<ul id="delivery_address" class="address item">
			<li class="address_title">{l s='Delivery address'} <span class="address_alias">({$delivery->alias})</span></li>
			{if $delivery->company}<li class="address_company">{$delivery->company|escape:'htmlall':'UTF-8'}</li>{/if}
			<li class="address_name">{$delivery->firstname|escape:'htmlall':'UTF-8'} {$delivery->lastname|escape:'htmlall':'UTF-8'}</li>
			<li class="address_address1">{$delivery->address1|escape:'htmlall':'UTF-8'}</li>
			{if $delivery->address2}<li class="address_address2">{$delivery->address2|escape:'htmlall':'UTF-8'}</li>{/if}
			<li class="address_city">{$delivery->postcode|escape:'htmlall':'UTF-8'} {$delivery->city|escape:'htmlall':'UTF-8'}</li>
			<li class="address_country">{$delivery->country|escape:'htmlall':'UTF-8'} {if $delivery_state}({$delivery_state|escape:'htmlall':'UTF-8'}){/if}</li>
		</ul>
		{/if}
		{if $invoice->id}
		<ul id="invoice_address" class="address alternate_item">
			<li class="address_title">{l s='Invoice address'} <span class="address_alias">({$invoice->alias})</span></li>
			{if $invoice->company}<li class="address_company">{$invoice->company|escape:'htmlall':'UTF-8'}</li>{/if}
			<li class="address_name">{$invoice->firstname|escape:'htmlall':'UTF-8'} {$invoice->lastname|escape:'htmlall':'UTF-8'}</li>
			<li class="address_address1">{$invoice->address1|escape:'htmlall':'UTF-8'}</li>
			{if $invoice->address2}<li class="address_address2">{$invoice->address2|escape:'htmlall':'UTF-8'}</li>{/if}
			<li class="address_city">{$invoice->postcode|escape:'htmlall':'UTF-8'} {$invoice->city|escape:'htmlall':'UTF-8'}</li>
			<li class="address_country">{$invoice->country|escape:'htmlall':'UTF-8'} {if $invoice_state}({$invoice_state|escape:'htmlall':'UTF-8'}){/if}</li>
		</ul>
		{/if}
	{else}
		{foreach from=$formattedAddresses key=k item=address}
			<ul class="address {if $address@last}last_item{elseif $address@first}first_item{/if} {if $address@index % 2}alternate_item{else}item{/if}">
				<li class="address_title">{if $k eq 'invoice'}{l s='Invoice address'}{elseif $k eq 'delivery' && $delivery->id}{l s='Delivery address'}{/if}{if isset($address.object.alias)} <span class="address_alias">({$address.object.alias})</span>{/if}</li>
				{foreach $address.ordered as $pattern}
					{assign var=addressKey value=" "|explode:$pattern}
					<li>
					{foreach $addressKey as $key}
						<span class="{if isset($addresses_style[$key])}{$addresses_style[$key]}{/if}">
							{if isset($address.formated[$key])}
								{$address.formated[$key]|escape:'htmlall':'UTF-8'}
							{/if}
						</span>
					{/foreach}
					</li>
				{/foreach}
				</ul>
		{/foreach}
		<br class="clear"/>
	{/if}
</div>
{/if}
<p class="cart_navigation">
	{if !$opc}
		<a href="{if $back}{$link->getPageLink('order', true, NULL, 'step=1&back={$back}')}{else}{$link->getPageLink('order', true, NULL, 'step=1')}{/if}" class="exclusive standard-checkout" title="{l s='Next'}">{l s='Next'} »</a>
		{if Configuration::get('PS_ALLOW_MULTISHIPPING')}
			<a href="{if $back}{$link->getPageLink('order', true, NULL, 'step=1&back={$back}')}{else}{$link->getPageLink('order', true, NULL, 'step=1')}{/if}&multi-shipping=1" class="multishipping-button multishipping-checkout exclusive" title="{l s='Next'}">{l s='Next'} »</a>
		{/if}
	{/if}
	{if isset($lastProductAdded) AND $lastProductAdded}
	<a href="{$link->getProductLink($lastProductAdded.id_product, $lastProductAdded.link_rewrite, $lastProductAdded.category, null, null, $lastProductAdded.id_shop)|escape:'htmlall':'UTF-8'}" class="button_large" title="{l s='Continue shopping'}">« {l s='Continue shopping'}</a>
{else}
	<a href="{if (isset($smarty.server.HTTP_REFERER) && strstr($smarty.server.HTTP_REFERER, 'order.php')) || isset($smarty.server.HTTP_REFERER) && strstr($smarty.server.HTTP_REFERER, 'order-opc') || !isset($smarty.server.HTTP_REFERER)}{$link->getPageLink('index')}{else}{$smarty.server.HTTP_REFERER|escape:'htmlall':'UTF-8'|secureReferrer}{/if}" class="button_large" title="{l s='Continue shopping'}">« {l s='Continue shopping'}</a>
{/if}
</p>
	{if !empty($HOOK_SHOPPING_CART_EXTRA)}
		<div class="clear"></div>
		<div class="cart_navigation_extra">
			<div id="HOOK_SHOPPING_CART_EXTRA">{$HOOK_SHOPPING_CART_EXTRA}</div>
		</div>
	{/if}
{/if}

En bleu petite phrase pour indiquer au client que les frais de port sont calculés après connection voir mon site et petite phrase pour indiquer au client France que les frais de port sont offerts si ils le sont.

 

http://www.planetecoshop.com

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...