/** * add item to cart from db ... * * @return void */ public function dbtocart() { require_once JPATH_SITE . '/components/com_redshop/helpers/cart.php'; $session = JFactory::getSession(); $cart = $session->get('cart'); $user = JFactory::getUser(); if ($user->id && !isset($cart['idx'])) { $rscarthelper = new rsCarthelper(); $rscarthelper->dbtocart(); } }