Post by wzzly » Tue Oct 23, 2012 7:56 pm

Hi all,

I have enabled “Display Prices With Tax” in the admin. And so my header displays the total+tax of the shopping cart in the header. Thats great but I would like to show the total(without taxes) also in the header. That’s actually the Sub-total (I only have one country I sell to).

Have opencart 1.5.4.1

I tried but can’t get it to work. In header.tpl:

<?php echo strip_tags($cart_contents['total_sum']); ?>

So I would need something like: ['subtotal_sum']

Also I would like to place the text; “Incl. TAX” and “Excl. TAX” behind the 2 prices in the header then.

Hope you guys can help.

Newbie

Posts

Joined
Fri Oct 19, 2012 9:22 pm

Post by ian007 » Thu Oct 25, 2012 6:17 am

I really like this addition to the mini cart. BUT, it doesnt get auto-updated when you add items to the cart, like the main item/s and price inc does? I've tried adding items to cart from all the modules, but same issue - this ex vat addition to the cart only updates when you open up the mini cart.

I'm guessing it's some jscript that does the update. I dont know how or where it actions with /cart.tpl so that this ex vat subtotal auto-updates alongside the item/s inc vat subtotal?

Any clues? THANKS!

Newbie

Posts

Joined
Thu Oct 18, 2012 1:59 am

Post by wzzly » Thu Oct 25, 2012 7:03 pm

Tried it but it's not working because the price in the header is defined in header.tpl on my theme...
Tried to put the:

Code: Select all

<?php echo strip_tags($cart_contents['total_sum']);?>
there, but then I got this error:

: Undefined variable: sub_total_ex_tax in header.tpl

Any ideas?

Newbie

Posts

Joined
Fri Oct 19, 2012 9:22 pm

Post by ian007 » Sat Oct 27, 2012 1:45 am

Thank you for update enigma1. I have since changed my 'cart' in a way that I no longer need to present the ex-vat price. I hope this is useful for others though. THANKS!

Newbie

Posts

Joined
Thu Oct 18, 2012 1:59 am

Post by wzzly » Sat Oct 27, 2012 7:42 pm

any idea how to change the code if the total price is defined in header.tpl on my theme?

Newbie

Posts

Joined
Fri Oct 19, 2012 9:22 pm
Who is online

Users browsing this forum: No registered users and 80 guests