Stock check fixes

master
Mark Moffat 2020-03-21 20:21:18 +10:30
parent 00be94f5d7
commit 212a40632b
1 changed files with 1 additions and 1 deletions

View File

@ -528,7 +528,7 @@ router.post('/product/addtocart', async (req, res, next) => {
} }
// If stock management on check there is sufficient stock for this product // If stock management on check there is sufficient stock for this product
if(config.trackStock && product.productStock){ if(config.trackStock){
// If there is more stock than total (ignoring held) // If there is more stock than total (ignoring held)
if(productQuantity > product.productStock){ if(productQuantity > product.productStock){
return res.status(400).json({ message: 'There is insufficient stock of this product.' }); return res.status(400).json({ message: 'There is insufficient stock of this product.' });