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 notification email - stock quantity wrong

Started by lostmail, January 18, 2021, 14:14:39 PM

Previous topic - Next topic

Jörgen

Have You even TRIED to look at the settings in the VM cofiguration for ORDER STATUSES ????

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

pinochico

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.
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

lostmail

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....



VirtueMart VirtueMart 4.2.16 11030 | Joomla 4.x | PHP 8.3 | Vp_neoteric 1.6

Jörgen

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
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

lostmail

"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.

VirtueMart VirtueMart 4.2.16 11030 | Joomla 4.x | PHP 8.3 | Vp_neoteric 1.6

Jörgen

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
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

lostmail

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)....



VirtueMart VirtueMart 4.2.16 11030 | Joomla 4.x | PHP 8.3 | Vp_neoteric 1.6

lostmail

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) ?

VirtueMart VirtueMart 4.2.16 11030 | Joomla 4.x | PHP 8.3 | Vp_neoteric 1.6

Jörgen

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
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

pinochico

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
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

lostmail

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)
VirtueMart VirtueMart 4.2.16 11030 | Joomla 4.x | PHP 8.3 | Vp_neoteric 1.6

lostmail

#26
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.
VirtueMart VirtueMart 4.2.16 11030 | Joomla 4.x | PHP 8.3 | Vp_neoteric 1.6

lostmail

#27
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...
VirtueMart VirtueMart 4.2.16 11030 | Joomla 4.x | PHP 8.3 | Vp_neoteric 1.6

pinochico

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.
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

lostmail

?
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) ?

VirtueMart VirtueMart 4.2.16 11030 | Joomla 4.x | PHP 8.3 | Vp_neoteric 1.6