Forums / General Questions / Blank Page At Checkout

Blank Page At Checkout

Views: 2,096

Results 1 to 9 of 9
27 Apr 2011, 1:06 AM
#1
mountbaldybrewing avatar

mountbaldybrewing

New Zenner

Join Date:
Dec 2010
Posts:
16
Plugin Contributions:
0

Blank Page At Checkout

I recently installed a FedEx shipping module onto my site. After doing so I went to test my shopping cart and I now get a blank screen whenever I select any method of shipping. The error occurs when I press the "Continue Checkout" button after filling the cart and selecting the shipping method.

I checked my /cache files and am receiving this message:

[26-Apr-2011 17:30:11] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/content/76/6376676/html/zencart/includes/languages/english/modules/shipping/flat.php:53) in /home/content/76/6376676/html/zencart/includes/functions/functions_general.php on line 45

Does anyone have any idea what may have gone wrong and how I might go about fixing it?

My test server URL is https://www.mountbaldybrewing.com/zencart/.

I'm using Fedex Express and Fedex Ground v1.3 mods for the shipping modules of which I downloaded from Free Software Addons.

Thanks for any advice.

27 Apr 2011, 6:24 PM
#3
mountbaldybrewing avatar

mountbaldybrewing

New Zenner

Join Date:
Dec 2010
Posts:
16
Plugin Contributions:
0

Re: Blank Page At Checkout

Thanks!

I checked out the file in question and I come up with this as far as the code goes. If you scroll through this code you'll notice a red section in this. I tried replacing this file with an older version of the file and am having the same errors.

<?php /** * @package shippingMethod * @copyright Copyright 2003-2009 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license [url]http://www.zen-cart.com/license/2_0.txt[/url] GNU Public License V2.0 */ // $Id: flat.php 14498 2009-10-01 20:16:16Z ajeh $ // class flat { var $code, $title, $description, $icon, $enabled; // class constructor function flat() { //This is where the problem is in the code according to my log files. global $order, $db; $this->code = 'flat'; $this->title = MODULE_SHIPPING_FLAT_TEXT_TITLE; $this->description = MODULE_SHIPPING_FLAT_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_FLAT_SORT_ORDER; $this->icon = ''; $this->tax_class = MODULE_SHIPPING_FLAT_TAX_CLASS; $this->tax_basis = MODULE_SHIPPING_FLAT_TAX_BASIS; // disable only when entire cart is free shipping if (zen_get_shipping_enabled($this->code)) { $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false); } if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FLAT_ZONE > 0) ) { $check_flag = false; $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_FLAT_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id"); while (!$check->EOF) { if ($check->fields['zone_id'] < 1) { $check_flag = true; break; } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) { $check_flag = true; break; } $check->MoveNext(); } if ($check_flag == false) { $this->enabled = false; } } } // class methods function quote($method = '') { global $order; $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_FLAT_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_FLAT_TEXT_WAY, 'cost' => MODULE_SHIPPING_FLAT_COST))); if ($this->tax_class > 0) { $this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (zen_not_null($this->icon)) $this->quotes['icon'] = zen_image($this->icon, $this->title); return $this->quotes; } function check() { global $db; if (!isset($this->_check)) { $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_FLAT_STATUS'"); $this->_check = $check_query->RecordCount(); } return $this->_check; } function install() { global $db; $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Flat Shipping', 'MODULE_SHIPPING_FLAT_STATUS', 'True', 'Do you want to offer flat rate shipping?', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())"); $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Shipping Cost', 'MODULE_SHIPPING_FLAT_COST', '5.00', 'The shipping cost for all orders using this shipping method.', '6', '0', now())"); $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_FLAT_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'zen_get_tax_class_title', 'zen_cfg_pull_down_tax_classes(', now())"); $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Tax Basis', 'MODULE_SHIPPING_FLAT_TAX_BASIS', 'Shipping', 'On what basis is Shipping Tax calculated. Options are<br />Shipping - Based on customers Shipping Address<br />Billing Based on customers Billing address<br />Store - Based on Store address if Billing/Shipping Zone equals Store zone', '6', '0', 'zen_cfg_select_option(array(\'Shipping\', \'Billing\', \'Store\'), ', now())"); $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Shipping Zone', 'MODULE_SHIPPING_FLAT_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())"); $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_FLAT_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())"); } function remove() { global $db; $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key like 'MODULE\_SHIPPING\_FLAT\_%'"); } function keys() { return array('MODULE_SHIPPING_FLAT_STATUS', 'MODULE_SHIPPING_FLAT_COST', 'MODULE_SHIPPING_FLAT_TAX_CLASS', 'MODULE_SHIPPING_FLAT_TAX_BASIS', 'MODULE_SHIPPING_FLAT_ZONE', 'MODULE_SHIPPING_FLAT_SORT_ORDER'); } } ?>

