News:

Support the VirtueMart project and become a member

Main Menu

Strange overriding behavior for the separate files

Started by AmStaF, April 12, 2012, 08:51:37 AM

Previous topic - Next topic

AmStaF

J2.5.4, VM2.0.3I

I am updating a few overriding templates at administrator\templates\bluestork\html\com_virtuemart:

  • inventory (1 file),
  • manufacturer (1 file),
  • orders (4 files),
  • product (4 files),
  • user (1 file),
  • virtuemart (2 files).
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?

bajobongo

Confirmed on VM 2.0.6 and latest Joomla!. None file for product can be override in administrator template (except default.php).

ivus

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.

randomdev

#3
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!

Milbo

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
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

uschmi

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...