Site maintenance: Tuesday 17 Nov, from 10: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 / General Questions / Template Customisation Issue

Template Customisation Issue

Locked

Started by smcelligott on 10 Feb 2010, 3:13 AM · Views: 1,402

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
10 Feb 2010, 3:13 AM
#1
smcelligott avatar

smcelligott

New Zenner

Join Date:
Nov 2009
Location:
Sydney Australia
Posts:
84
Plugin Contributions:
0

Template Customisation Issue

What have I done?

Using ZC 1.3.8

My original problem was that I wanted to work on a page before I made it live. Using the Define Pages Editor, I modified Main_Page to say, "work in Progress." Then decided to play with a variation on the original page using the same editor, "Define_Page_3.php." Along the way, I tried to look at https://www.mydomain.com/page_3.php or https://www.mydomain.com/define_page_3.php with no luck . . . nevertheless I kept editing in html mode, and figured I could make it go "live" at some stage. So today, figured I would try to get my head around it. Found the modified file in /includes/languages/english/ . . . don't recall the rest of the link, copied it to my local drive, renamed it "test.php", and proceeded to stick it in:

includes/languages/CUSTOM
includes/lanuages/English/CUSTOM
includes/languages/English/html_includes/CUSTOM, and
a few more variations as well

Each time loading in "test," seeking it in my browser, "www.mydomain.com/test.php" and when it was not there deleting the file and putting into the next possible . . . /CUSTOM/ folder

In theory I was testing and undoing, testing and undoing, but it never worked. Eventually when I could get no further I went back to https://www.mydomain.com, and lo and behold, the borwser seeks and seeks and . . . NOTHING! If I go into the define pages editor all is still there, but the website has vanished ;)

Tell me I've done something stupid, and you have the brilliant solution for me. The website is https://www.findingyourway.com.au. Any brilliance would be greatly appreciated.

And in advance, no I did not mess with style sheets. I never replaced a file, I simply put this test file into folders that were previously empty or had other php files in them.

Thanks so much for your help! Sean

Sean M - Sydney, Australia

10 Feb 2010, 3:31 AM
#2
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Template Customisation Issue

Presuming this is not a live site, you might be able to just re-upload the 'includes/languages' dir. from the original default files and restore. Also, when working on a custom Template and having these type problems switching to the Classic (default) Template will let you know if the problem is with custom files. Which at least narrows things down for you.

The learning is in the doing.

Potent Products

10 Feb 2010, 4:44 AM
#3
smcelligott avatar

smcelligott

New Zenner

Join Date:
Nov 2009
Location:
Sydney Australia
Posts:
84
Plugin Contributions:
0

Re: Template Customisation Issue

Rob, Thanks for your feedback. This WAS a live site, but I had really only started with the ZenCart installation. I had spent a lot of time editing this "Define_Page_3.php" file, I was still able to access and copy that file to my local drive.

I tried changing the template to classic and it made no difference. So I decided to delete the includes/languages/ directory and then reinstalled from a virgin copy. I then recreated all of the custom directories (just empty folders). I went back into https://www.findingyourway.com.au and again nothing.

No error message, the site simply never loads. I just tried another browser and it simply sees a blank html page.

Mind you if I go into my administration file of ZC, I still see all of the template choices, and other elements that are indeed "there," but obviously by deleting includes/languages I deleted all customised content. I didn't bother reinstalling my backed-up html page but I did make a few tweaks in Define Pages Editor to Main_Page and Page_3 and saved both. Again the index seems to be pointing to a blank html page rather than the slightly customised "Main_Page" in ZC, as nothing at all comes up.

Now this is sounding like a strange database problem with pointers broken . . . but have no idea what might have triggered that! Sorry for my techno challenged explanations! Hope this makes some sense.

Cheers, Sean

Sean M - Sydney, Australia

10 Feb 2010, 11:22 AM
#4
stevesh avatar

stevesh

Black Belt

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

Re: Template Customisation Issue

When you say 'slightly customized' main_page, what exactly did you do, and if you replace that page with a fresh (stock) copy, does the site come back?

My guess is that you've introduced blank lines or spaces into define_main_page.php or used unescaped special characters somewhere.

You might try this, too:

http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=860

10 Feb 2010, 11:31 AM
#5
smcelligott avatar

smcelligott

New Zenner

