VirtueMart Forum

VirtueMart 2 + 3 => Virtuemart Development and bug reports => Topic started by: bunglehaze on January 12, 2014, 15:02:37 pm

Title: Stockable plugin issue with 2.0.26d
Post by: bunglehaze on January 12, 2014, 15:02:37 pm
This is actually not a specific 26d based complaint as part of this has occured on all the recent updates. There are a few thoughts and findings as I have looked into it further and found little problems:

Essentially, whenever a parent product has child products that go out of stock the add to cart button remains on the page which looks like you can still order the product. I the option in VmConfig "Do not Display Product, if child products also out of stock" which for my mind would indicate that when child products are present it displays them but when there are no child products the parent should then be unpublished (which it is doing) but for those that direct link, the add to cart button needs to be hidden or changed to out of stock/notify me.

There is an error message I am seeing on certain sections of the site that was not visible yesterday before I did the update and I believe there is a bug within the stockable plugin perhaps - the error message is: "Warning: Invalid argument supplied for foreach() in /home/content/29/11297829/html/plumeblu/plugins/vmcustom/stockable/stockable.php on line 226" that would indicate the issue lies within the section calling child products (please tell me if I have mis-interpreted this though - I am just keen to figure what is wrong with parent and child relationships on my site)

If I set the parent stock to 0 all the child product options disappear and the above error message from the stockable plugin shows up, the parent is still showing the add to cart.
If I then put the parent back to stock the error remains and the child options do not re-appear. On further investigation it would appear that the parent product loses all of the custom field options for its child products.

In my case i went back into the parent product and each child option had reset which means that parent variant was unchecked, all the default values were displayed rather than each of the options previously chosen. I input these all again and it worked as normal, then I tried to replicate the custom fields reset issue and error by taking the parent out of stock and all child products stock to zero, on this occasion the options remained intact - I do not fully understand how these options had reset just on two specific products and not affected others though.

The product did indeed get unpublished from the site frontend (apart from using a direct link) but if you went to the page directly the add to cart function remained visible, therefore looking like it was still orderable - that is a persistent problem I think and I am hoping that the stockable error and reset of custom fields may be a localised problem, obviously it was worth me typing this out for future reference in case it happens again or to more VM users.

Any ideas on how to get the add to cart button to unpublish when child options are at zero stock to work alongside the product not being displayed?

Title: Re: Stockable plugin issue with 2.0.26d
Post by: OpenGlobal on January 14, 2014, 15:30:08 pm

Can you PM me some links to where you're seeing these problems. Could you also allow me access to the backend to investigate it.

OpenGlobal E-commerce
Title: Re: Stockable plugin issue with 2.0.26d
Post by: mhuebler on April 09, 2014, 13:47:57 pm
same problem here.

and the shop function to search products is not working if i use the configuration option.