Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Responsive Joomla Virtuemart Template - CoolMart (SKU# FLEX-00014)

TOPIC: Low Stock email alert not working properly

Low Stock email alert not working properly 9 years 5 months ago #11125

I'm having problems with the low stock notification email. The email is being sent ok, and received by the vendor. But it doesnt tell the vendor what the product is :

The email is coming through with the subject as : COM_VIRTUEMART_PRODUCT_LOW_STOCK_EMAIL_SUBJECT
and the email body just has written in it : COM_VIRTUEMART_PRODUCT_LOW_STOCK_EMAIL_BODY

So the vendor has no idea which product the email is referring to.

I have tried asking this on the VM forum but i am told that the language file is correct and the issue must be specific to my install otherwise loads of other people would have the same problem. I cant find a similar problem on this board either and dont know where to look next - could the template affect this feature do you think ?

thanks
The administrator has disabled public write access.

Low Stock email alert not working properly 9 years 5 months ago #11142

That's weird that the language INI expression hasn't been get printed in the email.

Are you sure you are checking the correct language file?

Make sure, this expression has been defined in both of these Language file:

administrator/components/com_virtuemart/language/en-GB/en-GB.com_virtuemart.ini
components/com_virtuemart/language/en-GB/en-GB.com_virtuemart.ini


If still no luck, then i would suggest you to open the PHP file and enter the text there manually.

This expression is being used (only) by this PHP file:
administrator/components/com_virtuemart/models/product.php

(this PHP file is responsible to generate the email template)

In that PHP file, find these lines:
$vars['subject'] = JText::sprintf('COM_VIRTUEMART_PRODUCT_LOW_STOCK_EMAIL_SUBJECT',$vars['product_name']);
$vars['mailbody'] =JText::sprintf('COM_VIRTUEMART_PRODUCT_LOW_STOCK_EMAIL_BODY',$link, $vars['product_in_stock']);

and replace them with these:
$vars['subject'] = JText::sprintf('The product %s has a low stock',$vars['product_name']);
$vars['mailbody'] =JText::sprintf('The product %s has a stock of %d.',$link, $vars['product_in_stock']);


FYI: The %s and %d will be replaced by variables, so don't touch them (don't change the S and D letters as well, they have special meaning). But you can change the other text string as you wish. First, copy-paste this and run a test, then you can make further customization as you wish.

Regards.
Support
Last Edit: 9 years 5 months ago by Support.
The administrator has disabled public write access.
Time to create page: 0.114 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo