Couple of issues I found... One is that the module doesn't seem to be aware of product variations, in that it doesn't properly look up the model when it decides in uc_stock_add_to_cart whether or not it's OK to add a product to the cart based on the stock level. Thus, if the main product SKU is set to be in stock but the selected variant is out of stock, it will add it to the cart anyway.

Secondly, it doesn't check the "active" column in uc_product_stock to see whether or not stock tracking is actually active for a given SKU. So if tracking is inactive and the stock is at 0, it will respond that the product is out of stock even though the stock tracking is disabled and stock levels should be completely ignored.

Patch for both issues attached.

CommentFileSizeAuthor
attribute_stock_check.diff1.26 KBstockliasteroid
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tunic’s picture

Status: Needs review » Fixed

Yesm, you are right, not vcaraitons taken into account, nor active flag checked. Patch seems ok to me, applied to dev version, new beta release shortly.

Thanks for your report and the attached patch!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.