138th st Posted November 27, 2009 Share Posted November 27, 2009 Right now we are using $total but we are tryng to show the price of just the products together in the cartblock and show the total price at the check out.We only have tax for a few locations, so we dont have to worry about that showing up.I couldn’t find a variable that would work in the block cart for this – maybe there is one? I also tried this: {math equation=‘x – y’ x=$total y=$shipping_cost} but that didn’t seem to work.could someone please point me in the right direction? Thanks Link to comment Share on other sites More sharing options...
Zenith Posted November 27, 2009 Share Posted November 27, 2009 Have a look in "modules/blockcart/blockcart.php"Could try this:Change 'total' => Tools::displayPrice($params['cart']->getOrderTotal(intval(Configuration::get('PS_PRICE_DISPLAY')) == 1 ? false : true), $currency), To 'total' => Tools::displayPrice($params['cart']->getOrderTotal(intval(Configuration::get('PS_PRICE_DISPLAY')) == 1 ? false : true, 4), $currency), Link to comment Share on other sites More sharing options...
138th st Posted November 27, 2009 Author Share Posted November 27, 2009 Thats awesome it works!Would you mind explaining what that number references? Link to comment Share on other sites More sharing options...
Zenith Posted November 27, 2009 Share Posted November 27, 2009 See "classes/Cart.php" for the getOrderTotal function. /** * This function returns the total cart amount * * type = 1 : only products * type = 2 : only discounts * type = 3 : both * type = 4 : both but without shipping * type = 5 : only shipping * type = 6 : only wrapping * type = 7 : only products without shipping * * @param boolean $withTaxes With or without taxes * @param integer $type Total type * @return float Order total */ Link to comment Share on other sites More sharing options...
diamond204 Posted April 20, 2010 Share Posted April 20, 2010 The code for version 1.3.x has changed a bit in the cart. If you need this function I have posted a mode here:http://www.prestashop.com/forums/viewthread/17189/#116724 Link to comment Share on other sites More sharing options...
GenZai Posted March 29, 2015 Share Posted March 29, 2015 (edited) Thanks, it helped me The values are as folows now $array_type = array( Cart::ONLY_PRODUCTS, Cart::ONLY_DISCOUNTS, Cart::BOTH, Cart::BOTH_WITHOUT_SHIPPING, Cart::ONLY_SHIPPING, Cart::ONLY_WRAPPING, Cart::ONLY_PRODUCTS_WITHOUT_SHIPPING, Cart::ONLY_PHYSICAL_PRODUCTS_WITHOUT_SHIPPING, And I changed the value as follow in the blockcart.tpl <span class="ajax_cart_total{if $cart_qties == 0} unvisible{/if}"> {if $cart_qties > 0} {if $priceDisplay == 1} {assign var='blockcart_cart_flag' value='Cart::BOTH'|constant} {convertPrice price=$cart->getOrderTotal(false, $blockcart_cart_flag)} {else} {assign var='blockcart_cart_flag' value='Cart::BOTH'|constant} {convertPrice price=$cart->getOrderTotal(true, $blockcart_cart_flag)} {/if} {/if} </span> Previously, I had the value "Cart::BOTH_WITHOUT_SHIPPING" Edited March 29, 2015 by GenZai (see edit history) Link to comment Share on other sites More sharing options...
den_iyok Posted January 4, 2016 Share Posted January 4, 2016 (edited) may that work for version 1.6? Edited January 4, 2016 by den_iyok (see edit history) 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