I'm receiving this error on the checkout page: "There was an error loading the shipping options, please try again. (You may need to refresh your browser.)"
Created: Mar 16, 2009 04:23 PM
Last Modified: Aug 09, 2011 02:10 AM
3
Ratings
|
This error is generally caused by either a PHP headers error, a cannot redeclare a function error, a PHP file containing whitespace or lines after the final ?>, or an installation error.
Go to admin/logs.php and view the PHP errors that occurred during the testing of the one page checkout. If using X-Cart 4.0.x you will need to view the x-errors_php.txt file in the <xcart_dir>/log directory on your server.
If you see any of the following errors make the listed changes.
1. Fatal error: Cannot redeclare sort_shipping()
Make the following edit:
shipping/shipping.php
Find the code near line 39:
After add:
Find this code near line 273 and DELETE it:
2. Warning: Cannot modify header information - headers already sent...
Please copy then entire error message into the knowledgebase search engine to view any matching articles: http://www.alteredcart.com/support.php?section=knowledgebase
-----
3. No errors listed
If there aren't any errors listed related to the One Page Checkout you will need to check the PHP files that were edited during the installation and make sure there aren't any spaces or lines after the final ?>. You might also need to upload your .php files using binary mode if this problem occurs again. The source of the problem is likely one of the following files (but can be caused by others):
/init.php
and
/modules/Checkout_One/checkout_one_init.php
This is a conflict between Windows and Linux line breaks. Your FTP client will upload the file in ASCII mode and add double line breaks to the file.
For more information on finding this extra whitespace see this article.
----
One other cause can be missing this installation step to the /init.php file (this is a step from the original installation instructions):
Find this code near line 595:
Immediately BEFORE insert this code:
Go to admin/logs.php and view the PHP errors that occurred during the testing of the one page checkout. If using X-Cart 4.0.x you will need to view the x-errors_php.txt file in the <xcart_dir>/log directory on your server.
If you see any of the following errors make the listed changes.
1. Fatal error: Cannot redeclare sort_shipping()
Make the following edit:
shipping/shipping.php
Find the code near line 39:
x_load('cart');
After add:
function sort_shipping($a, $b) {
return $a["rate"] - $b["rate"];
}
Find this code near line 273 and DELETE it:
function sort_shipping($a, $b) {
return $a["rate"] - $b["rate"];
}
2. Warning: Cannot modify header information - headers already sent...
Please copy then entire error message into the knowledgebase search engine to view any matching articles: http://www.alteredcart.com/support.php?section=knowledgebase
-----
3. No errors listed
If there aren't any errors listed related to the One Page Checkout you will need to check the PHP files that were edited during the installation and make sure there aren't any spaces or lines after the final ?>. You might also need to upload your .php files using binary mode if this problem occurs again. The source of the problem is likely one of the following files (but can be caused by others):
/init.php
and
/modules/Checkout_One/checkout_one_init.php
This is a conflict between Windows and Linux line breaks. Your FTP client will upload the file in ASCII mode and add double line breaks to the file.
For more information on finding this extra whitespace see this article.
----
One other cause can be missing this installation step to the /init.php file (this is a step from the original installation instructions):
Find this code near line 595:
$smarty->assign_by_ref("active_modules", $active_modules);
Immediately BEFORE insert this code:
// Checkout One :: www.alteredcart.com //
if ($active_modules['Checkout_One'])
include $xcart_dir."/modules/Checkout_One/checkout_one_init.php";
// End Checkout One //
Still Have Questions?
If you are unable to find a solution in the knowledgebase please open a support ticket for a personal response from the support desk.
Related Articles
- How do I find files that may have extra line breaks or whitespace after the ?> in a PHP file?
When a PHP script has extra whitespace after the final ?> a headers errors can result. In the normal operation of your X-Cart store this can cause a message to display when adding products to the cart,... - I've contacted X-Cart tech support about a problem and they say the problem is in the One Page Checkout. How can I tell what is an X-Cart issue vs. a One Page Checkout issue?
To determine if the X-Cart code is the cause, or if the One Page Checkout is the cause, you can switch back and forth between the default multi-page checkout and the One Page checkout for your... - Special Instructions when On Sale coupons and the 4.4.x X-Cart internal One Page Checkout
The following edits are required if you are using the internal X-Cart One Page Checkout and you want to allow customers to enter and remove On Sale coupons on this page. If using an On Sale version prior to...
Rate or comment on this article
Rate This Article (Select a star)



Add Comment