Out of Stock on Items without Stock or Attributes

Scott M. Sanders - May 19, 2009 - 19:16
Project:UC Attribute Stock Filter
Version:6.x-1.0-beta12
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi. I have some products for which my clients do not use the Stock or Attributes features, but with this module enabled, which globally affects all products, these select products are listed as Out of Stock, which suffice it to say is not the desired effect.

In fact, uc_multi_stock basically accomplishes what we want already -- when a customer tries to add an item from an external cart link (our shop experience) that's out of stock, they of course get the error that it's out of stock.

What we hoped for with Attribute Stock Filter, as the name might suggest, is that it would simply "filter" those products for which the Stock feature is enabled and have a stock at zero or less from anywhere in the display to the customer. Sadly this seems not so, so this module is otherwise useless to us for now.

I appreciate the effort though -- just some feedback regardless.

#1

maikeru - June 17, 2009 - 05:10

Same problem for me.

Although I think the quickest way to fix it is to add an if statement at line 78 of uc_attribute_stock_filter.module.

if (is_numeric($stock->count)) {

.....

}

Seems to work now.

Michael

#2

Danny_Joris - June 18, 2009 - 15:35

I agree that this is an annoying problem. This module is great, but there should at least be an option to choose if you want non-stock products to be marked as 'out of stock' or not.

#3

Clint Eagar - September 3, 2009 - 14:20

I agree, if stock isn't being tracked on a product then this module should ignore that product. Other than that, this is an excellent module.

#4

mplsdan - October 29, 2009 - 16:57

thanks maikeru, that fixed it for me. Maybe an update or patch will be added at some point ( I have no idea how to do that kind of thing). But for now, that's a great fix, so my client doesn't have to go back and activate stock levels for hundreds of products, just the ones they want to track stock on.

#5

maikeru - November 12, 2009 - 22:34

Actually, it looks like its included in a patch now:

See: http://drupal.org/node/432870#comment-1880116

Theres a line in the provided patch which reads:

if ($stock->active && $stock->count < 1) {

 
 

Drupal is a registered trademark of Dries Buytaert.