Join Date:
Nov 2009
Location:
Sydney Australia
Posts:
84
Plugin Contributions:
0

Re: Template Customisation Issue

No I just inserted "revised main page???" so I could tell which file was being opened. I just changed back to an unmodified file, and that did not make a difference. will try the debug -- thanks, Sean

Sean M - Sydney, Australia

10 Feb 2010, 11:48 AM
#6
smcelligott avatar

smcelligott

New Zenner

Join Date:
Nov 2009
Location:
Sydney Australia
Posts:
84
Plugin Contributions:
0

Re: Template Customisation Issue

not sure if I missed something obvious or you missed an instruction, but I followed the instructions, but it doesn't seem like I did anything. Stuck it in the /includes/extra_datafiles folder and then tried to open the offending (main page)? did all that, read the instructions a couple of times, but nothing, no such error log is created . . . don't I have to install it somehow?? Seems to easy to just drop it into the folder. . .

Sean M - Sydney, Australia

11 Feb 2010, 4:59 AM
#7
smcelligott avatar

smcelligott

New Zenner

Join Date:
Nov 2009
Location:
Sydney Australia
Posts:
84
Plugin Contributions:
0

Re: Template Customisation Issue

I'm fairly certain this is NOT a template customisation issue as I first suggested. I'll dig deeper, and attempt a variation of this question in a new post.

Sean M - Sydney, Australia

11 Feb 2010, 7:12 AM
#8
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Template Customisation Issue

Blank page
https://www.zen-cart.com/tutorials/index.php?article=82

Then decided to play with a variation on the original page using the same editor, "Define_Page_3.php." Along the way, I tried to look atwww.mydomain.com/page_3.php or www.mydomain.com/define_page_3.php with no luck .
Those are not the url's to access load page_3
Once you get your blank page squared try
https://www.mydomain.com/index.php?main_page=page_3

Zen-Venom Get Bitten

11 Feb 2010, 7:13 AM
#9
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Template Customisation Issue

smcelligott:

Mind you if I go into my administration file of ZC, I still see all of the template choices, and other elements that are indeed "there,"
That tells us the problem is somewhere in the 'includes' dir. which is where all the front-end files are located. Best I can suggest is to delete the 'includes' dir. and re-install the default one.

That should make your site work again but with the Classic Template. From there I suggest you create a 'test' dir. where you can experiment and if things go wrong then not a problem. Just delete the 'test' dir. and re-install. That is why, having a 'test' dir. is always recommended.

The learning is in the doing.

Potent Products

11 Feb 2010, 10:25 PM
#10
smcelligott avatar

smcelligott

New Zenner

Join Date:
Nov 2009
Location:
Sydney Australia
Posts:
84
Plugin Contributions:
0

Re: Template Customisation Issue

Thanks all, this all got a bit too hairy. When I was running the debug (after fully reading the instructions), it kept struggling with something currency related in the config file. I tinkered for awhile, but in the end, decided to save the new template, and main page that I had put a lot of work into, and completely delete, and reinstall zc. Surprisingly it didn't take me long to do that this time. Sure, there were loads of little things that I have to remember how to fix again, but with each virgin install, the processes, and the file structure understanding, become more obvious. Not a bad exercise for ZC newbies, in my opinion. Thanks again for all of your help. Cheers, Sean

Sean M - Sydney, Australia

11 Feb 2010, 10:41 PM
#11
smcelligott avatar

smcelligott

New Zenner

Join Date:
Nov 2009
Location:
Sydney Australia
Posts:
84
Plugin Contributions:
0

Re: Template Customisation Issue

Kobra,

The blank page tutorial:

Blank page
https://www.zen-cart.com/tutorials/index.php?article=82

was spot on. In it I read a typical problem was:

  1. Common customization errors
    The most common customization errors include:
  • using ' or " marks inside define() statements, resulting in matched quotes
  • removing or adding punctuation to define() statements, thus breaking the correct syntax. A define() statement should look like this: define('CONSTANT_NAME', 'value here');
  • missing semi-colons and periods, unbalanced parentheses, braces, brackets
  • uploading files to the wrong places. For more information about overrides, see the Overrides Chart and the Overrides FAQs

That last item is the likely culprit. I will be much more conscientious in the future about making changes.

Thanks again, Sean

Sean M - Sydney, Australia