VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Development & Testing => Topic started by: Fariida on October 18, 2013, 18:56:57 PM

Title: File to edit for inserting custom Order History Field to database
Post by: Fariida on October 18, 2013, 18:56:57 PM
Hi,

I am trying to create a new field for the "virtuemart_order_histories" table in my database. I have already edited the Order view files which is fine to add the new text fields. I am just having trouble locating which file I need to edit to insert the new field values to the database. Such as what I've hacked to add tracking numbers to VM 1.1 here http://forum.virtuemart.net/index.php?topic=75373.msg296899#msg296899 (http://forum.virtuemart.net/index.php?topic=75373.msg296899#msg296899)

Thanks!
Title: Re: File to edit for inserting custom Order History Field to database
Post by: Fariida on October 18, 2013, 19:07:19 PM
Also to clarify I am trying to create a new field in my orders section in the backend. So when you update the order status or insert comments this is where I would like to add tracking numbers etc...
Title: Re: File to edit for inserting custom Order History Field to database
Post by: Milbo on October 23, 2013, 21:17:01 PM
Be aware that this fields maybe deleted, if someone updates vm.

I think you should think about to use a userfield plugin, which is just hidden for the users. Hmm does not work for multiple orders, or? the user data is stored plain, that means without reference. there should be a trigger.
Title: Re: File to edit for inserting custom Order History Field to database
Post by: Fariida on October 23, 2013, 22:22:28 PM
Thank you. Would you be able to point me to a plugin that can do this function?
Title: Re: File to edit for inserting custom Order History Field to database
Post by: Milbo on October 24, 2013, 11:02:55 AM
I just took a short look on your code for vm1.1.

I think what you want should be done either native in the core (u r invited), or via shipment plugin.
Title: Re: File to edit for inserting custom Order History Field to database
Post by: Fariida on October 24, 2013, 19:44:46 PM
Ok I see. I wanted to do something a little differently though. I wan to a new field for serial numbers and have successfully been able to save the values to the database but only when I have the notify user check box check it goes blank instead of redirecting. When I have time I'll post code.
Title: Re: File to edit for inserting custom Order History Field to database
Post by: Milbo on October 24, 2013, 21:10:14 PM
Hmm for serial numbers,... I would use a customfield plugin.
Title: Re: File to edit for inserting custom Order History Field to database
Post by: Fariida on October 24, 2013, 22:26:34 PM
ah Thanks! I figured as much and that it would take me less time trying to do it myself than searching, lol. Do you have any suggestion?
Title: Re: File to edit for inserting custom Order History Field to database
Post by: Fariida on October 24, 2013, 22:30:05 PM
One thing more. I am looking but it seems its only for customers to input information. How could I get this on the order view in the backend?
Title: Re: File to edit for inserting custom Order History Field to database
Post by: Fariida on October 25, 2013, 16:49:05 PM
Ok, I've found that there is something going on with my notify button in general. I've replaced all my administrator com_virtuemart files to the original ones and found the same problem of my page going blank and not redirecting. :-/ So this is entirely a separate issue.