lucia15 Posted November 5, 2015 Share Posted November 5, 2015 (edited) Hey there! I've been reading docens of posts and I cannot find what I am looking for. I want my cart not to show the shipping costs. I tried to comment these lines on blockcart.tpl: <!-- <span class="price cart_block_shipping_cost ajax_cart_shipping_cost"> {if $shipping_cost_float == 0} {l s='Free shipping!' mod='blockcart'} {else} {$shipping_cost} {/if} </span> <span> {l s='Shipping' mod='blockcart'} </span> --> It works. However, the total price INCLUDES the shipping cost. I tried changing this line: <span class="price cart_block_total ajax_block_cart_total">{$total}</span> to <span class="price cart_block_total ajax_block_cart_total">{$product.total}</span> but then I get the total without taxes. What I want is showing: PRICE OF THE PRODUCT TAXES INCLUDED. I have already defined in Prestashop backend to show products with taxes included but it seems that "product.total" means "without taxes". Could you please help me?? I would like to do the same in the next step, in the shopping resume, but let's start from the beginning... THANK YOU! Edited January 13, 2016 by lucia15 (see edit history) Link to comment Share on other sites More sharing options...
MichałM Posted November 20, 2015 Share Posted November 20, 2015 The simplest way is to set a carrier with free shipping as default carrier and then comment lines as you mentioned. 1 Link to comment Share on other sites More sharing options...
musicmaster Posted November 21, 2015 Share Posted November 21, 2015 Did you consider subtracting the shippingcost? <span class="price cart_block_total ajax_block_cart_total">{$total - $shipping_cost}</span> Link to comment Share on other sites More sharing options...
lucia15 Posted November 23, 2015 Author Share Posted November 23, 2015 Hello musicmaster, I didn't try that but I will and I will let you know. However, my theme totally crashed after doing this change on blockcart.tlp. The store seemed to be working ok, but Apache was launching hundreds of errors per hour... Link to comment Share on other sites More sharing options...
musicmaster Posted November 23, 2015 Share Posted November 23, 2015 The store seemed to be working ok, but Apache was launching hundreds of errors per hour... Did you check the error log? Link to comment Share on other sites More sharing options...
jav974 Posted January 13, 2016 Share Posted January 13, 2016 Hi, this thread is a bit old but i managed to remove shipping cost in blockcart doing the following changes : In blockcart.php : Replace this : $totalToPay = $params['cart']->getOrderTotal($useTax); With this : $totalToPay = $params['cart']->getOrderTotal($useTax, Cart::BOTH_WITHOUT_SHIPPING); And this one : $totalToPayWithoutTaxes = $params['cart']->getOrderTotal(false); With this : $totalToPayWithoutTaxes = $params['cart']->getOrderTotal(false, Cart::BOTH_WITHOUT_SHIPPING); The last statement is right under the first one in the condition. And in blockcart.tpl, comment out this block: <div class="cart-prices-line first-line"> <span class="price cart_block_shipping_cost ajax_cart_shipping_cost{if !($page_name == 'order-opc') && $shipping_cost_float == 0 && (!isset($cart->id_address_delivery) || !$cart->id_address_delivery)} unvisible{/if}"> {if $shipping_cost_float == 0} {if !($page_name == 'order-opc') && (!isset($cart->id_address_delivery) || !$cart->id_address_delivery)}{l s='To be determined' mod='blockcart'}{else}{l s='Free shipping!' mod='blockcart'}{/if} {else} {$shipping_cost} {/if} </span> <span{if !($page_name == 'order-opc') && $shipping_cost_float == 0 && (!isset($cart->id_address_delivery) || !$cart->id_address_delivery)} class="unvisible"{/if}> {l s='Shipping' mod='blockcart'} </span> </div> That's all to get the shipping cost removed from display and taxes well calculated without shipping cost. PS : Only tested with PS 1.6.0.14 3 1 Link to comment Share on other sites More sharing options...
lucia15 Posted January 13, 2016 Author Share Posted January 13, 2016 Hi, this thread is a bit old but i managed to remove shipping cost in blockcart doing the following changes : In blockcart.php : Replace this : $totalToPay = $params['cart']->getOrderTotal($useTax); With this : $totalToPay = $params['cart']->getOrderTotal($useTax, Cart::BOTH_WITHOUT_SHIPPING); And this one : $totalToPayWithoutTaxes = $params['cart']->getOrderTotal(false); With this : $totalToPayWithoutTaxes = $params['cart']->getOrderTotal(false, Cart::BOTH_WITHOUT_SHIPPING); The last statement is right under the first one in the condition. And in blockcart.tpl, comment out this block: <div class="cart-prices-line first-line"> <span class="price cart_block_shipping_cost ajax_cart_shipping_cost{if !($page_name == 'order-opc') && $shipping_cost_float == 0 && (!isset($cart->id_address_delivery) || !$cart->id_address_delivery)} unvisible{/if}"> {if $shipping_cost_float == 0} {if !($page_name == 'order-opc') && (!isset($cart->id_address_delivery) || !$cart->id_address_delivery)}{l s='To be determined' mod='blockcart'}{else}{l s='Free shipping!' mod='blockcart'}{/if} {else} {$shipping_cost} {/if} </span> <span{if !($page_name == 'order-opc') && $shipping_cost_float == 0 && (!isset($cart->id_address_delivery) || !$cart->id_address_delivery)} class="unvisible"{/if}> {l s='Shipping' mod='blockcart'} </span> </div> That's all to get the shipping cost removed from display and taxes well calculated without shipping cost. PS : Only tested with PS 1.6.0.14 It worked perfectly!!!! THANK YOU!!! Link to comment Share on other sites More sharing options...
jetx Posted August 21, 2016 Share Posted August 21, 2016 (edited) This is a good method. Should be a std option in prestashop, shipping value showing in cart or shipping value to be determined. Found this blog to be worthwhile re the free shipping bs of prestacart. http://worldtecmotion.blogspot.com.au/2014/11/remove-shipping-cost-from-cart-module.html Edited September 11, 2016 by jetx (see edit history) Link to comment Share on other sites More sharing options...
emilkaja Posted February 24, 2017 Share Posted February 24, 2017 Hi, this thread is a bit old but i managed to remove shipping cost in blockcart doing the following changes : In blockcart.php : Replace this : $totalToPay = $params['cart']->getOrderTotal($useTax); With this : $totalToPay = $params['cart']->getOrderTotal($useTax, Cart::BOTH_WITHOUT_SHIPPING); And this one : $totalToPayWithoutTaxes = $params['cart']->getOrderTotal(false); With this : $totalToPayWithoutTaxes = $params['cart']->getOrderTotal(false, Cart::BOTH_WITHOUT_SHIPPING); The last statement is right under the first one in the condition. And in blockcart.tpl, comment out this block: <div class="cart-prices-line first-line"> <span class="price cart_block_shipping_cost ajax_cart_shipping_cost{if !($page_name == 'order-opc') && $shipping_cost_float == 0 && (!isset($cart->id_address_delivery) || !$cart->id_address_delivery)} unvisible{/if}"> {if $shipping_cost_float == 0} {if !($page_name == 'order-opc') && (!isset($cart->id_address_delivery) || !$cart->id_address_delivery)}{l s='To be determined' mod='blockcart'}{else}{l s='Free shipping!' mod='blockcart'}{/if} {else} {$shipping_cost} {/if} </span> <span{if !($page_name == 'order-opc') && $shipping_cost_float == 0 && (!isset($cart->id_address_delivery) || !$cart->id_address_delivery)} class="unvisible"{/if}> {l s='Shipping' mod='blockcart'} </span> </div> That's all to get the shipping cost removed from display and taxes well calculated without shipping cost. PS : Only tested with PS 1.6.0.14 Hi, I have a problem in which exact place should I comment in blockcart.tpl I add it in the end and didn't work for me. Link to comment Share on other sites More sharing options...
Blessy_Preferred Posted November 16, 2017 Share Posted November 16, 2017 On 1/13/2016 at 3:56 AM, jav974 said: Hi, this thread is a bit old but i managed to remove shipping cost in blockcart doing the following changes : In blockcart.php : Replace this : $totalToPay = $params['cart']->getOrderTotal($useTax); With this : $totalToPay = $params['cart']->getOrderTotal($useTax, Cart::BOTH_WITHOUT_SHIPPING); And this one : $totalToPayWithoutTaxes = $params['cart']->getOrderTotal(false); With this : $totalToPayWithoutTaxes = $params['cart']->getOrderTotal(false, Cart::BOTH_WITHOUT_SHIPPING); The last statement is right under the first one in the condition. And in blockcart.tpl, comment out this block: <div class="cart-prices-line first-line"> <span class="price cart_block_shipping_cost ajax_cart_shipping_cost{if !($page_name == 'order-opc') && $shipping_cost_float == 0 && (!isset($cart->id_address_delivery) || !$cart->id_address_delivery)} unvisible{/if}"> {if $shipping_cost_float == 0} {if !($page_name == 'order-opc') && (!isset($cart->id_address_delivery) || !$cart->id_address_delivery)}{l s='To be determined' mod='blockcart'}{else}{l s='Free shipping!' mod='blockcart'}{/if} {else} {$shipping_cost} {/if} </span> <span{if !($page_name == 'order-opc') && $shipping_cost_float == 0 && (!isset($cart->id_address_delivery) || !$cart->id_address_delivery)} class="unvisible"{/if}> {l s='Shipping' mod='blockcart'} </span> </div> That's all to get the shipping cost removed from display and taxes well calculated without shipping cost. PS : Only tested with PS 1.6.0.14 This worked for me! I'm using PS 1.6.1.11 Thank you! Link to comment Share on other sites More sharing options...
mono1 Posted September 26, 2020 Share Posted September 26, 2020 On 11/20/2015 at 3:31 PM, MichałM said: The simplest way is to set a carrier with free shipping as default carrier and then comment lines as you mentioned. Indeed. Simple, clean, perfect! Many thanks mate for opening my eyes! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now