News:

Support the VirtueMart project and become a member

Main Menu

Bulk Copying of Product Custom Fields to All Products

Started by jwdltd, December 18, 2014, 12:48:02 PM

Previous topic - Next topic

jwdltd

Has anyone got a way of being able to bulk copy the custom fields.

I have over 500 products and need to add 10 of the same custom fields to each product.

Rather than have to add each one separately, I wondered if there is a way to bulk copy the fields.


Milbo

The best way is to create a pattern product. It is just a normal but unpublished product.

then add the customfield to this parent and the derive all your child products from the parent. In VM3, you can then easily override single customfields to adjust the child product. In vm2, you have to override all of them, if you want to change one (yeah, not very handy, the big reason for VM3!).

In your case, create a new empty product, use a sql which set the parent_id of all products to the new product and thats it. The advantage is now also, that you can change just the parent customfield and the children have the new value (if not overriden of course).
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

biltong

Is there a way of using Product Patterns for Child products to inherit Multi Variant custom fields (which inherintly require child products to work) e.g.:

I've setup an MV for Colours and assigned this to a product then created child products for each colour variant so that when you click on a colour, the product image changes.

Now, let's say there are 100 products that have this set of colours and I want to remove one of the colours in this set from all 100 products.....

I could update all 100 products :o

This sounds like Product Patterns would help by setting up a parent, assign the custom field to it then change the parent's custom field value to update all child products.....

Not so fast ::)

If the custom field is a multivariant that requires child products to define the variant values then what ???

Maybe it's too late in the day - feeling brain dead - but I can't see this working.

I would appreciate any help with this.

brandiware

I have tried the approach with setting the parent_id in myphpadmin. It seems to work but when I select options in multivariant fields the product detail does not update. What am I missing ?