I customized the mail sent by VM when a user do an order.
The main file is, you know, mail_html.php and it calls others php file.
BUT this file is not called when the VM administrator CONFIRM a PENDING order. The mail sent is get from another template. But what template? I cant get it.
I thought was invoice.php but it is not. My adjustments do not appear...
Any idea?
EDIT: Sorry for posting in the wrong forum
Oh! I noticed that it seems my override works just for the pending order... Why?! =:-O
It seems I have this problem http://forum.virtuemart.net/index.php?topic=98841.msg328726#msg328726 but I am using VirtueMart 2.6.10... Really strange...
The problem is:
$view->addTemplatePath( JPATH_ROOT.DS . 'templates' . DS . $template . DS . 'html' . DS . 'com_virtuemart' . DS . $viewName);
in \components\com_virtuemart\helpers\shopfunctionsf.php
add this path:
\templates\bluestork\html\com_virtuemart\invoice
BUT bluestork is the template of the back end. So if VM really wanted the path of that one it should be \administrator\templates\bluestork\html\com_virtuemart\invoice
I am missing something?
Weel, checked what is the problem now I am doubtful.
Should I modify the core (sigh) adding the folder "administrator" to the path in renderMail() of \components\com_virtuemart\helpers\shopfunctionsf.php
$view->addTemplatePath(JPATH_ROOT . DS . 'templates' . DS . $template . DS . 'html' . DS . 'com_virtuemart' . DS . $viewName);
to be
$view->addTemplatePath(JPATH_ROOT . DS . 'administrator/templates' . DS . $template . DS . 'html' . DS . 'com_virtuemart' . DS . $viewName);
Dont know...
Eventually I managed modifying renderMail()...
if($template){
$view->addTemplatePath(JPATH_ROOT . DS . 'templates' . DS . $template . DS . 'html' . DS . 'com_virtuemart' . DS . $viewName);
}
become
$app =& JFactory::getApplication();
if($template){
if($app->isSite() == 1){
$view->addTemplatePath(JPATH_ROOT . DS . 'templates' . DS . $template . DS . 'html' . DS . 'com_virtuemart' . DS . $viewName);
vmdebug("template path", JPATH_ROOT . DS . 'templates' . DS . $template . DS . 'html' . DS . 'com_virtuemart' . DS . $viewName);
}elseif($app->isAdmin() == 1){
$view->addTemplatePath(JPATH_ROOT . DS . 'administrator/templates' . DS . $template . DS . 'html' . DS . 'com_virtuemart' . DS . $viewName);
vmdebug("template path", JPATH_ROOT . DS . 'administrator/templates' . DS . $template . DS . 'html' . DS . 'com_virtuemart' . DS . $viewName);
}
}
Now I add an override in my BE template and done.
Any better idea appreciated...