Jump to content

showing total_products instead of total in cart block?


Recommended Posts

Thanks dude, but i think i didn't explain the problem so well!

Total Price that is shown in the cart block is the sum of shipping cost and the cost of products. i want it to only show the cost of products without adding the shipping cost to it. or maybe somehow subtract the the shipping cost from total price.

i know the important line that i have to change (in blockcart.tpl) is:

{$total}

and i probably have to change the class attribute! but i don't know to what?

Link to comment
Share on other sites

The following code should work: please tell me if it's ok.

this line is necessarty, then choose one the following based on what you need.
{assign var='blockuser_cart_flag' value='Cart::BOTH_WITHOUT_SHIPPING'|constant}

without tax
{convertPrice price=$cart->getOrderTotal(false, $blockuser_cart_flag)}

with tax
{convertPrice price=$cart->getOrderTotal(true, $blockuser_cart_flag)}

Link to comment
Share on other sites

I put the posted code in blockcart.tpl and the sum of products without shipping is displayed.

To add the sum of products with tax I had to add

{assign var=‘blockuser_cart_flag’ value=‘Cart::BOTH_WITHOUT_SHIPPING’|constant}
{convertPrice price=$cart->getOrderTotal(true, $blockuser_cart_flag)}

To make the same without taxex

{assign var=‘blockuser_cart_flag’ value=‘Cart::BOTH_WITHOUT_SHIPPING’|constant}
{convertPrice price=$cart->getOrderTotal(false, $blockuser_cart_flag)}

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...