snapshot) > 0) {
}else{
tep_session_unregister('promo');
tep_redirect(tep_href_link(FILENAME_DEFAULT));
}
$error = false;
if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) {
$promo_code = tep_db_prepare_input($HTTP_POST_VARS['promo_code']);
// Check if promo exists
$check_customer_query = tep_db_query("select promo , customers_cancelled from " . TABLE_CUSTOMERS . " where promo = '" . tep_db_input($promo_code) . "'"); //rasul added customers_cancelled 8/17
if (!tep_db_num_rows($check_customer_query)) {
$error = true;
} else {
$check_customer = tep_db_fetch_array($check_customer_query);
// Check if customer was cancelled. Rasul added 8/17
if($check_customer['customers_cancelled']){
tep_redirect(tep_href_link(FILENAME_CANCEL));
}
// don't know what this is for
if (SESSION_RECREATE == 'True') {
tep_session_recreate();
}
$promo = $check_customer['promo'];
tep_session_register('promo');
// restore cart contents
//$cart->restore_contents();
if (sizeof($navigation->snapshot) > 0) {
$origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);
$navigation->clear_snapshot();
tep_redirect($origin_href);
} else {
tep_session_unregister('promo');
tep_redirect(tep_href_link(FILENAME_DEFAULT));
}
}
}
if ($error == true) {
$messageStack->add('promo_login', TEXT_PROMO_ERROR);
}
$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_PROMO_LOGIN, '', 'SSL'));
?>
>
|
|
|
size('promo_login') > 0) {
?>
output('promo_login'); ?> |
|
count_contents() > 0) {
?>
|
|
|
|
|