VirtueMart Forum

VirtueMart 2 + 3 => Product creation => Topic started by: pellegrinoL on September 22, 2019, 16:38:43 pm

Title: Change Order or No Order Parent product option via mysql
Post by: pellegrinoL on September 22, 2019, 16:38:43 pm
Hi to all,

i would change the option Order Parent in the in the products with the child products.

I would disable this option easy in a lot of products, and for this reason I was thiking if it is possible via mysql or in another way.

Best
Title: Re: Change Order or No Order Parent product option via mysql
Post by: Jörgen on September 22, 2019, 21:09:12 pm
Do You mean that You do not want the product to have a parent any more ? Then You program the parent id to 0 for the child, that´s it. Can of course be done with sql.

Jörgen @ Kreativ Fotografi
Title: Re: Change Order or No Order Parent product option via mysql
Post by: Studio 42 on September 22, 2019, 21:35:51 pm
I think, he want set perant orderable to "no", is this what you mean ?
Title: Re: Change Order or No Order Parent product option via mysql
Post by: Jörgen on September 22, 2019, 23:42:53 pm
Patrick
You are right, I was a bit to fast.

Jörgen @ Kreativ Fotografi
Title: Re: Change Order or No Order Parent product option via mysql
Post by: pellegrinoL on September 23, 2019, 16:06:09 pm
I think, he want set perant orderable to "no", is this what you mean ?

Yes, I would change this field for a lot of products in few time.

I have not understood in the mysql tables which is the parameter to change.

Thanks
Title: Re: Change Order or No Order Parent product option via mysql
Post by: Studio 42 on September 23, 2019, 21:31:57 pm
orderable is in the customfield params i mean.
You can certainly search / replace using phpmyadmin
Title: Re: Change Order or No Order Parent product option via mysql
Post by: pellegrinoL on September 25, 2019, 10:27:06 am
Hi thanks for the suggestion.

in the table _virtuemart_product_customfields i found customfield_params and the variable that I was finding withParent="0"|parentOrderable="0"|. Now I have only to change it in withParent="0"|parentOrderable="1"| is it right?

Many thanks for the help
Title: Re: Change Order or No Order Parent product option via mysql
Post by: Studio 42 on September 25, 2019, 11:42:40 am
Code: [Select]
UPDATE  `XXX_virtuemart_product_customfields` SET  `customfield_params` = REPLACE(`customfield_params`, 'parentOrderable="1"', 'parentOrderable="0"') WHERE  `customfield_params` LIKE '%parentOrderable="0"%';I dont tried, but should be right.
Do a copy of the table, if something is wrong.
Replace XXX with your Joomla prefix
Title: Re: Change Order or No Order Parent product option via mysql
Post by: pellegrinoL on September 25, 2019, 14:11:38 pm
Thanks I will try.