[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
foodclub.org • View topic - Enforcing out-of-stock items
Page 1 of 1

Enforcing out-of-stock items

PostPosted: Thu Apr 19, 2012 7:27 pm
by support

Re: Enforcing out-of-stock items

PostPosted: Wed Jul 04, 2012 2:11 pm
by support
Update on this... a new feature is now available that automatically updates the num_available field in your database based on changes to users' Orders during the current order cycle.

So if you set num_available to say 5 for an item, then only a total qty of 5 of that item can be ordered by all users. It will correctly reduce num_available as people add the item to their Order, and then increase it again if they delete the item from their Order. However, it does not support Splits yet. Filled splits will not affect an item's num_available.

One more caveat: it only works if phpMyAdmin is enabled to maintain your private database, and for regional databases which are designated as having an accurate num_available value.

Re: Enforcing out-of-stock items

PostPosted: Mon Jul 23, 2012 1:20 pm
by support
Another quick followup on this: you may want to simply hide out-of-stock items from search results entirely, so users don't even know they are available. This is useful for seasonal vendors where they only have an item in stock for a short harvest season.

To do this, simply enable this setting on your Product database page:

Hide out-of-stock items in search results, so they are not even visible to users.

which becomes available to enable after you have the above setting enabled.