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.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | uc_attribute_stock_filter.stevem_01.patch | 5.51 KB | steve.m |
Comments
Comment #1
steve.m commentedWhoops just realized that line 166 or thereabouts should be this :
Comment #2
jasonabc commentedI 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.
Comment #3
steve.m commentedWhoops attached patch seems to be gone now? This one includes the change from #1.
@#2: have you flushed the menu cache?
Comment #4
checker commentedHi 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.
Comment #5
klavs commentedI 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?
Comment #6
checker commented@klavs
Sorry, I wrote my own module for individual stock issues and removed UC Attribute Stock Filter