Jeg bruger oscommerce creloaded 6.15. Jeg har sat linierne ind der hvor jeg troede de skulle ind men synes ikke det virker.
<?php
/*
$Id: checkout_success.php,v 1.3 2004/09/25 14:36 DMG Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
require('includes/application_top.php');
// begin PayPal_Shopping_Cart_IPN 2.8 (DMG)
require(DIR_WS_MODULES . 'payment/paypal/classes/paypal_order.class.php');
// end PayPal_Shopping_Cart_IPN
// 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);
// BOF: daithik change for PWA// DMG Merge w. Paypal IPN 2.8
if (tep_session_is_registered('noaccount')) {
tep_session_destroy();
tep_redirect(tep_href_link(FILENAME_DEFAULT, '$notify_string', 'NONSSL'));
}else{
tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));
}
} else if ((isset($HTTP_GET_VARS['action']) && $HTTP_GET_VARS['action'] == 'success')) {
//begin PayPal_Shopping_Cart_IPN
paypal_order::reset_checkout_cart_session();
}
//}
//end PayPal_Shopping_Cart_IPN
// EOF: daithik change for PWA
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']);
}
}
// BOF: daithik change for PWA
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) . "'");
if (!tep_session_is_registered('noaccount')){
tep_session_destroy();
}
}
// EOF: daithik change for PWA
$content = CONTENT_CHECKOUT_SUCCESS;
$javascript = 'popup_window_print.js';
require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/' . TEMPLATENAME_MAIN_PAGE);
require(DIR_WS_INCLUDES . 'application_bottom.php');
// we dont need payment information anymore JHK START
tep_session_unregister('payment');
tep_session_unregister('cc_transactionid');
// we dont need payment information anymore JHK END
?>
<?php
// Start Affiliate Program - Sales Tracking
echo '<img src="http://www.partner-ads.com/dk/leadtrack.php?programid=xxx&type=salg&ordrenummer=' . $orders_id . '&varenummer=alle&antal=1&omprsalg=' . $orders_total . '" width=1 height=1>';
tep_session_unregister('orders_total');
tep_session_unregister('orders_id');
// End Affiliate Program - Sales Tracking
?>
<p> </p>