VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: rodfarrell on February 05, 2013, 01:04:49 AM

Title: What file actually posts data to the database?
Post by: rodfarrell on February 05, 2013, 01:04:49 AM
I have created a second text field alongside "notes and special requests" in the checkout page but for the life of me I can't find which file in virtuemart actually posts the chackout data to the database when the "check out now" button is clicked.  can anybody point me in the right direction please?
Title: Re: What file actually posts data to the database?
Post by: rodfarrell on February 07, 2013, 00:02:12 AM
Anyone?
Title: Re: What file actually posts data to the database?
Post by: K&K media production on February 07, 2013, 03:32:34 AM
This requires a core hack in table file. It is not recommended to do this, because if you update vm your changes will be lost.
Title: Re: What file actually posts data to the database?
Post by: rodfarrell on February 07, 2013, 05:09:57 AM
That doesn't answer the question. 

It is a contractual requirement for my client so if it means we have to add a custom table to avoid data being lost that is not a problem.  What I need to know is, where is the code that actually posts the data?.


Title: Re: What file actually posts data to the database?
Post by: Joseph Kwan on February 07, 2013, 07:08:15 AM
The actual database query is done in Joomla, not VM. You can probably add a field in the file orders.php within the directory administrator/components/com_virtuemart/tables. But then you still need to hack a few files to pass the field through to the orders.php.

Title: Re: What file actually posts data to the database?
Post by: rodfarrell on February 07, 2013, 11:31:19 AM
Thanks Joseph, I have added the fields in the cart view and included the field data in the data array in the helper file but its the next step, passing the specific array field to the database field that I'm stuck at.
Title: Re: What file actually posts data to the database?
Post by: Joseph Kwan on February 07, 2013, 17:55:41 PM
Did you add the field to the file I mentioned above?
Title: Re: What file actually posts data to the database?
Post by: rodfarrell on February 08, 2013, 00:17:13 AM
Thank you again Joseph, that was the missing link I'd been looking for.