Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error in Checkout_success.php


FantasyArt

Recommended Posts

I am getting the following error in my checkout_success.php file. Not sure what to do to fix this or what the error is saying as new to php.

 

Could someone please help as my site is LIVE and don't need errors like this showing and turning away customers.

 

Fatal error: require() [function.require]: Failed opening required 'includes/column_left.php' (include_path='.:/usr/lib64/php:/usr/lib/php:/usr/share/pear') in /home5/fantata1/public_html/store/checkout_success.php on line 72

 

 

Need help asap please.

Link to comment
Share on other sites

@@DunWeb

 

Am using 2.3.3 and tried to install the Consolidated Login with Guest Checkout for 2.3.1 v1.0 but not successfully so reverted back to the files that were there originally or so I thought.

 

Will post the entire code if that helps.

 

 

<?php

/*

$Id: checkout_success.php,v 1.49 2003/06/09 23:03:53 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

 

 

// if the customer is not logged on, redirect them to the shopping cart page

if (!tep_session_is_registered('customer_id')) {

tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));

}

 

if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'update')) {

$notify_string = 'action=notify&';

$notify = $HTTP_POST_VARS['notify'];

if (!is_array($notify)) $notify = array($notify);

for ($i=0, $n=sizeof($notify); $i<$n; $i++) {

$notify_string .= 'notify[]=' . $notify[$i] . '&';

}

if (strlen($notify_string) > 0) $notify_string = substr($notify_string, 0, -1);

 

tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));

}

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_SUCCESS);

 

$breadcrumb->add(NAVBAR_TITLE_1);

$breadcrumb->add(NAVBAR_TITLE_2);

 

$global_query = tep_db_query("select global_product_notifications from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "'");

$global = tep_db_fetch_array($global_query);

 

if ($global['global_product_notifications'] != '1') {

$orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where customers_id = '" . (int)$customer_id . "' order by date_purchased desc limit 1");

$orders = tep_db_fetch_array($orders_query);

 

$products_array = array();

$products_query = tep_db_query("select products_id, products_name from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$orders['orders_id'] . "' order by products_name");

while ($products = tep_db_fetch_array($products_query)) {

$products_array[] = array('id' => $products['products_id'],

'text' => $products['products_name']);

}

}

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

 

<!-- body //-->

<table border="0" width="100%" cellspacing="3" cellpadding="3">

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

</td>

<!-- body_text //-->

<td width="100%" valign="top"><?php echo tep_draw_form('order', tep_href_link(FILENAME_CHECKOUT_SUCCESS, 'action=update', 'SSL')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">

 

<? tep_draw_heading_top();?>

<? tep_draw_heading_top_1();?>

<tr>

<table border="0" width="100%" cellspacing="4" cellpadding="2">

<tr>

<td valign="top"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE); ?></td>

<td valign="top" class="main"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?><div align="center" class="pageHeading"><?php echo HEADING_TITLE; ?></div><br><?php echo TEXT_SUCCESS; ?><br><br>

<?

if (GUEST_ON == 'true') {

//delete the temporary account

tep_db_query("delete from " . TABLE_CUSTOMERS . " where guest_flag = '1'");

}

?>

<?php

if ($guest_account == false) { // not a guest Account

if ($global['global_product_notifications'] != '1') {

echo TEXT_NOTIFY_PRODUCTS . '<br><p class="productsNotifications">';

 

$products_displayed = array();

for ($i=0, $n=sizeof($products_array); $i<$n; $i++) {

if (!in_array($products_array[$i]['id'], $products_displayed)) {

echo tep_draw_checkbox_field('notify[]', $products_array[$i]['id']) . ' ' . $products_array[$i]['text'] . '<br>';

$products_displayed[] = $products_array[$i]['id'];

}

}

 

echo '</p>';

} else {

echo TEXT_SEE_ORDERS . '<br><br>' . TEXT_CONTACT_STORE_OWNER;

}

} else { // guest accounts action

echo TEXT_GUEST_ORDERS . '<br><br>' . TEXT_CONTACT_STORE_OWNER;

} // guest account end

?>

<h3><?php echo TEXT_THANKS_FOR_SHOPPING; ?></h3></td>

</tr>

</table></td>

</tr>

<tr>

<?php echo tep_draw_infoBox_top();?>

<?php echo tep_draw_infoBox_bottom();?>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<?php echo tep_draw_infoBox_top();?>

<?php echo tep_draw_infoBox_bottom();?>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

</table></td>

</tr>

<?php if (DOWNLOAD_ENABLED == 'true') include(DIR_WS_MODULES . 'downloads.php'); ?>

<?php tep_draw_heading_bottom_1();?>

 

<?php tep_draw_heading_bottom();?>

</table></form></td>

<!-- body_text_eof //-->

<td class="col_right">

<!-- right_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

<!-- right_navigation_eof //-->

</table></td>

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

<br>

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Hope that helps with a solution as I said the site is LIVE and don't want to have errors running for long to avoid customers moving away from the site.

 

Thanks for replying

Link to comment
Share on other sites

@@FantasyArt

 

I suggest you revert the checkout_success.php file to your backup copy. Also, as a side note. There is NO such thing as Purchasing without an account. True that the customers information may not be recorded into the database and they may not be asked for a password, but they still have to enter ALL of their information to complete the transaction so it doesn't save any of the customers time.

 

 

 

Chris

Link to comment
Share on other sites

@@DunWeb

 

Unfortunately I have gotten rid of all my backup files that I had. I only found this problem today as I was helping a customer out with their purchase.

 

Is there any way of editing the code here to make it work properly?

 

Appreciate all the help you are providing

Link to comment
Share on other sites

Here you go.....

<?php
/*
$Id$
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2010 osCommerce
Released under the GNU General Public License
*/
require('includes/application_top.php');
// if the customer is not logged on, redirect them to the shopping cart page
if (!tep_session_is_registered('customer_id')) {
tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
}
if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'update')) {
$notify_string = '';
if (isset($HTTP_POST_VARS['notify']) && !empty($HTTP_POST_VARS['notify'])) {
 $notify = $HTTP_POST_VARS['notify'];
 if (!is_array($notify)) {
 $notify = array($notify);
 }
 for ($i=0, $n=sizeof($notify); $i<$n; $i++) {
 if (is_numeric($notify[$i])) {
	 $notify_string .= 'notify[]=' . $notify[$i] . '&';
 }
 }
 if (!empty($notify_string)) {
 $notify_string = 'action=notify&' . substr($notify_string, 0, -1);
 }
}
tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));
}
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_SUCCESS);
$breadcrumb->add(NAVBAR_TITLE_1);
$breadcrumb->add(NAVBAR_TITLE_2);
$global_query = tep_db_query("select global_product_notifications from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "'");
$global = tep_db_fetch_array($global_query);
if ($global['global_product_notifications'] != '1') {
$orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where customers_id = '" . (int)$customer_id . "' order by date_purchased desc limit 1");
$orders = tep_db_fetch_array($orders_query);
$products_array = array();
$products_query = tep_db_query("select products_id, products_name from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$orders['orders_id'] . "' order by products_name");
while ($products = tep_db_fetch_array($products_query)) {
 $products_array[] = array('id' => $products['products_id'],
						 'text' => $products['products_name']);
}
}
require(DIR_WS_INCLUDES . 'template_top.php');
?>
<h1><?php echo HEADING_TITLE; ?></h1>
<?php echo tep_draw_form('order', tep_href_link(FILENAME_CHECKOUT_SUCCESS, 'action=update', 'SSL')); ?>
<div class="contentContainer">
<div class="contentText">
<?php echo TEXT_SUCCESS; ?>
</div>
<div class="contentText">
<?php
if ($global['global_product_notifications'] != '1') {
echo TEXT_NOTIFY_PRODUCTS . '<br /><p class="productsNotifications">';
$products_displayed = array();
for ($i=0, $n=sizeof($products_array); $i<$n; $i++) {
 if (!in_array($products_array[$i]['id'], $products_displayed)) {
 echo tep_draw_checkbox_field('notify[]', $products_array[$i]['id']) . ' ' . $products_array[$i]['text'] . '<br />';
 $products_displayed[] = $products_array[$i]['id'];
 }
}
echo '</p>';
}
echo TEXT_SEE_ORDERS . '<br /><br />' . TEXT_CONTACT_STORE_OWNER;
?>
</div>
<div class="contentText">
<h3><?php echo TEXT_THANKS_FOR_SHOPPING; ?></h3>
</div>
<?php
if (DOWNLOAD_ENABLED == 'true') {
include(DIR_WS_MODULES . 'downloads.php');
}
?>
<div class="buttonSet">
<span class="buttonAction"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', null, 'primary'); ?></span>
</div>
</div>
</form>
<?php
require(DIR_WS_INCLUDES . 'template_bottom.php');
require(DIR_WS_INCLUDES . 'application_bottom.php');
?>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...