UC Stock Validate

Contrib type: 
Module
Status: 
Work in progress
Moderation: 
Not ready for moderation

Downloads

Compatibility: 
Ubercart 3.x

This module performs two checks during checkout.

When a user tries to add a product to cart, the quantity is checked against the available stock level.
If the quantity exceeds stock level, the user won't be able to add the product to the cart.
Instead an error message tells him to chose a different quantity.

The same check is performed when the user updates his cart.

Please notice:
- Product kits not supported yet. (will fix)
- Differing SKUs not supported yet, just checks the standard SKU. (will fix)


wondergnome's picture
Offline
Joined: 02/12/2012
Juice: 16
Attributes

I don't think I can get this to work with products with set size attributes and differing SKUs. I'll carry on trying

labor b's picture
Offline
Joined: 02/02/2012
Juice: 96
Differing SKUs not supported yet.

This module doesn't take attributes in account yet. I will add this check as soon as possible.

Updated the module description's "Please notice" section.

Website: labor b medienagentur, Drupal: labor b

end user's picture
Offline
Joined: 01/11/2008
Juice: 1728
Re: Differing SKUs not supported yet.

Do you have plants to host this module on Drupal.org?

labor b's picture
Offline
Joined: 02/02/2012
Juice: 96
Re: UC Stock Validate

I will create a drupal project as soon as I have a more stable and complete version ready.

Website: labor b medienagentur, Drupal: labor b

bhbarb's picture
Offline
Joined: 12/21/2011
Juice: 4
Very interested in your project

I am very interested in your project. Our arts center is opening a gift shop, and we need both online and offline sales. We need to track stock levels for attributes during online and offline sales. (We hope to use ubercart for offline sales too for this reason.) Do you have an idea on when you might be finished? I promise to test immediately!

labor b's picture
Offline
Joined: 02/02/2012
Juice: 96
Re: Very interested in your project

Thanks for your interest. Unfortunately I'm really busy with other projects, so I can't tell when I will have the time to finish this module.
Can take up to 4 - 6 weeks.

Website: labor b medienagentur, Drupal: labor b

z3b
z3b's picture
Offline
Joined: 08/15/2007
Juice: 52
Re: UC Stock Validate

Thanks for your hard work labor b.
I needed the same functionalities + support multiple SKUs so I modified your code to make it compatible with multiple attributes/options/skus.
Product kits are still unsupported.

AttachmentSize
uc_stock_validate.zip 2.73 KB
labor b's picture
Offline
Joined: 02/02/2012
Juice: 96
Re: Re: UC Stock Validate

I had a quick look on your changes and added your file as a release with a link to your user page. Thanks for your help!

Website: labor b medienagentur, Drupal: labor b

Remi Chillet's picture
Offline
Joined: 03/22/2012
Juice: 13
UC Stock Validate

Many thanks labor d and z3b for your work Smiling
Little modification to work fine when a product has not attribute.
Product kits are still unsupported.

AttachmentSize
uc_stock_validate.tar.gz 1.63 KB
Remi Chillet's picture
Offline
Joined: 03/22/2012
Juice: 13
UC Stock Validate

The checkout button will now work fine when cart quantity product is equal to stock quantity product.

Remi

AttachmentSize
uc_stock_validate.tar.gz 1.68 KB
brephraim's picture
Offline
Joined: 08/18/2011
Juice: 17
Re: UC Stock Validate

I am getting this error when trying to update quantity in cart:

Notice: Undefined index: attributes in uc_stock_validate_quantity() (line 57 of /srv/www/cart.com/public_html/sites/all/modules/uc_stock_validate/uc_stock_validate.module).

brephraim's picture
Offline
Joined: 08/18/2011
Juice: 17
Re: UC Stock Validate

Also, if I have an item set to a stock level of 1, and I try to add 2, it tells me there is not enough. However, if I add one, and then add one again, it will allow me to have a quantity of 2 in my cart.

Neo13's picture
Offline
Joined: 09/05/2010
Juice: 44
UC out of stock

Hey guys! I was just wondering if it won`t be easeier to port UC Out of stock notification module do D7? http://drupal.org/project/uc_out_of_stock