News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

[Solved] Low stock alert working but not as expected

Started by aftertaf, May 29, 2018, 16:45:21 PM

Previous topic - Next topic

aftertaf

Hi,
Joomla 3.8.7 / VM 3.2.14

Current Configuration of Virtuemart:
Stock handling on product level (i.e. Per Product)is enabled, and option 'Displays 'Notify Me' instead of 'Add To Cart' button' is set.
Send low stock notification is enabled.

Current configuration of the product in question:
Stock handling is set to Use Global Configuration
Product in Stock = 1
Booked, Ordered = 0
Low Stock Alert = 1

Vendor received a low stock notification once the order was placed (so when stock is 0, not 1)

Is this normal/configurable ?

As i'm testing this I see another small error/bug/mistake...
Situation:
test product has 2 in stock.
I add 2 of the product to the basket.
OK so far
Then I click the link to go to basket and i get a vmError : Maximum quantiy has been reached, the new quantity for your order has been decreased to 2
Problem being that i ordered 2, so I didnt try to order more than what I have in stock, so the error
shouldn't be raised.
And same error message raised again when i proceed to checkout and pay, though the order of 2 products does complete successfully.
thanks

edit:
fixed since http://dev.virtuemart.net/projects/virtuemart/repository/revisions/9855

Milbo

FE /helpers/cart.php

around line 1670 search for private function checkForQuantities($product, &$quantity=0) {

search for

if ($checkForDisable) {
$productsleft = $product->product_in_stock - $product->product_ordered;

if ($quantity >= $productsleft ){


remove the = in the if($quantity expression


if ($checkForDisable) {
$productsleft = $product->product_in_stock - $product->product_ordered;

if ($quantity > $productsleft ){
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

aftertaf

#2
thanks!
i see this is fixed in the code : http://dev.virtuemart.net/projects/virtuemart/repository/revisions/9855
:)

around line 1760 for me, but hey, who's counting ;)