[eluser]dimis[/eluser]
I am trying to inegrate wfcart and codeigniter, so I make this model
Code:
class Client_order extends Model {
protected $cart ;
function Client_order()
{
parent::Model();
$this->cart =& $this->session->set_userdata('cart');//& $_SESSION['wfcart'];
if(!is_object($this->cart)) $this->cart = new WfCart();
}
function updateCart($a,$b,$c, $d, $e,$f,$g)
{
$this->cart->add_item($a,$b,$c, $d, $e,$f,$g);
}
function count()
{
return $this->cart->itemcount;
}
}
When I put some products at my cart even i put more than one product the count is always 1.
What is wrong?