Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted (edited)

Hello,

I believe that I installed this contribution correctly.

However, upon checkout completion, when I return to the /catalog/checkout_success.php page, I receive the following error:

 

Parse error: parse error, unexpected '<' in /home/dumbdo2/public_html/catalog/checkout_success.php on line 12

 

The error message dissapears when I remove the following line from my /catalog/checkout_success.php page, even though the instructions tell me to add it:

<?PHP include "check1.php"; ?>

Ok, I know someone out there is going to say: "Hey, check1.php is an arbitrary default file name, which needs to be changed." I know, its changed, and for security reasons I prefer not to give the actual filename.

So The fact of the matter is, I do not know where in my checkout_success.php page to add this bit of code?

Could some one tell me? The instructions arent all that clear for me. It just states that "to reward your affiliates you need to add the following line to the top of your order confirmation page:( is ithis refering to checkout_success.php or checkout_confirmation_php?)

<?PHP include "check1.php"; ?>"

 

It does not state where at the top. I tried above the: require('includes/application_top.php'; code, below it, AHHH! >_<

 

Further the instruction state that "By adding this code to the page after an order has been submitted, you prevent affiliates from being awarded from people just going to the order page." But the instructions stated earlier that "To reward your affiliates you need to add the following line to the top of your order confirmation page:

<?PHP include "check1.php"; ?>"

 

Allright, Im getting confused by this. Is correct file checkout_confirmation.php the for placement of the line <?PHP include "check1.php"; ?> and not checkout_success.php?

Even if so, when I place the code there, I get sets of errors. And it wouldnt make sense to do it in the first place since the file checkout_success.php is the return file upon checkout.

 

Please Advise,

 

John

Edited by jcisar
Posted

<?PHP include "check1.php"; ?>"

has a " at the end, try removing that portion so it is like:

<?PHP include "check1.php"; ?>

Posted
Hello,

I believe that I installed this contribution correctly.

However, upon checkout completion, when I return to the /catalog/checkout_success.php page,  I receive the following error:

 

Parse error: parse error, unexpected '<' in /home/dumbdo2/public_html/catalog/checkout_success.php on line 12

 

The error message dissapears when I remove the following line from my /catalog/checkout_success.php page, even though the instructions tell me to add it:

<?PHP include "check1.php"; ?>

Ok, I know someone out there is going to say: "Hey, check1.php is an arbitrary default file name, which needs to be changed." I know, its changed, and for security reasons I prefer not to give the actual filename.

So The fact of the matter is, I do not know where in my checkout_success.php page to add this bit of code?

Could some one tell me?  The instructions arent all that clear for me. It just states that "to reward your affiliates you need to add the following line to the top of your order confirmation page:( is ithis refering to checkout_success.php or checkout_confirmation_php?)

  <?PHP include "check1.php"; ?>" 

 

It does not state where at the top. I tried above the: require('includes/application_top.php'; code, below it, AHHH! >_<

 

Further the instruction state that "By adding this code to the page after an order has been submitted, you prevent affiliates from being awarded from people just going to the order page."  But the instructions stated earlier that "To reward your affiliates you need to add the following line to the top of your order confirmation page:

  <?PHP include "check1.php"; ?>"

 

Allright, Im getting confused by this.  Is correct file checkout_confirmation.php the for placement of the line  <?PHP include "check1.php"; ?>  and not checkout_success.php?

Even if so, when I place the code there, I get sets of errors. And it wouldnt make sense to do it in the first place since the file checkout_success.php is the return file upon checkout.

 

Please Advise,

 

John

Im clueless. I overwrote the stand-alone <?PHP tag found at the very begining of checkout_success.php with <?PHP include "check1.php"; ?> and was buried in error mesages upon return to /catalog/checkout_success.php durning a test credit card purchase transaction. I recieved these error messages. I modifies the sensitive parts for security reasons. What does this all mean?

 

Warning: main(censored.php): failed to open stream: No such file or directory in /home/CENSORED/public_html/catalog/checkout_success.php on line 1

 

Warning: main(censored.php): failed to open stream: No such file or directory in /home/CENSORED/public_html/catalog/checkout_success.php on line 1

 

Warning: main(): Failed opening 'censored.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/CENSORED/public_html/catalog/checkout_success.php on line 1

/* $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 */

Warning: main(censored.php): failed to open stream: No such file or directory in /home/CENSORED/public_html/catalog/checkout_success.php on line 12

 

Warning: main(censored.php): failed to open stream: No such file or directory in /home/CENSORED/public_html/catalog/checkout_success.php on line 12

 

Warning: main(): Failed opening 'censored.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/censored/public_html/catalog/checkout_success.php on line 12

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_DEFAULT)); } 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)); // Added a check for a Guest checkout and cleared the session - 030411 if (tep_session_is_registered('noaccount')) { tep_session_destroy(); tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL')); } else { tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string, 'SSL')); } } 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']); } } // PWA: Added a check for a Guest checkout and cleared the session - 030411 v0.71 if (tep_session_is_registered('noaccount')) { $order_update = array('purchased_without_account' => '1'); tep_db_perform(TABLE_ORDERS, $order_update, 'update', "orders_id = '".$orders['orders_id']."'"); // tep_db_query("insert into " . TABLE_ORDERS . " (purchased_without_account) values ('1') where orders_id = '" . (int)$orders['orders_id'] . "'"); tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . tep_db_input($customer_id) . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . tep_db_input($customer_id) . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . tep_db_input($customer_id) . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . tep_db_input($customer_id) . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . tep_db_input($customer_id) . "'"); tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where customer_id = '" . tep_db_input($customer_id) . "'"); tep_session_destroy(); } ?>

