Author Topic: Problems with parents total as sum of child products  (Read 2484 times)

jabba

  • Jr. Member
  • **
  • Posts: 51
    • Pixed - Web Store Assistance
Problems with parents total as sum of child products
« 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
Gianluca Gabella - CEO & Web Developer @ Pixed - www.pixed.it

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4522
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Problems with parents total as sum of child products
« Reply #1 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.

jabba

  • Jr. Member
  • **
  • Posts: 51
    • Pixed - Web Store Assistance
Re: Problems with parents total as sum of child products
« Reply #2 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!
Gianluca Gabella - CEO & Web Developer @ Pixed - www.pixed.it

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4522
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Problems with parents total as sum of child products
« Reply #3 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.
Quote
I 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.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10144
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Problems with parents total as sum of child products
« Reply #4 on: August 07, 2016, 16:32:47 pm »
vm3.0.16 was released due the mail problems.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jabba

  • Jr. Member
  • **
  • Posts: 51
    • Pixed - Web Store Assistance
Re: Problems with parents total as sum of child products
« Reply #5 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
Gianluca Gabella - CEO & Web Developer @ Pixed - www.pixed.it

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10144
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Problems with parents total as sum of child products
« Reply #6 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.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

ifs-net

  • Jr. Member
  • **
  • Posts: 76
Re: Problems with parents total as sum of child products
« Reply #7 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

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10144
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Problems with parents total as sum of child products
« Reply #8 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.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

ifs-net

  • Jr. Member
  • **
  • Posts: 76
Re: Problems with parents total as sum of child products
« Reply #9 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

jabba

  • Jr. Member
  • **
  • Posts: 51
    • Pixed - Web Store Assistance
Re: Problems with parents total as sum of child products
« Reply #10 on: August 10, 2016, 16:42:31 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
Gianluca Gabella - CEO & Web Developer @ Pixed - www.pixed.it