Please let me know if you have any ideas on how to fix this one.  Thanks!  :cry:
27 Apr 2011, 9:58 PM
#4
kidtwist avatar

kidtwist

New Zenner

Join Date:
May 2009
Posts:
30
Plugin Contributions:
0

Re: Blank Page At Checkout

i went through and did a test check out for you and everything worked fine for me. i checked out with a check. im using firefox.

to me it looks like you have an extra line in your code after your closing tag. ```
}
}
?>">

that extra space after the tag will cause a blank page. trust me on that. took me 3 reinstalls to figure it out and about 2 days on this forum. hope this helps

my zens
tandjperformance.com - socaloffroad.net - barnettperformance.net - vintageoctane.com

27 Apr 2011, 10:08 PM
#5
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,186
Plugin Contributions:
0

Re: Blank Page At Checkout

Keen eye Kidtwist,

After using winmerge to compare the two file this is the difference below..

function keys() {
return array('MODULE_SHIPPING_FLAT_STATUS', 'MODULE_SHIPPING_FLAT_COST', 'MODULE_SHIPPING_FLAT_TAX_CLASS', 'MODULE_SHIPPING_FLAT_TAX_BASIS', 'MODULE_SHIPPING_FLAT_ZONE', 'MODULE_SHIPPING_FLAT_SORT_ORDER');
}
}
?>">

  1. delete the red font above and upload the .php file to your server..

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.

Zen Cart Certified hosting at myZenCartHost.com.

27 Apr 2011, 10:11 PM
#6
kidtwist avatar

kidtwist

New Zenner

Join Date:
May 2009
Posts:
30
Plugin Contributions:
0

Re: Blank Page At Checkout

Keen eye Kidtwist,

After using winmerge to compare the two file this is the difference below..

Quote:
function keys() {
return array('MODULE_SHIPPING_FLAT_STATUS', 'MODULE_SHIPPING_FLAT_COST', 'MODULE_SHIPPING_FLAT_TAX_CLASS', 'MODULE_SHIPPING_FLAT_TAX_BASIS', 'MODULE_SHIPPING_FLAT_ZONE', 'MODULE_SHIPPING_FLAT_SORT_ORDER');
}
}
?>">

  1. delete the red font above and upload the .php file to your server..

thanks. the funny this is i have learned all my php by using zencart.

my zens
tandjperformance.com - socaloffroad.net - barnettperformance.net - vintageoctane.com

28 Apr 2011, 4:15 PM
#7
mountbaldybrewing avatar

mountbaldybrewing

New Zenner

Join Date:
Dec 2010
Posts:
16
Plugin Contributions:
0

Re: Blank Page At Checkout

Thanks guys!

I saw the test order Kid. It took me about 4 hours yesterday and some digging to figure out where my issue was. I had to re-install a few shipping modules and delete some blank lines. I've done some programming before in the past but it's been about 10 years. Wow have things changed. :smile:

I'm glad I discovered the /cache directory though. That's super handy. Thanks Haredo. :smile:

:clap:

28 Apr 2011, 4:26 PM
#8
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,186
Plugin Contributions:
0

Re: Blank Page At Checkout

Thanks for posting the solution to your fixes...

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.

Zen Cart Certified hosting at myZenCartHost.com.

27 Aug 2011, 7:10 PM
#9
mutinyzoo avatar

mutinyzoo

New Zenner

Join Date:
Mar 2011
Location:
Pensacola, FL
Posts:
88
Plugin Contributions:
2

Re: Blank Page At Checkout

thanks for this. i had a similar issue and two blank lines at bottom of the language file (checkout_shipping) seemed to be the cause. just deleted in html editing program and re-uploaded.