public function generateLoginUserOrder() { $cart = TCVM_Cart_Factory::Factory(); $user = TCVM_User_Factory::Factory(); //check login $loginUser = $user->getLoginedUser(); if (!$loginUser) { throw new Exception("sorry, only login user can generate order"); } //check cart products //check shipping $cartInfo = $cart->getCartInfo(); $userId = $loginUser['id']; $totalPrice = $cartInfo["total_price"]; return $this->_generateOrder($userId, $cartInfo, $totalPrice); }
public function init() { $this->_cart = TCVM_Cart_Factory::Factory(); }
private function _cleanCart() { $cart = TCVM_Cart_Factory::Factory(); $cart->clean(); }