VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Development & Testing => Topic started by: vasiljevski on April 09, 2012, 15:12:34 PM

Title: Error in renderMail()
Post by: vasiljevski on April 09, 2012, 15:12:34 PM
In components\com_virtuemart\helpers\shopfunctionsf.php renderMail()

if(JVM_VERSION == 2){
$q = 'SELECT `template` FROM `#__template_styles` WHERE `client_id`="0" AND `home`="1"';
} else {
$q = 'SELECT `template` FROM `#__template_styles` WHERE `client_id`="0" AND `home`="1"';
}

This produces error in Joomla 1.5 and it should be changed to:
if(JVM_VERSION == 2){
$q = 'SELECT `template` FROM `#__template_styles` WHERE `client_id`="0" AND `home`="1"';
} else {
$q = 'SELECT `template` FROM `#__templates_menu` WHERE `client_id`="0" AND `menuid`="0"';
}


This might be a copy/paste error because there is a check for Joomla version but query is not changed accordingly :)
Title: Re: Error in renderMail()
Post by: Milbo on April 09, 2012, 23:29:56 PM
thanks, just changed it as you suggested.
Title: Re: Error in renderMail()
Post by: vasiljevski on April 10, 2012, 01:24:30 AM
Your welcome :)
I just checked SVN and there is still  "#__template_styles" instead of "#__templates_menu" in J1.5 there is no table "#__template_styles" :)
Title: Re: Error in renderMail()
Post by: Milbo on April 12, 2012, 10:05:37 AM
Thx, was in a hurry, ... will be committed soon.