Author Topic: Change multi variant to generic child variant?  (Read 1479 times)

websmith

  • Jr. Member
  • **
  • Posts: 122
  • A beginner
Change multi variant to generic child variant?
« on: January 03, 2017, 16:16:50 pm »
Joomla 3.6.4 VM 3.0.18.5

I was wondering if there is a way to change products with multi variants to generic child variants on the fly? Or would I have to do this one by one for each product?

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4336
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Change multi variant to generic child variant?
« Reply #1 on: January 04, 2017, 12:06:01 pm »
Hi,
Im not sure at 100%, but it should be possible using Vm be Pro http://shop.st42.fr/en/products/vm-be-pro-batch-product-edit.htm.
You have a feature to remove selected customfield from all selected product and you can add the generic child variant.
The only problem you can have, is that you cannot set the parameters per product when adding the generic child variant.

K&K media production

  • VirtueMart Developer Team
  • Global Moderator
  • Full Member
  • *
  • Posts: 838
  • VirtueMart Version: VM3 on J3
Re: Change multi variant to generic child variant?
« Reply #2 on: January 05, 2017, 01:21:02 am »
it should be possible with phpmyadmin and a sql update query

something like

Code: [Select]
UPDATE `YOURPREFIX_virtuemart_product_customfields` SET `virtuemart_custom_id`="GENERIC CHILD VARIANT CUSTOM ID",`customfield_value`="NEW VALUE",`customfield_params`="NEW PARAMS" WHERE `virtuemart_custom_id` = "MULTI VARIANT CUSTOM ID";

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4336
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Change multi variant to generic child variant?
« Reply #3 on: January 05, 2017, 01:42:06 am »
Of course you can do it with mysql queries, as many changes in the DB.