$customer_country_id = $check_country['entry_country_id']; $customer_zone_id = $check_country['entry_zone_id']; tep_session_register('customer_id'); tep_session_register('customer_type'); tep_session_register('customer_default_address_id'); tep_session_register('customer_first_name'); tep_session_register('customer_middle_name'); tep_session_register('customer_last_name'); tep_session_register('customer_country_id'); tep_session_register('customer_zone_id'); // restore cart contents $cart->restore_contents(); // restore postpone cart contents $postpone_cart->restore_contents(); // restore foreign cart contents $foreign_cart->restore_contents(); } } // calculate information path if (isset($HTTP_GET_VARS['sName'])) { $sName = $HTTP_GET_VARS['sName']; if (substr($sName, -5) == '.html') { $iName = end(explode('/', $sName)); $sName = str_replace($iName, '', $sName); $iName = substr($iName, 0, -5); } if (substr($sName, -1) == '/') { $sName = substr($sName, 0, -1); } if (substr($sName, 0, 1) == '/') { $sName = substr($sName, 1);
if (PHP_VERSION < 4) { $broken_cart = $cart; $cart = new shoppingCart(); $cart->unserialize($broken_cart); } } elseif (isset($_SESSION['xoopsUserId'])) { $tmp_cart_query = tep_db_query("select value from " . TABLE_SESSIONS . " where sesskey='" . session_id() . "'"); if (mysql_affected_rows() > 0) { $tmp_cart = tep_db_fetch_array($tmp_cart_query); tep_session_register('cart'); $cart = unserialize($tmp_cart['value']); $_SESSION['cart'] = $cart; } elseif (tep_session_is_registered('customer_id')) { tep_session_register('cart'); $cart = new shoppingCart(); $cart->restore_contents(); } else { tep_session_register('cart'); $cart = new shoppingCart(); } } else { tep_session_register('cart'); $cart = new shoppingCart(); } $expiry = time() + 1440; $tmp_session_id = session_id(); $xosC_cart = serialize($cart); tep_db_query("replace into " . TABLE_SESSIONS . " (sesskey,expiry,value)values('" . session_id() . "','" . $expiry . "','" . $xosC_cart . "')"); // include currencies class and create an instance $currencies = new currencies(); // include the mail classes