News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Bug when storing aditional cart info on payment selection

Started by f.janssen, November 30, 2011, 22:10:00 PM

Previous topic - Next topic

f.janssen

Hi Guys,

I'm developing the Dutch iDeal payment plugin.
I ran into an error though.

I want to store extra parameters when selecting my payment method.
I've overwritten the function : plgVmOnSelectPayment for this.
The parameter gets shown and validation of the parameter and storage of the parameter is done in my overloaded plgVmOnPaymentSelectCheck
So far so good.
However after saving my choice of the payment method (on the screen) the cart (with the new parameter) gets stored in the session like 10 times in the core of virtuemart.

The last time it stores this data is done in the cart view

#0 VirtueMartCart->setCartIntoSession() called at [[..SNIP..]httpdocs/components/com_virtuemart/views/cart/view.html.php:142]
However it uses the cart for this which is loaded at line 50 of this same file.
This is the initial cart, so the extra parameters get deleted  :-[

I got it working by commenting out line 142.

I would want to know if this is indeed a bug or line 142 does have a function which I;m not aware of (the cart is stored really a dozen of times in  helpers/cart.php

Hopefully this question can be answered.

Kind regards,
Fred
Kind Regards,
Fred