VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: anthrobote on December 14, 2011, 15:17:26 PM

Title: VM template does not override the Joomla's one in j1.6 up
Post by: anthrobote on December 14, 2011, 15:17:26 PM
When I set the default template for e-shop or any other template override, nothing happens. The reason is that a backward compatible method setTemplate() is actually not called on the JSite instance in .../helpers/shopfunctionsf.php (http://dev.virtuemart.net/svn/virtuemart/tags/virtuemart-2_0-beta3-released/components/com_virtuemart/helpers/shopfunctionsf.php) on line 382. Instead, the code sets a property named 'setTemplate' that is no longer used in Joomla 1.6 and up (http://joomlacode.org/svn/joomla/development/tags/1.6.x/1.6.0/includes/application.php) (line 476, username: anonymous):

$mainframe->set('setTemplate', $template);

VirtueMart Version:
1.9.8M and remains till 2.0 beta 3

Joomla/Mambo Version:
1.6 and up

Proposed fix(es):
Replace the line in question with:

$mainframe->setTemplate($template);

Bugtracker task #:
Not submitted yet.

When the change is applied, it works correctly.
Title: Re: VM template does not override the Joomla's one in j1.6 up
Post by: anthrobote on January 05, 2012, 23:02:27 PM
The problem is still there in 2.0.0 stable (also in the Development Version trunk). I am just a little surprised that such a crucial issue hasn't been fixed yet.
Title: Re: VM template does not override the Joomla's one in j1.6 up
Post by: deesen on March 28, 2012, 15:28:05 PM
And it is still there in 2.0.2  ...