VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: zanardi on July 17, 2013, 11:36:06 AM

Title: Backend: Product Add/Edit fix for template override
Post by: zanardi on July 17, 2013, 11:36:06 AM
VirtueMart 2.0.20.
For some reasons I needed to use template override in backend, but I noticed it wasn't working on Product Add/Edit view.
The fix is to remove line 57:

$this->addTemplatePath(JPATH_COMPONENT_ADMINISTRATOR.DS.'views'.DS.'product'.DS.'tmpl');

Which is not needed anyway to display the page.

If you remove or comment that line, you are able to create e.g. the file

/administrator/templates/[your admin template]/html/com_virtuemart/product/product_edit_price.php

and do whatever change you need to.

Hope this is useful to someone and that the fix will be included in future versions of VM.
Title: Re: Backend: Product Add/Edit fix for template override
Post by: AH on October 19, 2013, 17:51:37 PM
Can this line be removed

It is still preventing overrides to the product edit template in Admin!

administrator\components\com_virtuemart\views\product\view.html.php
Title: Re: Backend: Product Add/Edit fix for template override
Post by: AH on November 06, 2013, 19:42:30 PM
administrator\components\com_virtuemart\views\product\view.html.php


VmConfig::loadJLang('com_virtuemart_orders',TRUE);
VmConfig::loadJLang('com_virtuemart_shoppers',TRUE);
//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');