VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: maxispin on April 14, 2018, 08:56:18 AM

Title: Override not effecting, VirtueMart 3.2.14
Post by: maxispin on April 14, 2018, 08:56:18 AM
Hello for a Long time! Back to the my ever-lasting project.

I am trying to replace category page with override, however it has No effect at all..

Override file is saved here:
/site.com/templates/TemplateXX/html/com_virtuemart/category/category-override.php

And under Virtuemart/configuration/Templates it is selected as "Category Layout"

I have no idea, even why the over-ride-file is selected and it has no effect at all..

### UPDATE ### SOLUTION ###

Virtuemart doesn't like the name I gave to override-file. Default.php works.. I just hate using that one because it is not clear if Override is used or not.

I have to ask, is this a bug?

##### ####

Joomla! 3.8.6    VirtueMart 3.2.14

ps. why the boxes under Admin are not long enough?
Title: Re: Override not effecting, VirtueMart 3.2.14
Post by: jenkinhill on April 14, 2018, 12:24:32 PM
Override with different/long name works OK for me. Check override settings in Joomla menu shop home item category setting tabs, and also the individual category settings.

Also I have no problem with the text boxes.

(https://image.ibb.co/fhQiGn/catover.png) (https://ibb.co/egg12S)
Title: Re: Override not effecting, VirtueMart 3.2.14
Post by: maxispin on April 14, 2018, 12:26:32 PM
Thanks Jenkinhill,

it might be that there is something wrong with my VM. I updated it from 3.2.4.->3.2.14
Title: Re: Override not effecting, VirtueMart 3.2.14
Post by: Studio 42 on April 14, 2018, 17:11:20 PM
category-override.php is not a valid name.
and category_override.php is not a valid choice(it's a sublayout from category.php) and get not displayed.
In joomla layout file need to be 1 single word eg. overide.php, own.php, list.php ...
I think that categoryOverride.php is ok, but i never tried it.
Title: Re: Override not effecting, VirtueMart 3.2.14
Post by: maxispin on April 14, 2018, 17:17:07 PM
Thanks Patrick!

I owe you btw.. My project got stucked for over a year..
Title: Re: Override not effecting, VirtueMart 3.2.14
Post by: jenkinhill on April 14, 2018, 23:35:54 PM
Quote from: Studio 42 on April 14, 2018, 17:11:20 PM
category-override.php is not a valid name.

That's what I thought, and I'm sure it was the case,  but I have been abe to use a hyphenated file name (as shown in my oic above) with J3.86 VM3.2.14.9808 PHP7.0.29 
Title: Re: Override not effecting, VirtueMart 3.2.14
Post by: Studio 42 on April 15, 2018, 12:34:05 PM
Quote from: jenkinhill on April 14, 2018, 23:35:54 PM
Quote from: Studio 42 on April 14, 2018, 17:11:20 PM
category-override.php is not a valid name.

That's what I thought, and I'm sure it was the case,  but I have been abe to use a hyphenated file name (as shown in my oic above) with J3.86 VM3.2.14.9808 PHP7.0.29 
I think the name is displayed but not valid or?
In all case i always use single word, to be sure, even if it's nicer in some case to show.
You can add a Joomla KEY, i think this is displayed(it work for Joomla core layouts)
eg. MOD_STATS_LAYOUT_DEFAULT="Défaut" is for stats module default.php layout
Title: Re: Override not effecting, VirtueMart 3.2.14
Post by: jenkinhill on April 15, 2018, 13:09:14 PM
Quote from: Studio 42 on April 15, 2018, 12:34:05 PM
I think the name is displayed but not valid or?

Yes, with a hyphen it works as an override - at least for me.....  I only tested it because of the issue of maxispin, normally I use  a simple file name, like defaultnoprice.php