Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2010
    Posts
    16
    Plugin Contributions
    0

    help question 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 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.

  2. #2
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,197
    Plugin Contributions
    0

  3. #3
    Join Date
    Dec 2010
    Posts
    16
    Plugin Contributions
    0

    Default 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.

    [SCR]<?php
    /**
    * @package shippingMethod
    * @copyright Copyright 2003-2009 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt 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');
    }
    }
    ?>[/SCR]
    Please let me know if you have any ideas on how to fix this one. Thanks!

  4. #4
    Join Date
    May 2009
    Posts
    30
    Plugin Contributions
    0

    Default 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.
    Code:
    }
    }
    ?>">
    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

  5. #5
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,197
    Plugin Contributions
    0

    Default 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..

  6. #6
    Join Date
    May 2009
    Posts
    30
    Plugin Contributions
    0

    Default 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.

  7. #7
    Join Date
    Dec 2010
    Posts
    16
    Plugin Contributions
    0

    Default 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.

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


  8. #8
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,197
    Plugin Contributions
    0

    Default Re: Blank Page At Checkout

    Thanks for posting the solution to your fixes...

  9. #9
    Join Date
    Mar 2011
    Location
    Pensacola, FL
    Posts
    88
    Plugin Contributions
    4

    Default 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.

 

 

Similar Threads

  1. Checkout blank page during checkout - authorize.net
    By gandalfsmith in forum General Questions
    Replies: 0
    Last Post: 6 Jan 2012, 09:05 PM
  2. blank checkout page: index.php?main_page=checkout&fecaction=null
    By gibow in forum All Other Contributions/Addons
    Replies: 9
    Last Post: 13 Jul 2011, 01:30 PM
  3. Blank Checkout Page
    By Halollet in forum General Questions
    Replies: 4
    Last Post: 2 Aug 2010, 09:06 PM
  4. Replies: 1
    Last Post: 22 Jan 2009, 11:24 AM
  5. Replies: 2
    Last Post: 3 Aug 2008, 03:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg