function reset_checkout_cart_session() { global $cart; $cart->reset(true); olc_session_unregister('sendto'); olc_session_unregister('billto'); olc_session_unregister('shipping'); olc_session_unregister('payment'); olc_session_unregister('comments'); olc_session_unregister('PayPal_osC'); if (!class_exists('order_total')) { include_once DIR_WS_CLASSES . 'order_total.php'; } if (is_callable(array('order_total', 'clear_posts'))) { //Looks like CCGV installed global $order_total_modules; if (!is_object($order_total_modules)) { $order_total_modules = new order_total(); } $order_total_modules->clear_posts(); //ICW ADDED FOR CREDIT CLASS SYSTEM } }
// db wrapper require_once $attributemanager_classes_dir . 'db' . $class_php; // instant class require_once $attributemanager_classes_dir_attributemanager . 'instant' . $class_php; // atomic class require_once $attributemanager_classes_dir_attributemanager . 'atomic' . $class_php; // security class require_once $attributemanager_classes_dir . 'stopdirectaccess' . $class_php; // check that the file is allowed to be accessed stopdirectaccess::checkAuthorisation(AM_SESSION_VALID_INCLUDE); // construct the attributemanager classess and/or session variable if (!is_numeric($_GET['products_id']) || AM_ATOMIC_PRODUCT_UPDATES) { // first time visiting the page - delete the session var and start again if ('new_product' == $_GET['pageAction'] && !isset($_GET['amAction'])) { if (olc_session_is_registered(AM_SESSION_VAR_NAME)) { olc_session_unregister(AM_SESSION_VAR_NAME); unset(${AM_SESSION_VAR_NAME}); } } // register the session if its not registered if (!olc_session_is_registered(AM_SESSION_VAR_NAME)) { // declare the var (not nessessary) ${AM_SESSION_VAR_NAME} = array(); // start a new session olc_session_register(AM_SESSION_VAR_NAME); } //$attributemanager =& new attributemanagerAtomic(${AM_SESSION_VAR_NAME}); $attributemanager = new attributemanagerAtomic(${AM_SESSION_VAR_NAME}); } else { //$attributemanager =& new attributemanagerInstant($_GET['products_id']); $attributemanager = new attributemanagerInstant($_GET['products_id']);