loadedcommerce / loaded7

Loaded Commerce 7 Public Repository
www.loaded7.com
GNU General Public License v2.0
19 stars 26 forks source link

Quantity Check issue #707

Open wa4u opened 9 years ago

wa4u commented 9 years ago

Check stock level Yes Subtract stock Yes Autodisable out of stock product Yes Disable Add to Cart for out of stock products Yes

When we have 25 items in stock and if I try to add 3, the stock level checking code alert "There is not enough stock on hand to purchase your desired quantity of this product. Please lower your quantity to checkout."

For some reason, javascript is considering 2 not 25.

templates/core/products/info.php find

if (data.qoh < $("#quantity").val()) {

update

if (parseInt(data.qoh) < $("#quantity").val()) {

templates/core/checkout/shopping_cart.php find

if (data.priceData.qoh < $('#products_' + row).val()) {

update

if (parseInt(data.priceData.qoh) < $('#products_' + row).val()) {

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/26923068-quantity-check-issue?utm_campaign=plugin&utm_content=tracker%2F40949&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F40949&utm_medium=issues&utm_source=github).