Warning: main(DIR_WS_INCLUDESheader.php): failed to open stream: No such file or directory in /home/CENSORED/public_html/catalog/checkout_success.php on line 87

 

Warning: main(DIR_WS_INCLUDESheader.php): failed to open stream: No such file or directory in /home/CENSORED/public_html/catalog/checkout_success.php on line 87

 

Fatal error: main(): Failed opening required 'DIR_WS_INCLUDESheader.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/CENSORED/public_html/catalog/checkout_success.php on line 87

Posted
Hello,

I believe that I installed this contribution correctly.

However, upon checkout completion, when I return to the /catalog/checkout_success.php page,  I receive the following error:

 

Parse error: parse error, unexpected '<' in /home/dumbdo2/public_html/catalog/checkout_success.php on line 12

 

The error message dissapears when I remove the following line from my /catalog/checkout_success.php page, even though the instructions tell me to add it:

<?PHP include "check1.php"; ?>

Ok, I know someone out there is going to say: "Hey, check1.php is an arbitrary default file name, which needs to be changed." I know, its changed, and for security reasons I prefer not to give the actual filename.

So The fact of the matter is, I do not know where in my checkout_success.php page to add this bit of code?

Could some one tell me?  The instructions arent all that clear for me. It just states that "to reward your affiliates you need to add the following line to the top of your order confirmation page:( is ithis refering to checkout_success.php or checkout_confirmation_php?)

  <?PHP include "check1.php"; ?>" 

 

It does not state where at the top. I tried above the: require('includes/application_top.php'; code, below it, AHHH! >_<

 

Further the instruction state that "By adding this code to the page after an order has been submitted, you prevent affiliates from being awarded from people just going to the order page."  But the instructions stated earlier that "To reward your affiliates you need to add the following line to the top of your order confirmation page:

  <?PHP include "check1.php"; ?>"

 

Allright, Im getting confused by this.  Is correct file checkout_confirmation.php the for placement of the line  <?PHP include "check1.php"; ?>  and not checkout_success.php?

Even if so, when I place the code there, I get sets of errors. And it wouldnt make sense to do it in the first place since the file checkout_success.php is the return file upon checkout.

 

Please Advise,

 

John

 

I typed it in the example by accident, but it isnt actually in the file.

Thanks

Posted
post from line 8 to 16 here

 

Lines 8-16 from my checkout_success.php?

If so, then here it is:

 

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

<?PHP include "censored.php"; ?>

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')) {

  • 2 months later...
Posted
Lines 8-16 from my checkout_success.php?

If so, then here it is:

  Copyright ? 2003 osCommerce

 

  Released under the GNU General Public License

*/

  <?PHP include "censored.php"; ?>

  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')) {

 

This placement issue varies from install to install, as for placement into *_success.php or *_confirmation.php, this is a matter of personal choice, either will work the same.

 

the <?php include_once 'check1.php' ; ?> call should be placed in at the line above the HTML code and just after the osCommerce close PHP tag (?>) so it would read like:

 

?>

<?php include_once 'check1.php' ; ?>

HTML section

 

I could also provide support via the email as stated in the readme.txt file.

  • 4 weeks later...
Posted (edited)

Thanks for the great mod! :D

Just curious if I need to change any settings if my site is on a shared SSL, or if this only tracks clicks to the main page (which I assumed it did, but want to make sure).

Edited by needs_a_nap

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...