Welcome Guest, Not a member yet? Register   Sign In
Undefined property: CI_Loader::$cart
#1

[eluser]qq71[/eluser]
This should be an easy one, but I can't figure it out.

I have this in autoload

Code:
$autoload['libraries'] = array('database', 'cart');

In my controller:

Code:
$data = array(
                       'id'      => '1234',
                       'qty'     => 1,
                       'price'   => 10.00,
                       'name'    => 'product name');
                
$this->cart->insert($data);


In my view:

Code:
echo $this->cart->format_number($this->cart->total());

I get the following error

Code:
Message:  Undefined property: CI_Loader::$cart

What am I missing?


Messages In This Thread
Undefined property: CI_Loader::$cart - by El Forum - 07-20-2010, 05:45 AM
Undefined property: CI_Loader::$cart - by El Forum - 07-20-2010, 10:24 AM
Undefined property: CI_Loader::$cart - by El Forum - 07-20-2010, 12:55 PM
Undefined property: CI_Loader::$cart - by El Forum - 07-21-2010, 06:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB