Zen Cart Logo
Forums / General Questions / Baffling blank page at checkout_shipping.php

Baffling blank page at checkout_shipping.php

Locked

Views: 5,658

Results 1 to 17 of 17
This thread is locked. New replies are disabled.
20 Jul 2009, 3:18 PM
#1
ci_rory avatar

ci_rory

New Zenner

Join Date:
Jul 2009
Posts:
14
Plugin Contributions:
0

Baffling blank page at checkout_shipping.php

Hi all,

I edited the checkout_shipping.php and uploaded it to the template override folder within includes/languages/english as per good Zen Cart practice.

The changes I made were minimal and did not affect any syntax - I basically just changed the word 'shipping' to 'delivery' in the definition values. I have compared and re-compared with the original file in WinMerge but there is nothing different that should cause a problem that I can see - e.g. stray commas, missing apostrophes, etc.

However now when I click through from the delivery information in the checkout through to the next screen, I just get an inexplicable blank screen. I have read through similar threads but they all seem to have done something wrong syntax-wise in the PHP file that I just can't see in mine.

Could anybody offer any suggestions on this?

Many thanks,

Rory. :)

My modified checkout_shipping.php code:

--

<?php /** * @package languageDefines * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: checkout_shipping.php 4042 2006-07-30 23:05:39Z drbyte $ */ define('NAVBAR_TITLE_1', 'Checkout'); define('NAVBAR_TITLE_2', 'Delivery Method'); define('HEADING_TITLE', 'Step 1 of 3 - Delivery Information'); define('TABLE_HEADING_SHIPPING_ADDRESS', 'Delivery Address'); define('TEXT_CHOOSE_SHIPPING_DESTINATION', 'Your order will be delivered to the address at the left or you may change the delivery address by clicking the <em>Change Address</em> button.'); define('TITLE_SHIPPING_ADDRESS', 'Delivery Information:'); define('TABLE_HEADING_SHIPPING_METHOD', 'Delivery Method:'); define('TEXT_CHOOSE_SHIPPING_METHOD', 'Please select the preferred delivery method to use on this order.'); define('TITLE_PLEASE_SELECT', 'Please Select'); define('TEXT_ENTER_SHIPPING_INFORMATION', 'This is currently the only delivery method available to use on this order.'); define('TITLE_NO_SHIPPING_AVAILABLE', 'Not Available At This Time'); define('TEXT_NO_SHIPPING_AVAILABLE','<span class="alert">Sorry, we are not delivering to your region at this time.</span><br />Please contact us for alternative arrangements.'); define('TABLE_HEADING_COMMENTS', 'Special Instructions or Comments About Your Order'); define('TITLE_CONTINUE_CHECKOUT_PROCEDURE', 'Continue to Step 2'); define('TEXT_CONTINUE_CHECKOUT_PROCEDURE', '- choose your payment method.'); // when free shipping for orders over $XX.00 is active define('FREE_SHIPPING_TITLE', 'Free Delivery'); define('FREE_SHIPPING_DESCRIPTION', 'Free delivery for orders over %s'); ?>

--

20 Jul 2009, 3:34 PM
#2
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Baffling blank page at checkout_shipping.php

What programme are you using to edit the file? I don't know whether it's just this forum but it looks like there are big gaps (double spaced?) between the code. Make sure to use a code-friendly editor such as Notepad++.

Failing that, try step 2a:
https://www.zen-cart.com/tutorials/index.php?article=82

20 Jul 2009, 9:17 PM
#3
ci_rory avatar

ci_rory

New Zenner

Join Date:
Jul 2009
Posts:
14
Plugin Contributions:
0

Re: Baffling blank page at checkout_shipping.php

Hi,

Thanks for getting back to me. There are some double, even triple spaces between lines in the file but they exist in the original php file - I haven't added them in.

I edit the files using jEdit.

I ran the debugging thing from the link you provided and it found lots of notices, a handful of warnings but no fatal errors, so nothing obvious to go on there either.

Any more ideas?

Thanks again,

Rory. :)

20 Jul 2009, 9:36 PM
#4
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Baffling blank page at checkout_shipping.php

There are some empty lines in checkout_shipping.php but that's not quite the same as double spacing. Empty lines are okay but double spacing is not.

What errors did you receive when running the Debug Error-Logging Utility?

Also, delete any space there may be after the closing ?>

20 Jul 2009, 9:57 PM
#5
ci_rory avatar

ci_rory

New Zenner

Join Date:
Jul 2009
Posts:
14
Plugin Contributions:
0

Re: Baffling blank page at checkout_shipping.php

Yes that's done it!

I took out all of the double/triple spaces (carriage returns) and also removed the one empty line after the closing ?> at the end of the file. The checkout now works without a problem.

Thanks for your help with that :clap:

Now, I am just wondering why that has fixed things. I suppose it shows my ignorance of PHP to ask what difference blank spaces make, but that's the question on my lips nonetheless...

Thanks again,

All the best,

Rory. :)

20 Jul 2009, 10:55 PM
#6
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Baffling blank page at checkout_shipping.php

Well as far as double spacing goes, I imagine it's because the code becomes formatted, almost like a picture, and so when it comes to the server trying to read the code, it won't know what to do.

On the other hand, if you have space before the opening PHP tag, the server reads this blank data and treats it as header information in the form of text/html. So then when PHP begins and tries to send its own header information, the server throws a blank page with a response like "headers already sent". It's likely a similar story for space after the closing PHP tag.

Interestingly, the Zen Cart devs are starting to remove the closing PHP tags from the end of files as they're not actually required. https://www.zen-cart.com/tutorials/index.php?article=313

This should solve a lot of problems.

4 Dec 2009, 8:30 AM
#7
soulkreed avatar

soulkreed

Zen Follower

Join Date:
Nov 2009
Location:
Melbourne, Australia
Posts:
130
Plugin Contributions:
0

Re: Baffling blank page at checkout_shipping.php

ci-rory:

Yes that's done it!

I took out all of the double/triple spaces (carriage returns) and also removed the one empty line after the closing ?> at the end of the file. The checkout now works without a problem.

Thanks for your help with that :clap:

Now, I am just wondering why that has fixed things. I suppose it shows my ignorance of PHP to ask what difference blank spaces make, but that's the question on my lips nonetheless...

Thanks again,

All the best,

Rory. :)

Hi,
I have the same problem, however, I can't seem to find my checkout_shipping or checkout_payment php files anywhere, i have some checkout and payment ones but they are not the same ones as you guy's have mentioned here

Can they be named other things also and if so what?

Cheers.

4 Dec 2009, 1:05 PM
#8
timdwyer42 avatar

timdwyer42

Zen Follower

Join Date:
Apr 2009
Posts:
149
Plugin Contributions:
0

Re: Baffling blank page at checkout_shipping.php

Hi the default checkout_shipping.php is located in includes/languages/english/

4 Dec 2009, 2:15 PM
#9
soulkreed avatar

soulkreed

Zen Follower

Join Date:
Nov 2009
Location:
Melbourne, Australia
Posts:
130
Plugin Contributions:
0

Re: Baffling blank page at checkout_shipping.php

I found the php files and have edited the gaps/spaces and i'm still getting the screen which is blank.

4 Dec 2009, 2:35 PM
#10
timdwyer42 avatar

timdwyer42

Zen Follower

Join Date:
Apr 2009
Posts:
149
Plugin Contributions:
0

Re: Baffling blank page at checkout_shipping.php

Are you sure there is no space at all after the final ?>

if there isn't have you installed http://www.zen-cart.com/forum/showthread.php?t=84613

if you havn't try that and follow the instructions. If you have is that creating an error log?

4 Dec 2009, 3:13 PM
#11
soulkreed avatar

soulkreed

Zen Follower

Join Date:
Nov 2009
Location:
Melbourne, Australia
Posts:
130
Plugin Contributions:
0

