VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Malko on October 07, 2016, 08:53:20 AM

Title: Adding a column to the database, write and read the data from it
Post by: Malko on October 07, 2016, 08:53:20 AM
Hi,
As the topic says, I'm having a problem of determining where I can alter a Database table - the best option would be a table for shipment, so I can add an additional column in there and write my additional datas into it at the page of Shipping method choosement (every user has his own data). After that I want to show the written data at the cart checkout.
Can anyone help me to:
- alter the table to add the additional column (where to find the files),
- provide the code to write to that column,
- provide the code to read from that column?

Thank you in advance for any help.

I'm using Joomla! 3.6 and  VirtueMart 3.0.17
Title: Re: Adding a column to the database, write and read the data from it
Post by: Ghost on October 07, 2016, 14:38:34 PM
Sounds like you need to create a shipment plugin. Use /plugins/vmshipment/weight_countries/ as example.
Title: Re: Adding a column to the database, write and read the data from it
Post by: GJC Web Design on October 07, 2016, 15:59:04 PM
Yes . I agree with Ghost .. you can store extra info in a ship plug or even use a cart shopper field that will store with the order
Title: Re: Adding a column to the database, write and read the data from it
Post by: Malko on October 10, 2016, 12:34:47 PM
Quote from: GJC Web Design on October 07, 2016, 15:59:04 PM
Yes . I agree with Ghost .. you can store extra info in a ship plug or even use a cart shopper field that will store with the order

could you show me en example how to do that programatically?