News:

Support the VirtueMart project and become a member

Main Menu

Override not effecting, VirtueMart 3.2.14

Started by maxispin, April 14, 2018, 08:56:18 AM

Previous topic - Next topic

maxispin

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?
VM 3.0.17.6 | VM 2.0.24c | VM 1.1.9

jenkinhill

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.

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

maxispin

Thanks Jenkinhill,

it might be that there is something wrong with my VM. I updated it from 3.2.4.->3.2.14
VM 3.0.17.6 | VM 2.0.24c | VM 1.1.9

Studio 42

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.

maxispin

Thanks Patrick!

I owe you btw.. My project got stucked for over a year..
VM 3.0.17.6 | VM 2.0.24c | VM 1.1.9

jenkinhill

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 
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Studio 42

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

jenkinhill

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
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum