News:

Looking for documentation? Take a look on our wiki

Main Menu

get and show cart total

Started by BeNdErR, February 10, 2013, 17:02:00 PM

Previous topic - Next topic

BeNdErR

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 ;)


PRO

can you not modify the "shopping cart" module?

did you know vmart comes with 1?

BeNdErR

Hi PRO,

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

thanks in advance, best regards

jenkinhill

VM - Shopping cart module......
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

vchierici

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.