Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / Templates, Stylesheets, Page Layout / these directions are not working for me

these directions are not working for me

Locked

Started by ebaobao on 2 Sep 2010, 7:15 PM · Views: 690

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
2 Sep 2010, 7:15 PM
#1
ebaobao avatar

ebaobao

Zen Follower

Join Date:
Jul 2008
Posts:
495
Plugin Contributions:
0

these directions are not working for me

Hello,

I followed these directions and its not working.
https://www.zen-cart.com/tutorials/index.php?article=279

I'm trying to remove the search box header when customer is logged out. The file I'm modifying is search_header.php.

I even try to force the search box to turn off by putting the code: $show_search_header = false;
and it still doesn't work, search box shows regardless of login or logout.

2 Sep 2010, 8:07 PM
#2
ebaobao avatar

ebaobao

Zen Follower

Join Date:
Jul 2008
Posts:
495
Plugin Contributions:
0

Re: these directions are not working for me

the reason why the directions don't work is because its talking about override files in the modules section. But from what I've heard is that modules cannot be overridden.

2 Sep 2010, 8:15 PM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: these directions are not working for me

Admin "modules" or other files do not have an override system, but catalog sidebox or other template files do.

What folder does the file you are trying to edit reside in?

2 Sep 2010, 8:22 PM
#4
ebaobao avatar

ebaobao

Zen Follower

Join Date:
Jul 2008
Posts:
495
Plugin Contributions:
0

Re: these directions are not working for me

I'm trying to edit the file that is in the directions of that link. The path is includes/modules/sideboxes/search_header.php. Those files cannot be overridden correct?

2 Sep 2010, 8:29 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: these directions are not working for me

They most certainly can be. You would save your changed file as
/includes/modules/sideboxes/your_template/search_header.php

If there is already a file in that location, it would override the default file, and any changes you made to the default copy would be ignored.

Files in /includes/modules/pages/ do not have an override system.

2 Sep 2010, 9:40 PM
#6
ebaobao avatar

ebaobao

Zen Follower

Join Date:
Jul 2008
Posts:
495
Plugin Contributions:
0

Re: these directions are not working for me

Glenn,

I did put it in that directory that you suggested but, but it doesn't work. When I changed the core file it works.

You are saying that includes/modules/sideboxes/mytemplate/search_header.php

will override
includes/modules/sideboxes/search_header.php

But that is not the case. I did do that, but it doesn't work.

2 Sep 2010, 9:52 PM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: these directions are not working for me

/includes/modules/sideboxes/ has a /classic/ folder in it, which means that it can be overridden. If your efforts are not working, you are doing something wrong in the process, or something is messed up.

2 Sep 2010, 10:22 PM
#8
ebaobao avatar

ebaobao

Zen Follower

Join Date:
Jul 2008
Posts:
495
Plugin Contributions:
0

Re: these directions are not working for me

Hi Glenn,

Is there some other setting somewhere? I do see a classic folder in there. I did a test and didn't even change code. I have 2 files on my computer

  1. the original search_header.php
  2. and a modified one that I named search_header.php.

when I copied the modified to my custom folder nothing changes. then when I copied that same modified file to includes/modules/sideboxes. the code works.

I have repeated this several times and the overriding system there doesn't work. I don't know what to say. I do notice that there is a empty.txt file in my custom folder. Could that have anything to do with it? By the way, we are talking about public_html/includes/modules/sideboxes right? Its not a huge problem for me anyways because I found some solution for my original problem. But just testing this and just letting people know what I see.

Thanks for replying nonetheless.

3 Sep 2010, 11:13 AM
#9
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: these directions are not working for me

The edited file should go in includes/modules/sideboxes/usi_custom

It looks like your other overrides are working, so that one almost has to if the file was actually changed and is in the right folder.