VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: jha on February 07, 2015, 02:57:57 AM

Title: Virtuemart Category Layout - Problem
Post by: jha on February 07, 2015, 02:57:57 AM
Hi people!

I create a new file: /yourtemplate/html/com_virtuemart/category/defaultListAll.php

And then, in some Product Categories I change de "Category Browse Page" to "defaultListAll"... but the result is always the same - default.php...

Can you help me to look for the error? :(

Joomla 3
Virtuemart 3.0.4

Thanks
Title: Re: Virtuemart Category Layout - Problem
Post by: GJC Web Design on February 07, 2015, 10:43:43 AM
always works for me..  make sure you have no menu made pointing to that cat with a templating setting already made

switch off SEF so you can see the url

remove any &Itemid=xxx  from the url when u test

add  a html comment to the top of each template so you can be sure there is no confusion 

<!--defaultListAll-->

Title: Re: Virtuemart Category Layout - Problem
Post by: jha on February 09, 2015, 20:33:46 PM
Thanks GJC Web Design!!

But, I found a little problem... the new file name needs to be in lowercase!!! It happened to me...

Look:
in components/com_virtuemart/helpers/vmtemplate.php

if(!empty($layout)) {
   $view->setLayout( strtolower( $layout ) );
   }

and then in libraries/joomla/filesystem/path.php: 296
   $fullname = realpath($fullname);

return false! and we have de default template...

Thanks

Title: Re: Virtuemart Category Layout - Problem
Post by: GJC Web Design on February 09, 2015, 23:59:44 PM
ah - interesting - I know underscores break it but didn't know caps..