News:

Support the VirtueMart project and become a member

Main Menu

Stockable plugin issue with 2.0.26d

Started by bunglehaze, January 12, 2014, 15:02:37 PM

Previous topic - Next topic

bunglehaze

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?

regards

OpenGlobal

Hi,

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

mhuebler

same problem here.

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