VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Coding Central => Topic started by: Genius WebDesign on December 17, 2014, 17:19:30 PM

Title: How to update specific VM cart session data "paymentCurrency" programmatically
Post by: Genius WebDesign on December 17, 2014, 17:19:30 PM
Hi,

I need to change the VM cart session data using PHP.
Specifically I need to change the  paymentCurrency data i the VM cart session.

Any guidelines how to do this?
Title: Re: How to update specific VM cart session data "paymentCurrency" programmatically
Post by: Genius WebDesign on December 17, 2014, 17:31:45 PM
I´m looking for a solution where I use JFactory to update the VM cart data in session, like this example:

$session =& JFactory::getSession();
$session->set( 'myvar', 'helloworld' );


So I basically need to use the above method to update "paymentCurrency" within the session.
Please advice.

I´m using VM 2.6
Title: Re: How to update specific VM cart session data "paymentCurrency" programmatically
Post by: chong on June 17, 2016, 10:24:03 AM
$cartSession = VirtueMartCart::getCart();
$cartSession->paymentCurrency = 0;

:)