Can you try to replace your function "loadCart()" by:
function loadCart($cart_id=0,$reset=false){
static $carts = array();
if($reset){
$carts = array();
$this->cart_id = 0;
$this->cart = null;
return true;
}
$this->filters = array();
$app = JFactory::getApplication();
if(empty($cart_id) || $cart_id == 0){
$this->cart_id = $app->getUserState( HIKASHOP_COMPONENT.'.'.$this->cart_type.'_id', 0, 'int' );
} else {
$this->cart_id=$cart_id;
}
if(!isset($this->cart) || is_null($this->cart)) $this->cart = new stdClass();
$this->cart->cart_id = $this->cart_id;
if(!empty($this->cart_id)){
$this->filters[]='a.cart_id = '.(int)$this->cart_id;
}else{
$user = JFactory::getUser();
if(!empty($user->id)){
$this->filters[]='a.user_id = '.(int)$user->id;
}
$session = JFactory::getSession();
if($session->getId()){
$this->filters[]='a.session_id = '.$this->database->Quote($session->getId());
}
}
$filter = "(".implode(' OR ',$this->filters).")";
if($this->cart_type){
$typeFilter='a.cart_type = '.$this->database->Quote($this->cart_type);
$filter .= " AND ".$typeFilter;
}
if(!empty($carts[$filter])){
$this->cart =& $carts[$filter];
}else{
// if new cart/wishlist, don't search for an existing entry
if($app->getUserState(HIKASHOP_COMPONENT.'.'.$this->cart_type.'_new', '0') == '0'){
//search for an existing cart if no cart entries were found
if(!empty($filter)){
$query='SELECT a.* FROM '.hikashop_table('cart').' AS a WHERE '.$filter.' ORDER BY a.cart_modified DESC LIMIT 1';
$this->database->setQuery($query);
$this->cart = $this->database->loadObject();
}else{
$this->cart = null;
}
$carts[$filter] =& $this->cart;
}
}
}
If it still doesn't work, thanks to wait for the next release of HikaShop which will be there before the end of the month.