Author Topic: Adding a column to the database, write and read the data from it  (Read 883 times)

Malko

  • Beginner
  • *
  • Posts: 3
  • A beginner
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

Ghost

  • Jr. Member
  • **
  • Posts: 422
Re: Adding a column to the database, write and read the data from it
« Reply #1 on: October 07, 2016, 14:38:34 pm »
Sounds like you need to create a shipment plugin. Use /plugins/vmshipment/weight_countries/ as example.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9749
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Adding a column to the database, write and read the data from it
« Reply #2 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
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Malko

  • Beginner
  • *
  • Posts: 3
  • A beginner
Re: Adding a column to the database, write and read the data from it
« Reply #3 on: October 10, 2016, 12:34:47 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?