VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: kg on March 29, 2012, 16:08:29 PM

Title: Attributes/Custom fields - populate database
Post by: kg on March 29, 2012, 16:08:29 PM
Hi all,
Since I could not find a way to add the same custom fields to hundreds of products, I created a quick and dirty PHP script to do it.
Worked fine for my needs, so I attached it to this post if someone else needs to do the same thing.

Use at your own risk and backup database before trying it out (there is a dry-run option, but always take backup regardless).

// kg

[attachment cleanup by admin]
Title: Re: Attributes/Custom fields - populate database
Post by: tullski on March 29, 2012, 17:50:59 PM
Hey kg!

just had exactly the same problem.
Really funny that this option is not available in the backend.

Tried it and it worked!!
Dont forget to set $dryrun to NO - if you want to see the changes  ;)

kg thx a million!

best
t
Title: Re: Attributes/Custom fields - populate database
Post by: PRO on March 29, 2012, 21:37:50 PM
I just use my plugiin for this.

Then it can be done with csv improved

Title: Re: Attributes/Custom fields - populate database
Post by: boog2dan on August 10, 2013, 23:03:24 PM
God bless you !

:)
Title: Re: Attributes/Custom fields - populate database
Post by: santinaki on March 02, 2015, 11:06:54 AM
hello everyone
in database in customfields there are no entries added
i did php sql query but i cant display custom fields in a product because they dont write them in database
any ideas?
Title: Re: Attributes/Custom fields - populate database
Post by: GJC Web Design on March 02, 2015, 12:42:51 PM
no versions given - must we ask every time?

http://forum.virtuemart.net/index.php?topic=79799.0

field names have changed in VM3 -- but as u give no versions...