News:

Support the VirtueMart project and become a member

Main Menu

Attributes/Custom fields - populate database

Started by kg, March 29, 2012, 16:08:29 PM

Previous topic - Next topic

kg

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]

tullski

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

PRO

I just use my plugiin for this.

Then it can be done with csv improved



santinaki

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?

GJC Web Design

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...   

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation