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
{{ message }}
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.
// 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 ( !mysqli_num_rows($orders_query) ) {
tep_redirect(tep_href_link('shopping_cart.php'));
}
$orders = $orders_query->fetch_assoc();
$order_id = $orders['orders_id'];
if ( isset($_GET['action']) && ($_GET['action'] === 'update') ) {