VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: BeNdErR on February 10, 2013, 17:02:00 PM

Title: get and show cart total
Post by: BeNdErR on February 10, 2013, 17:02:00 PM
Hello everyone,

I'm trying to display in the index page, in a custom div, the cart total reached by the user browsing the shop. I had a look through com_virtuemart/... files, but I didn't find/understood WHERE and HOW the total is calculated, as for example in the virtuemart cart page (where you can find your cart summary).

For earlier version of VM, I found was enough to use someting like echo $GLOBAL['cart_total'] (or similar, I don't remember the exact code), but for the version I'm currently using it's not working..

I'm using joomla 2.5.8 and virtuemart 2.0.18a

I'd like to build a function that retrieves only the total: inside components\com_virtuemart\helpers.cart.php I found the class VirtuMartCart that holds the getCart function, but I don't see any reference to the total price.. Maybe I'm looking in the wrong place?

Thanks in advance for any help, best regards ;)

Title: Re: get and show cart total
Post by: PRO on February 10, 2013, 20:33:33 PM
can you not modify the "shopping cart" module?

did you know vmart comes with 1?
Title: Re: get and show cart total
Post by: BeNdErR on February 10, 2013, 23:19:24 PM
Hi PRO,

I haven't understand what you mean with "did you know vmart comes with 1?"..

thanks in advance, best regards
Title: Re: get and show cart total
Post by: jenkinhill on February 10, 2013, 23:44:09 PM
VM - Shopping cart module......
Title: Re: get and show cart total
Post by: vchierici on February 11, 2013, 21:32:10 PM
That doesn't help in any way....

Get the query for the total cart amount will be very helpful.

Any helps will be appreciated.

V.