Re: Baffling blank page at checkout_shipping.php

Hi,
I've uploaded the debug and checked the latest report and it's this

[04-Dec-2009 06:47:42] PHP Fatal error: Call to undefined function zen_ship2pay() in /home/soulkree/public_html/store/includes/classes/payment.php on line 28

Any clues please?

4 Dec 2009, 5:30 PM
#12
timdwyer42 avatar

timdwyer42

Zen Follower

Join Date:
Apr 2009
Posts:
149
Plugin Contributions:
0

Re: Baffling blank page at checkout_shipping.php

what is line 28 on the payment.php file?

5 Dec 2009, 2:02 AM
#13
soulkreed avatar

soulkreed

Zen Follower

Join Date:
Nov 2009
Location:
Melbourne, Australia
Posts:
130
Plugin Contributions:
0

Re: Baffling blank page at checkout_shipping.php

Hi,
if i'm looking in the right place here ( /public_html/store/includes/classes/payment.php )

line 28 is blank - it has nothing on it...

5 Dec 2009, 3:28 AM
#14
soulkreed avatar

soulkreed

Zen Follower

Join Date:
Nov 2009
Location:
Melbourne, Australia
Posts:
130
Plugin Contributions:
0

Re: Baffling blank page at checkout_shipping.php

There are alot of spaces in between the lines, I have removed all spaces ( i mirrored the original in local ) and saved it.
I went back into payment.php file in my editor ( 010 editor/sweetscape ) and all the files have ended up all in a few lines/side by side.
What a mess, it will take forever to put them back into their right place.
Any suggestions please? I have turned on all the write permissions to allow file transfer.

5 Dec 2009, 4:33 AM
#15
soulkreed avatar

soulkreed

Zen Follower

Join Date:
Nov 2009
Location:
Melbourne, Australia
Posts:
130
Plugin Contributions:
0

Re: Baffling blank page at checkout_shipping.php

I worked out that I had not actually had the correct file permissions activated on both the file manager ( classes )in my server account as well as the ( filezilla ftp )-(classes ), both needed to be on 777 for the file to transfer properly.

Well that's wonderful isn't it, little by slowly you get there with alot of patience and tears, lol. ( the yelling at the screen doesn't seem to do much of anything, although i keep trying )

Now this debug fatal error is still coming back with line 28 in the payment.php file, here it is at any rate for your viewing pleasure.

[04-Dec-2009 20:03:59] PHP Fatal error: Call to undefined function zen_ship2pay() in /home/soulkree/public_html/store/includes/classes/payment.php on line 28

and here is line 28 from my payment.php file

$this->modules = zen_ship2pay();

hope this helps, thanks.

5 Dec 2009, 4:56 AM
#16
soulkreed avatar

soulkreed

Zen Follower

Join Date:
Nov 2009
Location:
Melbourne, Australia
Posts:
130
Plugin Contributions:
0

Re: Baffling blank page at checkout_shipping.php

Haleluliah, I fixed the thing, oh the joy..

Grabbed the original payment.php file ( had to open a new zen cart for an untampered file as the one i was using was faulty - my fault - i had changed some things in there that I forgot about and had never saved a copy of the original/back up copy ) Oh the pain of it all.

Anyway, we're off again, yeehaaa...

5 Dec 2009, 5:37 AM
#17
soulkreed avatar

soulkreed

Zen Follower

Join Date:
Nov 2009
Location:
Melbourne, Australia
Posts:
130
Plugin Contributions:
0

Re: Baffling blank page at checkout_shipping.php

That was short lived, lol. ( oh the pain again )

The checkout process is working fine but now i am getting ' Internal Server Error ' whenever i try to go into my admin / configuration tabs inside my zen cart admin section. What I wanted to do was to take the gif picture off my checkout payment methods screen as I will only be using paypal at this stage and it won't let me in to the admin section. I have deleted the gif picture from the template images section and the picture is still there, will look around for other spots i may have placed it.

Still need to work out why i can't get into my zen admin config section tabs.