VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: AmStaF on April 12, 2012, 08:51:37 AM

Title: Strange overriding behavior for the separate files
Post by: AmStaF on April 12, 2012, 08:51:37 AM
J2.5.4, VM2.0.3I

I am updating a few overriding templates at administrator\templates\bluestork\html\com_virtuemart:
And something strange occurs. Overriding works well for all of that files/folders. But at html\com_virtuemart\product it works ONLY for default.php, but it ignores new files product_edit_custom.php, product_edit_information.php, product_edit_status.php.

Did anybody find the same? If it`s a bug, does it fixed in 2.0.4?
Title: Re: Strange overriding behavior for the separate files
Post by: bajobongo on June 04, 2012, 11:47:58 AM
Confirmed on VM 2.0.6 and latest Joomla!. None file for product can be override in administrator template (except default.php).
Title: Re: Strange overriding behavior for the separate files [SOLVED]
Post by: ivus on July 19, 2012, 07:50:07 AM
Hi AmStaF and bajobongo,

This is also confirmed in the latest VM 2.0.8e.

BUT there is a solution.

In the file \administrator\components\com_virtuemart\views\product\view.html.php simply comment/remove the code @line 54

//this was in the controller for the edit tasks, I dont know if it is still needed,
$this->addTemplatePath(JPATH_COMPONENT_ADMINISTRATOR.DS.'views'.DS.'product'.DS.'tmpl');


Then you should be able to override the layouts as per usual.

Could a VM Dev team member please confirm.

I hope this helps.
Title: Re: Strange overriding behavior for the separate files
Post by: randomdev on August 06, 2012, 04:05:18 AM
I commented out this file but still cant seem to get overrides working (I think I am doing something wrong)

should the override for
administrator/components/com_virtuemart/views/product/tmpl/product_edit_information.php
be in
administrator/templates/bluestork/html/com_virtuemart/product/product_edit_information.php ?

Disregard! I was using the wrong template folder, all works thanks!
Title: Re: Strange overriding behavior for the separate files
Post by: Milbo on August 12, 2012, 15:45:11 PM
I do not understand why this is there (see the comment) and I dont understand why executing this line breaks the overrides for the BE
Title: Re: Strange overriding behavior for the separate files
Post by: uschmi on November 13, 2012, 14:17:03 PM
Unfortunately, this line still exists even in V 2.0.14     :(
CouldnĀ“t this just be removed since this obviousely does not cause any problems (tried this with several versions)!
Else, we always have to remember to uncomment after upgrading...