VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: jabba on August 03, 2016, 14:55:30 PM

Title: Problems with parents total as sum of child products
Post by: jabba on August 03, 2016, 14:55:30 PM
Hello! I have this situation:
I have created some products with child products (size). Every child product has his own stock level. Parent products are NOT ordearable. I want the link "notify me" if all the children are out of stock but now the link appears only if I set the parent to 0, it completly ignores the child products.
Are there some specific options to set? Or do i need an external plugin?
Thank you!

I have joomla 3.6.0 and Virtuemart 3.0.16
Title: Re: Problems with parents total as sum of child products
Post by: Studio 42 on August 04, 2016, 11:07:42 AM
Hi jabba,
see in Virtuemart > config > shopfront > Action when a Product is Out of Stock and select "Do not Display Product, if child products also out of stock" and check if this is what you need.
Title: Re: Problems with parents total as sum of child products
Post by: jabba on August 06, 2016, 14:05:40 PM
Hello and thank you for your answer. Unfortunately this is not i need. This option hide the product if child products are out of stock. I need that if all child products are out of stock the parents shows the "notify me" link.
Thank you!
Title: Re: Problems with parents total as sum of child products
Post by: Studio 42 on August 06, 2016, 16:38:14 PM
Have you tested all "Action when a Product is Out of Stock" options ?
notify me should work, but perhaps it's your template overides ? Try with default Joomla 3 protostar template, so you are sure if it's a VM bug or the template and report here the result.
QuoteI have joomla 3.6.0 and Virtuemart 3.0.16
Vm 3.0.16 is not Joomla 3.6.0 compliant(mail problems) because some Joomla core changes, so get the new beta 3.0.17.4 release from here http://dev.virtuemart.net/projects/virtuemart/files. Perhaps your problems is solved too in this release.
Title: Re: Problems with parents total as sum of child products
Post by: Milbo on August 07, 2016, 16:32:47 PM
vm3.0.16 was released due the mail problems.
Title: Re: Problems with parents total as sum of child products
Post by: jabba on August 07, 2016, 22:17:20 PM
Thank you again for your answers.
Tested with default template and no plugins and still not works. Tested all the options and they are working good (also the one that unpublish if no childern products are available). The error seems that the "notify me" link ignore the child products and looks only at the parent one.
I know about the mail problem but as Milbo posted with this release i have no more mail issues.
Thank you again
Title: Re: Problems with parents total as sum of child products
Post by: Milbo on August 08, 2016, 11:46:59 AM
hmm, you are right. The generic variant is loading any produt and so the parent stock is increased by the stock of the children. But the MV does not load the products to display the variant ( ah lot faster of course) and so the product stock is not increased by the child stocks. and I tried to change it, but it is not trivial, not without an extra sql.
Title: Re: Problems with parents total as sum of child products
Post by: ifs-net on August 08, 2016, 21:27:58 PM
Hello,

Thanks a lot to forum

I have exactly same problem. I setteled the parent item as "S size", childeren "M size" & "L size".
When the parent is out of stock, at the category view it is seen out of stock but what I need is to have "out of stock" if only all products (parent&childeren) are out of stock.

Thanks a lot Milbo for your effort
I appreciate
Title: Re: Problems with parents total as sum of child products
Post by: Milbo on August 09, 2016, 22:36:57 PM
Meanwhile you can just set a 1 to the stock of the parent, which is anyway not orderable. So the parent is at least always there, which makes also sense, when you assume that you should have anyway at least one variant in the stock, or you need anyway to know which variant.
Title: Re: Problems with parents total as sum of child products
Post by: ifs-net on August 09, 2016, 22:50:42 PM
when do you think that you can fix that pls?
this is one of the biggest problems of my site
Title: Re: Problems with parents total as sum of child products
Post by: jabba on August 10, 2016, 16:42:31 PM
Quote from: Milbo on August 09, 2016, 22:36:57 PM
Meanwhile you can just set a 1 to the stock of the parent, which is anyway not orderable. So the parent is at least always there, which makes also sense, when you assume that you should have anyway at least one variant in the stock, or you need anyway to know which variant.

Thank you Milbo for your answers.
Yes this is a way to do it... but when i run out of stock of all the children products i still have the parent enabled (and i want it this way) but no "notify me" because there is one in stock and available, even if it's fake.
Do you think this isse will be correct in the near future?
Thank you again for your help!
Gianluca