Author Topic: get and show cart total  (Read 571 times)

BeNdErR

  • Beginner
  • *
  • Posts: 3
get and show cart total
« 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
Code: [Select]
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

  • Global Moderator
  • Super Hero
  • *
  • Posts: 9891
Re: get and show cart total
« Reply #1 on: February 10, 2013, 20:33:33 pm »
can you not modify the "shopping cart" module?

did you know vmart comes with 1?
"Banquet Tables Pro"
I do NOT do development work for hire.
My Custom Field Plugin Now with =Price
http://forum.virtuemart.net/index.php?topic=99678
My Shipping Plugin
http://forum.virtuemart.net/index.php?topic=100630.0

BeNdErR

  • Beginner
  • *
  • Posts: 3
Re: get and show cart total
« Reply #2 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

jenkinhill

  • Global Moderator
  • Super Hero
  • *
  • Posts: 20543
  • On vacation
    • Jenkin Hill Internet
Re: get and show cart total
« Reply #3 on: February 10, 2013, 23:44:09 pm »
VM - Shopping cart module......
Kelvyn
Jenkin Hill Internet,
Keswick, Lake District

Unsolicited PMs/emails will be ignored.

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

Currently using VM2.6.6 on Joomla 2.5.22 PHP 5.4.21
On Vacation until mid-August

vchierici

  • Beginner
  • *
  • Posts: 4
Re: get and show cart total
« Reply #4 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.

VirtueMart Forum

Re: get and show cart total
« Reply #4 on: February 11, 2013, 21:32:10 pm »