You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// if the customer is not logged on, redirect them to the shopping cart page
if (!isset($_SESSION['customer_id'])) {
tep_redirect(tep_href_link('shopping_cart.php'));
}
$orders_query = tep_db_query("SELECT orders_id FROM orders WHERE customers_id = " . (int)$_SESSION['customer_id'] . " ORDER BY date_purchased DESC LIMIT 1");
// redirect to shopping cart page if no orders exist
if ( !tep_db_num_rows($orders_query) ) {
tep_redirect(tep_href_link('shopping_cart.php'));
}
$orders = tep_db_fetch_array($orders_query);
$order_id = $orders['orders_id'];
if ( isset($_GET['action']) && ($_GET['action'] == 'update') ) {