News:

Looking for documentation? Take a look on our wiki

Main Menu

Store additional payment info in the cart?

Started by maxxer, June 24, 2013, 10:12:51 AM

Previous topic - Next topic

maxxer

Hi.
I'm trying to develop a custom shipment plugin. I need to store a checkbox value into the shipment options. In my table definition I created this element, and it gets created correctly. The problem is: how do I handle this information in cart?

According to administrator/components/com_virtuemart/plugins/vmpsplugin.php:onSelectCheck the method, and its relative plgVmOnSelectCheckShipment for shipment plugins, can be used to (quoting dev comments) 
QuoteThis event is fired after the shipment method has been selected. It can be used to store additional payment info in the cart
(weight_countries.php and vmpsplugin.php).

Now that I'm reading the code I'm having troubles in understanding WHERE this additional information can be stored. The VirtueMartCart model doesn't seem to have room for adding this information.

Did I miss something?
thanks

K&K media production

you must store it in extra shipment plugin table like #__virtuemart_shipment_plg_weight_countries

maxxer

I know that, thanks, but during the purchase you have no way to store this information.

When the user chooses the shipping  the plgVmOnSelectCheckShipment method is called. In that method you only have the VirtueMartCart object, which AFAIK doesn't have room to store additional information. How do I bring my additional information from the shipment selection page to the order store, where that table is written?

thanks

K&K media production

Take a look to the other plugins. Maybe payment plg authorizenet...there are input fields

and take a look here
http://dev.virtuemart.net/projects/virtuemart/wiki/Shipper_Plugins

alatak

Hello
QuoteI'm trying to develop a custom shipment plugin. I need to store a checkbox value into the shipment options. In my table definition I created this element, and it gets created correctly. The problem is: how do I handle this information in cart?

You can save the infos in the session for example.

maxxer

Quote from: kkmediaproduction on June 26, 2013, 21:21:05 PM
Take a look to the other plugins. Maybe payment plg authorizenet...there are input fields

and take a look here
http://dev.virtuemart.net/projects/virtuemart/wiki/Shipper_Plugins
thanks for the suggestion, I will check out. In the meantime I already implemented using session, but I didn't like the solution.