Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Last Step Checkout Problem


Guest

Recommended Posts

Support,

 

I have a clean new install of osCommerce, 2.2, using SSL, and everything installs fine. I have seen no errors until I place a test order. The entire checkout process works flawlessly until the very end. A user is presented the "Your Order Has Been Processed" screen with the surfer on it. At this point the user can check off a box to be notified if there is any updates to the product they ordered. It makes no difference if the user checks the box or not, when they hit the Continue button, instead of going back to the begining (store front), the user is sent to a page with "notify" in the URL, and the server generates a 404. Please explain what needs to be done not only to get rid of the "notify" check box, but more importantly, stop the 404 page error.

 

Thanks for any help you can provide!

Paul

Link to comment
Share on other sites

Sorry... here is the URL to my store... it is just the install products so feel free to buy all you want.. just don't expect me to ship anything!!

 

https://host160.ipowerweb.com/~zertuche/catalog/

 

Thanks again!

Paul

Hi Paul,

I'm, by no means, an expert but I have tinkered with enough OSC php to kinda know what to look for. I went through your store and checked the html source for your checkout_success page and noticed that you've got an extra string, cookie I suppose, tagged onto your Continue button. Below are strings from your HTML source and below it is mine. I've bold-ed the extra cookie info that's in your string that's missing from mine.

 

Your string from the HTML source...

 

<td align="right" class="main"><input type="image" src="includes/languages/english/images/buttons/button_continue.gif?osCsid=1ff7dea32f36087e452b357ae7799ae3" border="0" alt="Continue" title=" Continue "></td>

 

This is my string for the same line...

 

<td align="right" class="main"><input type="image" src="includes/languages/english/images/buttons/button_continue.gif" border="0" alt="Continue" title=" Continue "></td>

 

 

You may want to take a look at your checkout_success for any extra code around line 105. My code from that line is below. Check to see if yours is the same.

 

<td align="right" class="main"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>

 

____________

 

Rich Morgan

(knows enough to screw things up)

http://www.dbmicrofiber.com/estore (osC testbed)

Link to comment
Share on other sites

I am rather new to the PHP world myself... however I believe what happened is this. I believe that PHP takes the raw .php file and manipulates it based on the user, meaning, that the "view source" on my shopping cart will have an output code based on your session at the store. I have pasted below the "checkout_success.php" file as it stands on the server. Believe me, that I really appreciate your assistance, as I cannot figure out how the sever 'loses' the folder /~zertuche/ when the continue button is pressed. I also found that this same problem occurs when a user clicks the "signin" button as a returning customer. I have double and triple checked my configure.php files, and they are setup correctly. I think maybe there is a bug or something, as my SSL would not work properly had I not set the cart up right. You can see this works by going through the check out process.

 

<?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 //-->

</table></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">

<tr>

<td><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>

<?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>';

} else {

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

}

?>

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

</tr>

</table></td>

</tr>

<tr>

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

</tr>

<tr>

<td align="right" class="main"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>

</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">

<tr>

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

<tr>

<td width="50%" align="right"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>

<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>

</tr>

</table></td>

<td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>

<td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>

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

<tr>

<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>

<td width="50%"><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_DELIVERY; ?></td>

<td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>

<td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>

<td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_FINISHED; ?></td>

</tr>

</table></td>

</tr>

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

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

<!-- body_text_eof //-->

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

<!-- 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'); ?>

Link to comment
Share on other sites

Also... I have the following set to true in the "Sessions" screen in the admin:

Check SSL Session ID = True

Prevent Spider Sessions = True

 

Thanks again for your help!

Paul

Link to comment
Share on other sites

I do have a few other 'observations' (blue text = SSL)

1) At the login screen (SSL) the URL is this:

https://host160.ipowerweb.com/~zertuche/catalog/login.php?osCsid=1615e1aaa0a8258e3650f62bef82d993

 

After filling in the email / pass.. the URL goes to this:

https://host160.ipowerweb.com/catalog/index...650f62bef82d993

 

** Notice the following **

SSL was still being enabled, however the SSL path was changed by removing "/~zertuche/

 

The cart should have changed to regular webbrowsing correct? Which would have the URL:

 

http://www.zertuchegroup.com/catalog/....

 

2) The same issue happens at the checkout_sucess.php

 

?????

Paul

Link to comment
Share on other sites

You may want to take a look at your checkout_success for any extra code around line 105.  My code from that line is below.  Check to see if yours is the same.

 

<td align="right" class="main"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>

 

____________

 

Rich Morgan

(knows enough to screw things up)

http://www.dbmicrofiber.com/estore (osC testbed)

My code is like yours. But, I am still having the same problem. I get the 404 everytime go to login or complete an order (if a new account is created and an order placed.)

 

My code from checkout_success.php is posted below from the line you were referring to

 

<td align="right" class="main"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>

Link to comment
Share on other sites

I hope I can be helped. I have a perfectly clean installation of OSC. Everytime I try to log back into the account, it gives a 404 error. If someone makes a new account and actually makes it to the final checkout page, when the click the final page with the surfer, it does the same thing.

 

The before URL looks like

 

https://secureform1.dnspropagation.com/~dis...ea6208c9a2742e5

 

The after looks like

 

https://secureform1.dnspropagation.com/~dis...ea6208c9a2742e5

 

The only difference I see is the action=process

 

I am posting my cinfigure.php file below in hopes that someone can help me

 

<?php
/*
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
 define('HTTP_SERVER', 'http://www.thediscountbarn.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://secureform1.dnspropagation.com'); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'www.thediscountbarn.com');
 define('HTTPS_COOKIE_DOMAIN', 'secureform1.dnspropagation.com/~discount');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '/');
 define('DIR_WS_HTTP_CATALOG', '/');
 define('DIR_WS_HTTPS_CATALOG', '/~discount/');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', '/home/discount/public_html/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
 define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers
 define('DB_SERVER_USERNAME', 'discount_store');
 define('DB_SERVER_PASSWORD', 'undertaker');
 define('DB_DATABASE', 'discount_store');
 define('USE_PCONNECT', 'false'); // use persistent connections?
 define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
?>

Link to comment
Share on other sites

Just for additional information. I have installed these before and they worked fine. I have compared the configuration file to both of my stores located at

 

http://www.giftkountry.com and http://www.kndenterprises.com and they are no different that I can find.

 

I am at wits end on what else to try. I have tried several times to delete it and re-install it. I even deleted my entire account (since I do my hosting) and it still won't work.

Link to comment
Share on other sites

giftcountry,

 

I am happy and sad. Sad you have the same issue, but happy that it does not seem to be only my issue. I have started checking out some of the other links that bounce back and forth from SSL->non SSL and non-SSL->SSL... The logoff works, and 'continue' to creat a new account in the catagory/index.php works fine as well? Not sure, but thought it may be some sort of link problem for these two steps ( end of shopping cart, and returning customer login ). I am still searching for a fix... Hopefully support has an anwser.

 

Paul

Link to comment
Share on other sites

  • 2 months later...

As a matter a fact this is due to the redirect-function "tep_redirect" (see file "\catalog\includes\functions\general.php"). It assumes that your catalog is in the same subdirectory for NON-SSL as for SSL, where in fact it isn't.

 

I changed this function to the following and it works perfectly for me (try at your own risk ;) ):

 

  function tep_redirect($url) {
   if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page
     if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url
       $url = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . substr($url, strlen(HTTP_SERVER . DIR_WS_HTTP_CATALOG)); // Change it to SSL
     }
   }
   header('Location: ' . $url);

   tep_exit();
 }

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...