News:

Support the VirtueMart project and become a member

Main Menu

Updating cart price from within checkout

Started by jtwebb, February 21, 2012, 18:00:34 PM

Previous topic - Next topic

jtwebb

I need to be able to update the price of items in the cart (shipping specifically) from within the checkout page using ajax.. I'm not sure where to intercept the data to insert my own info in there though. What I'm trying to do is allow someone to  choose more than one location to ship to, then add the total of all shipping together and charge that during checkout.

After checkout I'll arrange the shipping through the Fedex webservice. I've tried changing the session variables (prices and unformattedPrices) but the get reset when the page refreshes.

I'm using Joomla 2.5 and Virtuemart 2.0. I don't completely understand plugins for Joomla (I've heard they're simpler than components or modules, both of which I've built, but I just can't find any good, recent documentation on them) or the new Virtuemart but I know that's what I should be looking at.

Thanks for the help!

DeepaVaith

I am having the same problem and have been struggling for the last two days.
Please can someone help with an idea?

DeepaVaith

I'm not sure if your problem still exists-but I thought I'd let you know how I solved it.
I called the cartupdate function in the cart.php with the new values and that sets
the cart into session-so the values are updated.
Hope this helps.


justAman

I need same thing, can you help me, how did you do that in cart.php file?

Thanks

DeepaVaith

Hi,
   I called the update function in cart.php through a javascript function.  I defined the javascript function
in the default.php of the cart view, and set the variables that I want updated.   Use JRequest
to get these variables in the update function in cart.php and set the cart into session again.
Hope this helps,
Deepa