Author Topic: Change Order or No Order Parent product option via mysql  (Read 696 times)

pellegrinoL

  • Beginner
  • *
  • Posts: 39
Change Order or No Order Parent product option via mysql
« 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

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2473
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Change Order or No Order Parent product option via mysql
« Reply #1 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
Joomla 3.9.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4072
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Change Order or No Order Parent product option via mysql
« Reply #2 on: September 22, 2019, 21:35:51 pm »
I think, he want set perant orderable to "no", is this what you mean ?

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2473
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Change Order or No Order Parent product option via mysql
« Reply #3 on: September 22, 2019, 23:42:53 pm »
Patrick
You are right, I was a bit to fast.

Jörgen @ Kreativ Fotografi
Joomla 3.9.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

pellegrinoL

  • Beginner
  • *
  • Posts: 39
Re: Change Order or No Order Parent product option via mysql
« Reply #4 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

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4072
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Change Order or No Order Parent product option via mysql
« Reply #5 on: September 23, 2019, 21:31:57 pm »
orderable is in the customfield params i mean.
You can certainly search / replace using phpmyadmin

pellegrinoL

  • Beginner
  • *
  • Posts: 39
Re: Change Order or No Order Parent product option via mysql
« Reply #6 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

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4072
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Change Order or No Order Parent product option via mysql
« Reply #7 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

pellegrinoL

  • Beginner
  • *
  • Posts: 39
Re: Change Order or No Order Parent product option via mysql
« Reply #8 on: September 25, 2019, 14:11:38 pm »
Thanks I will try.