VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Otto0815 on November 06, 2012, 21:02:16 PM

Title: Different Views for Category's?
Post by: Otto0815 on November 06, 2012, 21:02:16 PM
Hi,

i've many categorys in my shop and some should use another view then default.

So i've done my changes and saved an view called "default_1.php" in my override folder (the normal "default.php" os also in this folder and works fine)

But when i try to choose this new view in the "vm backend->categories-->this categorie" i can't choose the new view....

I can change the name of the template but i only get "default" as view....

any Hints on this for me?

Title: Re: Different Views for Category's?
Post by: aksatob on November 06, 2012, 21:33:47 PM
hi,

i am not sure, but i read somewhere here, that override has problem with _ in name, so try rename default_1.php to default1.php...
Title: Re: Different Views for Category's?
Post by: Otto0815 on November 06, 2012, 21:43:12 PM
Quote from: aksatob on November 06, 2012, 21:33:47 PM
hi,

i am not sure, but i read somewhere here, that override has problem with _ in name, so try rename default_1.php to default1.php...

Thank you, that's it......
Title: Re: Different Views for Category's?
Post by: Otto0815 on November 06, 2012, 22:05:08 PM
So, now the new template can be choosen and is saved in the database.....but isn't shown....

I've tried to clear the Joomla cache and my browser cache and nothing happens.....

and must every subcategory be changed, or is there anywhere an option to take the settings from the parent kategorie?
Title: Re: Different Views for Category's?
Post by: jenkinhill on November 07, 2012, 10:11:31 AM
The override must be set for each category or sub-category, recursion is not possible.
Title: Re: Different Views for Category's?
Post by: pshentsoff on November 07, 2012, 13:23:57 PM
Hello, All!
I have the same problem too:

Joomla 2.5.7 + Virtuemart 2.0.12e

1. Change templates/my_template/html/com_virtuemart/category/default.php and save it as 8inRow.php at the same directory. Ok.
2. Select this file (8inRow.php) as 'Category Browse Page' on category settings page at Administration Panel -> Virtuemart -> Product Categories -> My Category. Ok.
3. It's continue use original default.php in all. WASSUP?
Note, that on my localhost (same config) - all works fine.

What can it be?
Title: Re: Different Views for Category's?
Post by: Otto0815 on November 07, 2012, 17:09:32 PM
I've just foun dout how it works:

You don't have to use any capital letters, or special characters....i don't now about numbers, but i think it wont work also.....

so only things like: defaultnew.php, or in your case :defaulteightinrow.php

Title: Re: Different Views for Category's?
Post by: pshentsoff on November 07, 2012, 17:35:04 PM
Yeah!
Thank you very much - you are truly saviour!
Reason was in capitalized 'R' at file name 8inRow.php!
Change it to eightinrow.php or 8inrow.php (numbers allowed too) - and it works!
Strange that it works on localhost (apache under win machine)  ??? Think that VM or J convert strings with filename to lower before include, but on win there is no difference - 'Row'  or 'row'.
Thanx again!