VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: mtaras on March 19, 2013, 12:45:42 PM

Title: Administrator template override
Post by: mtaras on March 19, 2013, 12:45:42 PM
Hi I 've try to implement an override of the admin views of VM2 in my default template.
I try to override the /administrator/components/com_virtuemart/views/product/tmpl/product_edit_information.php as /administrator/templates/com_virtuemart/product/product_edit_information.php but nothing overrides. I can just override the /administrator/templates/com_virtuemart/product/default.php in general the default.php file of the views, not some other file? Is that a bug or I could override with some other method?
Title: Re: Administrator template override
Post by: emicoma on August 06, 2013, 15:09:43 PM
have you found out the solution ?
Title: Re: Administrator template override
Post by: mtaras on August 06, 2013, 15:11:58 PM
Unfortunately not yet.
Title: Re: Administrator template override
Post by: PRO on August 06, 2013, 19:17:14 PM
have you tried having BOTH files in the admin override folder?

Title: Re: Administrator template override
Post by: emicoma on August 07, 2013, 00:08:35 AM
yes,
I just found this post that could give a solution, but not tried yet :
http://forum.virtuemart.net/index.php?topic=117254.msg395923#msg395923
Title: Re: Administrator template override
Post by: emicoma on August 08, 2013, 21:06:42 PM
Tested : it works !
Title: Re: Administrator template override
Post by: Uke on December 24, 2013, 12:38:15 PM
Thanks alot!  :)

Why this was not in the last virtuemart update? Nobody knows...  :o

line 57 in /administrator/components/com_virtuemart/views/product/view.html.php

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

Title: Re: Administrator template override
Post by: AH on December 24, 2013, 14:58:06 PM
I think it was kept in to allow admin to edit product in the frontend. Other views are fine to override.

Without it I think the frontend cannot find the view

As I NEVER allow editing in the frontend it is ok for me to remove this line and create my view override in the backend for products.