Sample:
I have 10 in stock
Low stock is set at 3
Order is 8 pcs.
Admin gets an email notification that there are 10 in stock...
Something`s wrong here...should be 2 pcs. remaining - not 10.
10-8 = 2
Check without overrides, could be an template issue. Not calculating with reserved. I guess the stock of 8 is still reserved, yes ?
Jörgen @ Kreativ Fotografi
Surely stock total is not reduced until the products are shipped.
Hm would it not make sense to have the left over products calculated after the order is placed ? So it`s irritating if there is the stock amoung without the open orders...
QuoteSo it`s irritating if there is the stock amoung without the open orders...
is not, it is exactly what we require from the e-shop.
HM I think it is....normally the availibility for disposition is calculated with open orders to decide if it is urgent or not to re-order....only for inventory you need the current stock status but for on going disposition you need to know what the availibilty.
thats the different between stock status and availibility.....every ERP availibilty is working with open/pending oders included (Disposition).
And at last it`s the first information you get from the system where you can see what the availibility is - not the stock status before the (last) orders..
Or do you see open orders not relevant for stock status and cancel them ?
We are tailoring the bridge between VM and ERP.
If there are 10 items in stock and 8 items in reservations, you actually have
- 10 boxes in stock
- in stock 8 pcs out of 10 pcs are packed and reserved for customers = no one can order them until the ordering process is completed
- in stock you have 2 pcs of 10 pcs free to order
This is the correct functionality of the eshop and the VM surprisingly adheres to it.
Even for ERP (warehouse) it is right, because if the control comes from the tax office, you still have the right number of pieces in stock - 10 pieces == you have 10 pieces in stock and therefore in the cost of the company.
I don't really understand what you're trying to achieve - it seems to me that you want only 2 pieces in stock?
But that contradicts the laws of nature - I still have 10 pieces of goods on the shelf in the warehouse - they are not lost anywhere, no one took them.
Sorry - Google Translate :)
It`s all OK but not the "low stock email notification" when the low stock minimum is reached.
I have 10 in stock.
Low stock is set to 3
Now comes an order with 8 pcs.
In that moment I receive the los stock email notification that 10 pcs. are in stock.....this is true; temporarily but the AVAILABILITY is relevant here....it`s now 10-8 = 2
So the Email is irritating because it tells the stock status (10 pcs.) before the order (8 pcs.) comes in which activates the low stock email notification.
Quote from: pinochico on January 19, 2021, 09:48:24 AM
We are tailoring the bridge between VM and ERP.
If there are 10 items in stock and 8 items in reservations, you actually have
- 10 boxes in stock
- in stock 8 pcs out of 10 pcs are packed and reserved for customers = no one can order them until the ordering process is completed
- in stock you have 2 pcs of 10 pcs free to order
That is correct.
But what should it be good for taht the low stock email notification tell that there are 10 pcs. in STOCK....?
It would make sense that there ae currently 2 pcs. AVAILABLE....
Is this one order of 8 that is shipped or is another order involved ? The email informes that the order quantity in stock is under 3 but You have an extra order that reserves another 8 that have not been removed from stock yet ?
If You had only one order you would have gotten the message that there are 2 in stock after shipment.
Jörgen
Yes - I placed one order about 8 pcs. in test system to check what happens with the low stock email notification.
As you mentioned the message should be:
"there are 2 in stock after shipment." :D
But in the sent email message you see, that not the available pcs. AFTER shipment but the stock pcs. BEFORE the order is shipped.
This is not happening in my store I get the stock e-mail after shipment and with two in stock not ten as You mention. Are all Your order statuses correct ? I guess you have "is removed" chosen to early in You work flow. It should only be chosen for "shipped", "delivered" or similar statuses.
Jörgen @ Kreativ Fotografi
Hm - is there a point in configuration to set the status when low stock mail should be sent ?
As i said in My earlier post "is removed' should only be assigned to order status, shipped, delivered or similar. Depends om your workflow. I.e when products have been taken out from stock.
Jörgen @ Kreativ Fotografi
Where is the order status set to initiate sending "the low stock notification" ?
I think it has to be "order completed"....but it seems my system is sending out it one step before...
Have You even TRIED to look at the settings in the VM cofiguration for ORDER STATUSES ????
Jörgen
To Jörgen:
Is not better don't looking in admin, but first write post on forum. It is funny and better, definitelly :)
Oh my goodness, I like your patience.
YES - i found it but i never changed something here.
For me the VM Order statuses are OK (default).
The order status "is removed" is only active in status "shipped".
But the Low stock notificaton is sent out BEFORE the products are removed from stock and so the amount of available products in the notificaton is wrong (as it shows the sock amount without pending orders - respective the order which is responsible reaching defined low stock limit).
I think the message in the email is wrong....status setting are correct for me....
When is shipped applied ?
Have You checked the recorded status history for this EXACT order ? Does it say Pending, Confirmed, Payed, Shipped or something else ?
I would guess that this has something with an customization to do, maybe a badly written payment option ?
For me it has been working for about 13 years, but this may not count for anything.
Not much to go on here, without screenshots or settings.
Payment options, Shipping options ? Settings for these? OPC checkout ? Template issue ?
Jörgen
"Shipped" = "is removed".
1st Record Status for new orders is "confirmed by shopper" - I think this is default as I it`s a default installation (only with HORME3 Template).
Nothing else customized.
The low stock information came directly after the order which initialised the low stock notification.
Quote from: Jörgen on January 20, 2021, 12:42:25 PM
Have You checked the recorded status history for this EXACT order ? Does it say Pending, Confirmed, Payed, Shipped or something else ?
Not much to go on here, without screenshots or settings.
Payment options, Shipping options ? Settings for these? OPC checkout ? Template issue ?
Jörgen
With STATUS history I mean: what has been done with the order so far ? Which (multiple) statuses have been assigned so far ? You will find this in the view where you edit the order lines in BE.
Jörgen
HI, nothing.
The order was created by (Test-)customer and that was it...nothing else happend with the order or status.
Admin got the low stock information with stock amount (10 pcs.)
The order which initialised the low stock notification was 8 pcs. - so min stock level (10-8=2, min stock is 3) was reached and admin becomes an information.
But it says 10 in stock....yes but available are 2 and the initial low stock mail was sent out (correct)....
Quote\components\com_virtuemart\language\en-GB\en-GB.com_virtuemart.ini(318): COM_VIRTUEMART_PRODUCT_LOW_STOCK_EMAIL_BODY="The product %s has stock of %d."
Quote%d
How is this calculated ? Is it the current stock level ? (Without reserved/pending orders) ?
Really ? So You do not have pending status in order status history ? I have a very hard time believing this. What kind of payment method do you use and how is it setup ?
Jörgen
QuoteHow is this calculated ? Is it the current stock level ? (Without reserved/pending orders) ?
Find this constant:
COM_VIRTUEMART_PRODUCT_LOW_STOCK_EMAIL_BODY
on your server and check.
I don't know inmedietally, but I use this funkction in terrminal - grep
With this i find all presence in FTP:
./administrator/language/de-DE/de-DE.com_virtuemart.ini:874:COM_VIRTUEMART_PRODUCT_LOW_STOCK_EMAIL_BODY="Das Produkt %s hat einen Lagerbestand von %d."
./administrator/language/pl-PL/pl-PL.com_virtuemart.ini:874:COM_VIRTUEMART_PRODUCT_LOW_STOCK_EMAIL_BODY="Stan magazynu dla %s wynosi %d."
./administrator/language/cs-CZ/cs-CZ.com_virtuemart.ini:876:COM_VIRTUEMART_PRODUCT_LOW_STOCK_EMAIL_BODY="Produkt %s je na skladě v počtu %d."
./administrator/components/com_virtuemart/language/en-GB/en-GB.com_virtuemart.ini:995:COM_VIRTUEMART_PRODUCT_LOW_STOCK_EMAIL_BODY="The product %s has a stock of %d."
./administrator/components/com_virtuemart/models/product.php:3257:
$vars['mailbody'] =vmText::sprintf('COM_VIRTUEMART_PRODUCT_LOW_STOCK_EMAIL_BODY',$link, $vars['product_in_stock']);./components/com_virtuemart/language/en-GB/en-GB.com_virtuemart.ini:318:COM_VIRTUEMART_PRODUCT_LOW_STOCK_EMAIL_BODY="The product %s has stock of %d."
./language/de-DE/de-DE.com_virtuemart.ini:311:COM_VIRTUEMART_PRODUCT_LOW_STOCK_EMAIL_BODY="Der Lagerbestand von Produkt %s beträgt %d."
./language/pl-PL/pl-PL.com_virtuemart.ini:311:COM_VIRTUEMART_PRODUCT_LOW_STOCK_EMAIL_BODY="Stan produktu %s wynosi %d."
./language/cs-CZ/cs-CZ.com_virtuemart.ini:312:COM_VIRTUEMART_PRODUCT_LOW_STOCK_EMAIL_BODY="Výrobek %s je na skladě v množství %d."
and then find on ftp every presence on FTP for this:
product_in_stock
Quote from: Jörgen on January 20, 2021, 14:59:01 PM
Really ? So You do not have pending status in order status history ? I have a very hard time believing this. What kind of payment method do you use and how is it setup ?
Jörgen
For testing i have configured only 1 payment method:
Cash on delivery. (standard)
Quote from: pinochico on January 20, 2021, 15:05:00 PM
QuoteHow is this calculated ? Is it the current stock level ? (Without reserved/pending orders) ?
Find this constant:
COM_VIRTUEMART_PRODUCT_LOW_STOCK_EMAIL_BODY
on your server and check.
I don't know inmedietally, but I use this funkction in terrminal - grep
With this i find all presence in FTP:
./administrator/components/com_virtuemart/models/product.php:3257: $vars['mailbody'] =vmText::sprintf('COM_VIRTUEMART_PRODUCT_LOW_STOCK_EMAIL_BODY',$link, $vars['product_in_stock']);
./components/com_virtuemart/language/en-GB/en-GB.com_virtuemart.ini:318:COM_VIRTUEMART_PRODUCT_LOW_STOCK_EMAIL_BODY="The product %s has stock of %d."
and then find on ftp every presence on FTP for this:
product_in_stock
I know but I do
not need the
product_in_stock level in the low stock email report - i need the
product_in_stock minus
reserved orders in the message.
Quote$vars['mailbody'] =vmText::sprintf('COM_VIRTUEMART_PRODUCT_LOW_STOCK_EMAIL_BODY',$link, $vars['product_in_stock']);
I think i have to change this line in:
Quote$vars['mailbody'] =vmText::sprintf('COM_VIRTUEMART_PRODUCT_LOW_STOCK_EMAIL_BODY',$link, $vars[`product_in_stock` - `product_ordered`]);
UPDATE:
Hm - does not work...now it tells me that "0" pcs.
Seems to be wrong syntax but I think the caculation is what i`m searching for...
You are quickly as women without thinking :(
NO!!!
The var product_in_stock is finally count for this == product_in_stock - product_ordered, but you must find in FTP in definition this variable where is.
?
I think that product_in_stock is not the same like product_in_stock - product_ordered
I put product_ordered in this line for testing low stock notification email:
$vars['mailbody'] =vmText::sprintf('COM_VIRTUEMART_PRODUCT_LOW_STOCK_EMAIL_BODY',$link, $vars['product_ordered']);
and it shows 8 pcs. in low stock mail.
So in low stock email i need:
product_in_stock = 10 pcs.
- product_ordered = 8 pcs.
= product available = 2 pcs.
Any idea how the above line has to be modified (correct syntax) ?
$vars['mailbody'] =vmText::sprintf('COM_VIRTUEMART_PRODUCT_LOW_STOCK_EMAIL_BODY',$link, $vars['product_in_stock'] - $vars['product_ordered']);
assuming there is a $vars['product_ordered']
check first
print 'Debug Line '.__LINE__.' pos <pre>'; print_r ($vars['product_ordered']); print "</pre><br />\n"; die();
YEAH !
That`s right now !
Will replace "Lagerbestand" with "Verfügbarkeit"...as language override; than message is PERFECT.
But how can i ensure that with next update the changement is not be overwritten ?
Saving as override does not work in this case I think.
Language overrides are retained after VM and Joomla updates.
Quote from: jenkinhill on January 21, 2021, 10:56:17 AM
Language overrides are retained after VM and Joomla updates.
Yes i know, but i ment the modification in \administrator\components\com_virtuemart\models\product.php