Jump to content

Recommended Posts

Bonjour,

Je rencontre un problème qui commence à me rendre fou aidez moi ! j'ai dans le résumé de mon panier les frais de ports offerts. Or je veux que les frais de ports soient calculés. Mon transporteur est bien configuré, aucune livraison gratuite. 

J'ai fait une chose simple il y a quelques jours qui avait fonctionné j'ai réinitialisé le blockcart.tpl de mon thème via le serveur FTP ça avait alors marché. Mais le problème est revenu. J'ai recommencé la même manip et j'ai également rénitialité les blockcart.php / tpl et ajax.php basics de presta. Rien n y fait ! 

Quelqu'un aurait une idée ?? 

Je fonctionne avec la version 1.6.1.7 . 

Merci ! 

Share this post


Link to post
Share on other sites

1 - Prestashop ne peut pas vous calculer des frais de port si l'utilisateur n'est pas connecté (pas d'adresse)

2 - Dans ce cas, Prestashop affiche les frais de port suivant votre paramétrage en BO. Si celui-ci est sur "Le moins cher" et que celui-ci correspond au retrait en magasin, et bien il affiche 0 donc "offert"

Share this post


Link to post
Share on other sites

Merci pour votre réponse, 

Alors j'ai oublié de préciser,j'applique un montant unique pour les frais de port. Il devrait s'afficher dans le résumé du panier en première étape du tunnel de commande normalement :/ 

mon blockcart.tpl du theme donne ca : 

  1. {if isset($empty)}
  2. <p class="warning">{l s='Your shopping cart is empty.'}</p>
  3. {elseif $PS_CATALOG_MODE}
  4. <p class="warning">{l s='This store has not accepted your new order.'}</p>
  5. {else}
  6. <script type="text/javascript">
  7. // <![CDATA[
  8. var currencySign = '{$currencySign|html_entity_decode:2:"UTF-8"}';
  9. var currencyRate = '{$currencyRate|floatval}';
  10. var currencyFormat = '{$currencyFormat|intval}';
  11. var currencyBlank = '{$currencyBlank|intval}';
  12. var txtProduct = "{l s='product'}";
  13. var txtProducts = "{l s='products'}";
  14. var deliveryAddress = {$cart->id_address_delivery|intval};
  15. // ]]>
  16. </script>
  17. <p style="display:none" id="emptyCartWarning" class="warning">{l s='Your shopping cart is empty.'}</p>
  18. <div id="order-detail-content" class="table_block">
  19. <table id="cart_summary" class="std">
  20. <thead>
  21. <tr>
  22. <th class="cart_product first_item">{l s='Product'}</th>
  23. <th class="cart_description item">{l s='Description'}</th>
  24. <th class="cart_unit item">{l s='Unit price'}</th>
  25. <th class="cart_quantity item">{l s='Qty'}</th>
  26. <th class="cart_total item">{l s='Total price'}</th>
  27. </tr>
  28. </thead>
  29. <tbody>
  30. {foreach $products as $product}
  31. {assign var='productId' value=$product.id_product}
  32. {assign var='productAttributeId' value=$product.id_product_attribute}
  33. {assign var='quantityDisplayed' value=0}
  34. {assign var='odd' value=$product@iteration%2}
  35. {if isset($gift_products)}{assign var='ignoreProductLast' value=isset($customizedDatas.$productId.$productAttributeId) || count($gift_products)}{/if}
  36. {* Display the product line *}
  37. {include file="$tpl_dir./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first}
  38. {* Then the customized datas ones*}
  39. {if isset($customizedDatas.$productId.$productAttributeId)}
  40. {if isset($product.id_address_delivery)}{assign var=varCustomizedDatas value=$customizedDatas.$productId.$productAttributeId[$product.id_address_delivery]}{else}{assign var=varCustomizedDatas value=$customizedDatas.$productId.$productAttributeId}{/if}
  41. {foreach $varCustomizedDatas as $id_customization=>$customization}
  42. <tr id="product_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}{if isset($product.id_address_delivery)}_{$product.id_address_delivery|intval}{/if}" class="product_customization_for_{$product.id_product}_{$product.id_product_attribute}{if isset($product.id_address_delivery)}_{$product.id_address_delivery|intval}{/if} {if $odd}odd{else}even{/if} customization alternate_item {if $product@last && $customization@last && isset($gift_products) && !count($gift_products)}last_item{/if}">
  43. <td></td>
  44. <td>
  45. {foreach $customization.datas as $type => $custom_data}
  46. {if $type == $CUSTOMIZE_FILE}
  47. <div class="customizationUploaded">
  48. <ul class="customizationUploaded">
  49. {foreach $custom_data as $picture}
  50. <li><img src="{$pic_dir}{$picture.value}_small" alt="" class="customizationUploaded" /></li>
  51. {/foreach}
  52. </ul>
  53. </div>
  54. {elseif $type == $CUSTOMIZE_TEXTFIELD}
  55. <ul class="typedText">
  56. {foreach $custom_data as $textField}
  57. <li>
  58. {if $textField.name}
  59. {$textField.name}
  60. {else}
  61. {l s='Text #'}{$textField@index+1}
  62. {/if}
  63. : {$textField.value}
  64. </li>
  65. {/foreach}
  66. </ul>
  67. {/if}
  68. {/foreach}
  69. {if isset($cannotModify) AND $cannotModify == 1}
  70. {else}
  71. <p class="cart_delete">
  72. <a rel="nofollow" class="cart_quantity_delete" id="{$product.id_product}_{$product.id_product_attribute}_{$id_customization}{if isset($product.id_address_delivery)}_{$product.id_address_delivery|intval}{/if}" href="{$link->getPageLink('cart.php', true)}?delete&amp;id_product={$product.id_product|intval}&amp;ipa={$product.id_product_attribute|intval}&amp;id_customization={$id_customization}{if isset($product.id_address_delivery)}&amp;id_address_delivery={$product.id_address_delivery}{/if}&amp;token={$token_cart}" title="{l s='Delete this product'}">{l s='Delete this product'}</a>
  73. </p>
  74. {/if}
  75. </td>
  76. <td></td>
  77. <td class="cart_quantity">
  78. {if isset($cannotModify) AND $cannotModify == 1}
  79. <span>{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}</span>
  80. {else}
  81. <div id="cart_quantity_button" class="cart_quantity_button">
  82. <a rel="nofollow" class="cart_quantity_up" id="cart_quantity_up_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}{if isset($product.id_address_delivery)}_{$product.id_address_delivery|intval}{/if}" href="{$link->getPageLink('cart.php', true)}?add&amp;id_product={$product.id_product|intval}&amp;ipa={$product.id_product_attribute|intval}{if isset($product.id_address_delivery)}&amp;id_address_delivery={$product.id_address_delivery}{/if}&amp;id_customization={$id_customization}&amp;token={$token_cart}" title="{l s='Add'}"><i class="icon-plus-square"></i></a>
  83. {if $product.minimal_quantity < ($customization.quantity -$quantityDisplayed) OR $product.minimal_quantity <= 1}
  84. <a rel="nofollow" class="cart_quantity_down" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}{if isset($product.id_address_delivery)}_{$product.id_address_delivery|intval}{/if}" href="{$link->getPageLink('cart.php', true)}?add&amp;id_product={$product.id_product|intval}&amp;ipa={$product.id_product_attribute|intval}{if isset($product.id_address_delivery)}&amp;id_address_delivery={$product.id_address_delivery}{/if}&amp;id_customization={$id_customization}&amp;op=down&amp;token={$token_cart}" title="{l s='Subtract'}">
  85. <i class="icon-minus-square"></i>
  86. </a>
  87. {else}
  88. <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'}">
  89. <i class="icon-minus-square"></i>
  90. </a>
  91. {/if}
  92. </div>
  93. <input type="hidden" value="{$customization.quantity}" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_hidden"/>
  94. <input size="2" type="text" value="{$customization.quantity}" class="cart_quantity_input" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}{if isset($product.id_address_delivery)}_{$product.id_address_delivery|intval}{/if}"/>
  95. {/if}
  96. </td>
  97. <td></td>
  98. </tr>
  99. {assign var='quantityDisplayed' value=$quantityDisplayed+$customization.quantity}
  100. {/foreach}
  101. {* If it exists also some uncustomized products *}
  102. {if $product.quantity-$quantityDisplayed > 0}{include file="$tpl_dir./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first}{/if}
  103. {/if}
  104. {/foreach}
  105. {if isset($gift_products)}
  106. {assign var='last_was_odd' value=$product@iteration%2}
  107. {foreach $gift_products as $product}
  108. {assign var='productId' value=$product.id_product}
  109. {assign var='productAttributeId' value=$product.id_product_attribute}
  110. {assign var='quantityDisplayed' value=0}
  111. {assign var='odd' value=($product@iteration+$last_was_odd)%2}
  112. {assign var='ignoreProductLast' value=isset($customizedDatas.$productId.$productAttributeId)}
  113. {assign var='cannotModify' value=1}
  114. {* Display the gift product line *}
  115. {include file="$tpl_dir./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first}
  116. {/foreach}
  117. {/if}
  118. </tbody>
  119. {if sizeof($discounts)}
  120. <tbody>
  121. {foreach $discounts as $discount}
  122. <tr class="cart_discount {if $discount@last}last_item{elseif $discount@first}first_item{else}item{/if}" id="cart_discount_{$discount.id_discount}">
  123. <td></td>
  124. <td class="cart_discount_name">
  125. <p>{if isset($discount.code)}{$discount.code}{else}{$discount.name}{/if} - {$discount.description}</p>
  126. <p class="cart_discount_delete">
  127. <a href="{if $opc}{$link->getPageLink('order-opc.php', true)}{else}{$link->getPageLink('order.php', true)}{/if}?deleteDiscount={$discount.id_discount}" class="price_discount_delete" title="{l s='Delete this coupon code'}">{l s='Delete this coupon code'}</a>
  128. </span>
  129. </td>
  130. <td></td>
  131. <td></td>
  132. <td class="cart_discount_price">
  133. <span class="price-discount price">{if !$priceDisplay}{displayPrice price=$discount.value_real*-1}{else}{displayPrice price=$discount.value_tax_exc*-1}{/if}</span>
  134. </td>
  135. </tr>
  136. {/foreach}
  137. </tbody>
  138. {/if}
  139. </table>
  140. <table id="cart_summary_total" class="std">
  141. {if $use_taxes}
  142. {if $priceDisplay}
  143. <tr class="cart_total_price">
  144. <td>{if $display_tax_label}{l s='Total products (tax excl.) :'}{else}{l s='Total products :'}{/if}</td>
  145. <td id="total_product" class="price">{displayPrice price=$total_products}</td>
  146. </tr>
  147. {else}
  148. <tr class="cart_total_price">
  149. <td>{if $display_tax_label}{l s='Total products (tax incl.) :'}{else}{l s='Total products :'}{/if}</td>
  150. <td id="total_product" class="price">{displayPrice price=$total_products_wt}</td>
  151. </tr>
  152. {/if}
  153. {else}
  154. <tr class="cart_total_price">
  155. <td>{l s='Total products :'}</td>
  156. <td id="total_product" class="price">{displayPrice price=$total_products}</td>
  157. </tr>
  158. {/if}
  159. <tr class="cart_total_voucher" {if $total_discounts == 0}style="display:none"{/if}>
  160. <td>
  161. {if $use_taxes}
  162. {if $priceDisplay}
  163. {if $display_tax_label}{l s='Total coupon codes (tax excl.) :'}{else}{l s='Total coupon codes :'}{/if}
  164. {else}
  165. {if $display_tax_label}{l s='Total coupon codes (tax incl.) :'}{else}{l s='Total coupon codes :'}{/if}
  166. {/if}
  167. {else}
  168. {l s='Total coupon codes :'}
  169. {/if}
  170. </td>
  171. <td id="total_discount" class="price-discount price">
  172. {if $use_taxes && !$priceDisplay}
  173. {assign var='total_discounts_negative' value=$total_discounts}
  174. {else}
  175. {assign var='total_discounts_negative' value=$total_discounts_tax_exc}
  176. {/if}
  177. {if $total_discounts_negative < 0}
  178. {displayPrice price=$total_discounts_negative}
  179. {else}
  180. {displayPrice price=$total_discounts_negative * -1}
  181. {/if}
  182. </td>
  183. </tr>
  184. <tr class="cart_total_voucher" {if $total_wrapping == 0}style="display:none"{/if}>
  185. <td>
  186. {if $use_taxes}
  187. {if $priceDisplay}
  188. {if $display_tax_label}{l s='Total gift-wrapping (tax excl.) :'}{else}{l s='Total gift-wrapping :'}{/if}
  189. {else}
  190. {if $display_tax_label}{l s='Total gift-wrapping (tax incl.) :'}{else}{l s='Total gift-wrapping :'}{/if}
  191. {/if}
  192. {else}
  193. {l s='Total gift-wrapping :'}
  194. {/if}
  195. </td>
  196. <td id="total_wrapping" class="price-discount price">
  197. {if $use_taxes}
  198. {if $priceDisplay}
  199. {displayPrice price=$total_wrapping_tax_exc}
  200. {else}
  201. {displayPrice price=$total_wrapping}
  202. {/if}
  203. {else}
  204. {displayPrice price=$total_wrapping_tax_exc}
  205. {/if}
  206. </td>
  207. </tr>
  208. {if $total_shipping_tax_exc <= 0 && !isset($virtualCart)}
  209. <tr class="cart_total_delivery">
  210. <td>{l s='Total shipping :'}</td>
  211. <td id="total_shipping" class="price">{l s='Free Shipping !'}</td>
  212. </tr>
  213. {else}
  214. {if $use_taxes}
  215. {if $priceDisplay}
  216. <tr class="cart_total_delivery" {if $total_shipping_tax_exc <= 0}style="display:none"{/if}>
  217. <td>{if $display_tax_label}{l s='Total shipping (tax excl.) :'}{else}{l s='Total shipping :'}{/if}</td>
  218. <td id="total_shipping" class="price">{displayPrice price=$total_shipping_tax_exc}</td>
  219. </tr>
  220. {else}
  221. <tr class="cart_total_delivery" {if $total_shipping <= 0}style="display:none"{/if}>
  222. <td>{if $display_tax_label}{l s='Total shipping (tax incl.) :'}{else}{l s='Total shipping :'}{/if}</td>
  223. <td id="total_shipping" class="price">{displayPrice price=$total_shipping}</td>
  224. </tr>
  225. {/if}
  226. {else}
  227. <tr class="cart_total_delivery" {if $total_shipping_tax_exc <= 0}style="display:none"{/if}>
  228. <td>{l s='Total shipping :'}</td>
  229. <td id="total_shipping" class="price">{displayPrice price=$total_shipping_tax_exc}</td>
  230. </tr>
  231. {/if}
  232. {/if}
  233. {if $use_taxes}
  234. <tr class="cart_total_price">
  235. <td>{l s='Total (tax excl.) :'}</td>
  236. <td id="total_price_without_tax" class="price">{displayPrice price=$total_price_without_tax}</td>
  237. </tr>
  238. <tr class="cart_total_tax">
  239. <td>{l s='Total tax :'}</td>
  240. <td id="total_tax" class="price">{displayPrice price=$total_tax}</td>
  241. </tr>
  242. {/if}
  243. <tr class="cart_total_price">
  244. {if $use_taxes}
  245. <td id="total_price_label" class="total_price">{l s='Total (tax incl.) :'}</td>
  246. <td id="total_price_amount" class="total_price price">{displayPrice price=$total_price}</td>
  247. {else}
  248. <td id="total_price_label" class="total_price">{l s='Total :'}</td>
  249. <td id="total_price_amount" class="total_price price">{displayPrice price=$total_price_without_tax}</td>
  250. {/if}
  251. </tr>
  252. </table>
  253. {if $voucherAllowed}
  254. <table id="cart_summary_voucher" class="std">
  255. <tr>
  256. <td id="cart_voucher" class="cart_voucher">
  257. <p id="title_voucher" class="title_voucher">{l s='Use a coupon code :'}</p>
  258. {if isset($errors_discount) && $errors_discount}
  259. <ul class="error">
  260. {foreach $errors_discount as $k=>$error}
  261. <li>{$error|escape:'html':'UTF-8'}</li>
  262. {/foreach}
  263. </ul>
  264. {/if}
  265. <form action="{if $opc}{$link->getPageLink('order-opc.php', true)}{else}{$link->getPageLink('order.php', true)}{/if}" method="post" id="voucher">
  266. <fieldset>
  267. <p><label for="discount_name">{l s='Coupon code :'}</label></p>
  268. <p><input type="text" class="discount_name" id="discount_name" name="discount_name" value="{if isset($discount_name) && $discount_name}{$discount_name}{/if}" /></p>
  269. <p class="submit"><input type="hidden" name="submitDiscount" /><input type="submit" name="submitAddDiscount" value="{l s='OK'}" class="button" /></p>
  270. </fieldset>
  271. </form>
  272. {if $displayVouchers}
  273. <p id="title_offers" class="title_offers">{l s='Take advantage of our offers :'}</p>
  274. <div id="display_cart_vouchers">
  275. {foreach $displayVouchers as $voucher}
  276. {if isset($voucher.code)}
  277. {if $voucher.code != ''}<span onclick="$('#discount_name').val('{$voucher.code}');return false;" class="voucher_name">{$voucher.code}</span> - {/if}{$voucher.name}<br />
  278. {else}
  279. <span onclick="$('#discount_name').val('{$voucher.name}');return false;" class="voucher_name">{$voucher.name}</span> - {$voucher.description} <br />
  280. {/if}
  281. {/foreach}
  282. </div>
  283. {/if}
  284. </td>
  285. </tr>
  286. </table>
  287. {/if}
  288. <div class="clear"></div>
  289. </div>
  290.  
  291. {if isset($show_option_allow_separate_package) && $show_option_allow_separate_package}
  292. <p>
  293. <input type="checkbox" name="allow_seperated_package" id="allow_seperated_package" {if $cart->allow_seperated_package}checked="checked"{/if} />
  294. <label for="allow_seperated_package">{l s='Send the available products first.'}</label>
  295. </p>
  296. {/if}
  297. {if !$opc}
  298. {if Configuration::get('PS_ALLOW_MULTISHIPPING')}
  299. <p>
  300. <input type="checkbox" {if $multi_shipping}checked="checked"{/if} id="enable-multishipping" />
  301. <label for="enable-multishipping">{l s='I want to specify a delivery address for each individual product.'}</label>
  302. </p>
  303. {/if}
  304. {/if}
  305.  
  306. <div id="HOOK_SHOPPING_CART">{$HOOK_SHOPPING_CART}</div>
  307.  
  308. <p class="cart_navigation">
  309. {if !$opc}
  310. <a href="{if $back}{$link->getPageLink('order.php', true)}?step=1&amp;back={$back}{else}{$link->getPageLink('order.php', true)}?step=1{/if}" class="exclusive standard-checkout" title="{l s='Next'}">{l s='Next'} &raquo;</a>
  311. {if Configuration::get('PS_ALLOW_MULTISHIPPING')}
  312. <a href="{if $back}{$link->getPageLink('order', true, NULL, 'step=1&amp;back={$back}')}{else}{$link->getPageLink('order', true, NULL, 'step=1')}{/if}&amp;multi-shipping=1" class="multishipping-button multishipping-checkout exclusive" title="{l s='Next'}">{l s='Next'} &raquo;</a>
  313. {/if}
  314. {/if}
  315. <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.php') || !isset($smarty.server.HTTP_REFERER)}{$link->getPageLink('index.php', true)}{else}{$smarty.server.HTTP_REFERER|escape:'html':'UTF-8'|secureReferrer}{/if}" class="button_large" title="{l s='Continue shopping'}">&laquo; {l s='Continue shopping'}</a>
  316. </p>
  317. {if !empty($HOOK_SHOPPING_CART_EXTRA)}
  318. <div class="clear"></div>
  319. <div class="cart_navigation_extra">
  320. <div id="HOOK_SHOPPING_CART_EXTRA">{$HOOK_SHOPPING_CART_EXTRA}</div>
  321. </div>
  322. {/if}
  323. {/if}

Share this post


Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More