Based on my own needs and a couple of the requests here in the queue, I added some features to this excellent module. They include:

- admin settings to add an optional additional message below the disabled 'add to cart' button (we use this to say something cheerful about contacting us blah blah)
- admin settings to allow display of a list of out of stock options
- added an 'oos' class to the disabled 'add to cart' button for styling

Look in Store administration > Configuration > Attribute Stock Filter for the admin options.

I also made a couple of minor changes in uc_attribute_stock_filter_form_alter():
- got rid of the seemingly unnecessary first db query, and added a test for !$stock to determine if we are all out

I've attached a patch.

Comments

steve.m’s picture

Whoops just realized that line 166 or thereabouts should be this :

      if ($show_oos && !empty($unset_items)) {
jasonabc’s picture

I installed version 6.x-1.0-beta13 but nothing shows up in the Admin Toolbar (i.e. there is no "Attribute Stock Filter" link in Store administration > Configuration). I flushed the Admin Toolbar cache and wiped and rebuilt. No joy. I'm running Drupal 6.16 and UberCart 2.2.

steve.m’s picture

StatusFileSize
new5.51 KB

Whoops attached patch seems to be gone now? This one includes the change from #1.

@#2: have you flushed the menu cache?

checker’s picture

Hi steve.m
I tested your patch and i can't find any bugs.

Maybe the "Not available" part has not the best place but this would be a new feature request and is not this issue.

klavs’s picture

I have been very busy - and I suspect Henrik is as well.. I hope to get some time to try to add this patch and test it out.. perhaps in september.. (we both have kids, more than fulltime jobs etc.).

@checker: Do you happen to have a site available online, where I can see this patch in action?

checker’s picture

@klavs
Sorry, I wrote my own module for individual stock issues and removed UC Attribute Stock Filter