VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: Superdrac on June 07, 2012, 17:11:21 PM

Title: Edit virtuemart table
Post by: Superdrac on June 07, 2012, 17:11:21 PM
Hi, i want to know one thing.. It's possible to edit virtuemart table ?

I want to add a field 'code' in the table jos_virtuemart_categories_fr_fr but when it's done, and  when i go on the option, the table is automatically updated and my field is deleted.

How i can make for keep my field on ?


Thank you
Title: Re: Edit virtuemart table
Post by: Superdrac on June 08, 2012, 11:32:55 AM
I found a solution, and i want to share it... For add a fields in category table, you need to edit the file 'install.sql' who is here

'\administrator\components\com_virtuemart\install\' '

Search 'categories', when it's done, you can add a fields in the list. After this, you need to Reset all your tables, and the field will be created.

When you will edit virtuemart configuration, he will not be deleted.

Cordially
Title: Re: Edit virtuemart table
Post by: jenkinhill on June 08, 2012, 12:22:23 PM
This would be overwritten during each VirtueMart update, though, so you would need to backup the table each time.
Title: Re: Edit virtuemart table
Post by: Superdrac on June 08, 2012, 14:02:19 PM
Yes, i know, but you have another solution ?
Title: Re: Edit virtuemart table
Post by: jenkinhill on June 08, 2012, 15:14:07 PM
I was wondering if something could be added to virtuemart.cfg to prevent that table updating. eg see http://forum.virtuemart.net/index.php?topic=98328

Maybe Milbo will have an idea about this.
Title: Re: Edit virtuemart table
Post by: Superdrac on June 08, 2012, 16:01:46 PM
I had read, the topic that you link, but i don't really understand.... I opened the virtuemart.cfg file and i don't see any option for add a fields in a table.. What can i do ?

Cordially
Title: Re: Edit virtuemart table
Post by: jenkinhill on June 08, 2012, 16:45:35 PM
I don't know. That's why I think it best to ask Milbo how to prevent overwriting during updates, as you won't be the only user to be adding extra db fields.

Maybe ask here: http://forum.virtuemart.net/index.php?board=127.0
Title: Re: Edit virtuemart table
Post by: Superdrac on June 08, 2012, 17:00:17 PM
Ok, i will ask, thank for your help.


Cordially