News:

Looking for documentation? Take a look on our wiki

Main Menu

Backend: Product Add/Edit fix for template override

Started by zanardi, July 17, 2013, 11:36:06 AM

Previous topic - Next topic

zanardi

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.
--
Francesco (zanardi)
http://extensions.gibilogic.com
@gibilogic on Twitter

AH

#1
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
Regards
A

Joomla 4.4.5
php 8.1

AH

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');

Regards
A

Joomla 4.4.5
php 8.1