aquakks Posted April 12, 2014 Share Posted April 12, 2014 (edited) Hi, I have a problem. I want that delivery price doesn't view in "Ajax Cart" (sliding basket). How to remove it? Just, I want delivery price view after going to basket. Thanks for your help Screenshot with my problem: Shop : http://tiny.pl/qnz3q Edited April 12, 2014 by aquakks (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted April 14, 2014 Share Posted April 14, 2014 WHat's your prestashop version? On 1.5 you can remove <span id="cart_block_shipping_cost" class="price ajax_cart_shipping_cost">{$shipping_cost}</span> <span>{l s='Shipping' mod='blockcart'}</span> from blockcart.tpl 1 Link to comment Share on other sites More sharing options...
aquakks Posted April 15, 2014 Author Share Posted April 15, 2014 It's working. Thank you for your answer but "ajax cart" still count delivery price to sum. How to remove it? Just, I want delivery price view after going to basket. Link to comment Share on other sites More sharing options...
NemoPS Posted April 16, 2014 Share Posted April 16, 2014 Ah, sorry I missed that part. Well if that's the issue, I fear you need modify the code quite heavily, it's a bit long to explain in a blog post. It involves modifying the cart controller so that it returns the total without shipping when called with ajax, and probably the cart class as well (getSummaryDetails) Link to comment Share on other sites More sharing options...
inweb Posted April 16, 2014 Share Posted April 16, 2014 Open-up modules/blockcart/ajax-cart.js file. Find: if (parseFloat(jsonData.shippingCostFloat) > 0 || jsonData.nbTotalProducts < 1) $('.ajax_cart_shipping_cost').text(jsonData.shippingCost); else if (typeof(freeShippingTranslation) != 'undefined') $('.ajax_cart_shipping_cost').html(freeShippingTranslation);and comment it out: /* if (parseFloat(jsonData.shippingCostFloat) > 0 || jsonData.nbTotalProducts < 1) $('.ajax_cart_shipping_cost').text(jsonData.shippingCost); else if (typeof(freeShippingTranslation) != 'undefined') $('.ajax_cart_shipping_cost').html(freeShippingTranslation); */ 1 Link to comment Share on other sites More sharing options...
NemoPS Posted April 17, 2014 Share Posted April 17, 2014 Yes, but the total will still contain the shipping amount there 1 Link to comment Share on other sites More sharing options...
inweb Posted April 17, 2014 Share Posted April 17, 2014 Open-up modules/blockcart/blockcart-json.tpl file: Find: "total": "{$total|html_entity_decode:2:'UTF-8'}",Replace with: "total": "{$product.total|html_entity_decode:2:'UTF-8'}", 1 Link to comment Share on other sites More sharing options...
NemoPS Posted April 18, 2014 Share Posted April 18, 2014 That would work, but if you have discounts it won't be accurate Link to comment Share on other sites More sharing options...
aquakks Posted April 21, 2014 Author Share Posted April 21, 2014 Thanks you for your help! It's working You are brilliant Link to comment Share on other sites More sharing options...
guil182 Posted August 14, 2015 Share Posted August 14, 2015 V1.6.1.0 in order to solve problem with discount, i try to change in : <span class="price cart_block_total ajax_block_cart_total">{$total}</span> with <span class="price cart_block_total ajax_block_cart_total">{$total-$shipping_cost}</span> but I lose data after the decimal point and the sign of the currency Do you know how to solve it ? Link to comment Share on other sites More sharing options...
inweb Posted August 14, 2015 Share Posted August 14, 2015 Try: <span class="price cart_block_total ajax_block_cart_total">{convertPrice price=$total-$shipping_cost}</span> Link to comment Share on other sites More sharing options...
guil182 Posted August 14, 2015 Share Posted August 14, 2015 not exactly : 1 - it does not take account of the ex decimal (ex : 15,58 - 10 = 5 and not 5,58 ) 2- if a change devise, total amount is 0 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