The backend for notifications has some old code and needs updating. I will write a patch and submit it when I have time, but for now here is how you can get it working.
Add the attached file to:
www/components/com_virtuemart/views/productdetails/tmpl/mail_notify.php
This is your mail template, so modify as you see fit
In www/components/com_virtuemart/views/productdetails/view.html.php, inside class VirtueMartViewProductdetails, add the function
<?php
function renderMailLayout ($doVendor, $recipient) {
$tpl = 'mail_notify';
$this->doVendor=$doVendor;
$this->fromPdf=false;
$this->uselayout = $tpl;
$this->subject = 'Product Notification';
$this->layoutName = $tpl;
$this->setLayout($tpl);
parent::display();
}
?>
In www/administrator/components/com_virtuemart/models/waitinglist.php inside function notifyList is this
<?php
/* Load the product details */
$q = "SELECT product_name FROM #__virtuemart_products WHERE virtuemart_product_id = ".$virtuemart_product_id;
$db->setQuery($q);
$vars['productName'] = $db->loadResult();
/*TODO old URL here Now get the url information */
$vars['url'] = JURI::root().JRoute::_('index.php?page=shop.product_details&flypage=shop.flypage&virtuemart_product_id='.$virtuemart_product_id.'&option=com_virtuemart');
foreach ($waiting_users as $key => $waiting_user) {
$vars['user'] = $waiting_user;
if (shopFunctionsF::renderMail('waitinglist', $waiting_user->notify_email, $vars)) {
$this->update($waiting_user->notify_email, $virtuemart_product_id);
}
}
?>
change it to this
<?php
/* Load the product details */
//$q = "SELECT product_name FROM #__virtuemart_products WHERE virtuemart_product_id = ".$virtuemart_product_id;
$q = "SELECT product_name FROM `#__virtuemart_products_".VMLANG."` WHERE virtuemart_product_id = ".$virtuemart_product_id; # seyi_code
$db->setQuery($q);
$vars['productName'] = $db->loadResult();
/*TODO old URL here Now get the url information */
//$vars['url'] = JURI::root().JRoute::_('index.php?page=shop.product_details&flypage=shop.flypage&virtuemart_product_id='.$virtuemart_product_id.'&option=com_virtuemart');
$vars['url'] = JURI::root().'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$virtuemart_product_id;
foreach ($waiting_users as $key => $waiting_user) {
$vars['user'] = $waiting_user;
/*if (shopFunctionsF::renderMail('waitinglist', $waiting_user->notify_email, $vars)) {
$this->update($waiting_user->notify_email, $virtuemart_product_id);
}*/
if (shopFunctionsF::renderMail('productdetails', $waiting_user->notify_email, $vars)) {
$db->setQuery('UPDATE #__virtuemart_waitingusers SET notified=1 WHERE virtuemart_waitinguser_id='.$waiting_user->virtuemart_waitinguser_id);
$db->query();
}
}
?>
Notifications should now work and you will not receive the 500 error page anymore.
[attachment cleanup by admin]