VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: Bruce Morgan on April 12, 2012, 00:05:38 AM

Title: How to delete child product?
Post by: Bruce Morgan on April 12, 2012, 00:05:38 AM
I was playing with the "add a child product" on the product information tab of one of my prducts and it added an entry below but there does not seem to be a way to get rid of it.  I am running a test site locally with VM 2.0.4 over J2.5.4.  I even tried clicking "cncel" instead of "save" and child remained.  Is this a bug?
Title: Re: How to delete child product?
Post by: Bruce Morgan on April 24, 2012, 21:55:34 PM
Bump!  Could use some help here.  Anyone else have the sam problem?
Title: Re: How to delete child product?
Post by: vigier on April 28, 2012, 18:29:10 PM
You can find the childproduct in the overview of products. Delete it...
Title: Re: How to delete child product?
Post by: Bruce Morgan on April 29, 2012, 18:28:42 PM
Thanks.  I was trying to dot it a different way and it was driving me nuts!
Title: Re: How to delete child product?
Post by: memel on May 27, 2012, 22:20:57 PM
Have same problem. Any solutions?
Title: Re: How to delete child product?
Post by: Bruce Morgan on May 28, 2012, 20:38:13 PM
The created child cannot be deleted when editing the parent product.  To delete unwanted children you must go the top level (master) product list within VM and delete it from that list.  I would not call this a bug but it is not user friendly.  If you create a child from within a parent prpoduct, it would seem reasonable that you could also delete it in the same manner, but you cannot.
Title: Re: How to delete child product?
Post by: jstratos on September 27, 2012, 05:33:08 AM
Thanks for the solution here Bruce.  I was trying to work within a product category and did not realize you had to "view all categories" to see the unwanted child products. Saw them and then I was able to delete all.

Not too user friendly!
Title: Re: How to delete child product?
Post by: ekerner on January 08, 2015, 20:43:20 PM
You can find child products like (where tp_ is your table prefix) ...
select * from tp_virtuemart_products where product_parent_id > 0;
You can remove the child association like (where tp_ is your table prefix and 999999 is your virtuemart_product_id found in the previous select) ...
update tp_virtuemart_products set product_parent_id = 0 where virtuemart_product_id = 999999;