• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Annoying problem with Cart

Anyone having a serious problem with the CI Cart library? Before it gets mentioned, yes i did search the forums for every conceivable solution to my current problem and I cant think of why products are not being inserted.

Take the code below:

$data = array(
                    'id' => "1234abcd",
                    'quantity' => 1,
                    'price' => 10.95,
                    'name' => "Test Product (small)",
                    'options' => '',


        $result = $this->cart->insert($data);

I have enabled logging and I get this error:

ERROR - 2011-05-11 10:04:20 --> The cart array must contain a product ID, quantity, price, and name.

Now this is what's weird, if I change id from small caps to uppercase, the error disappears but the item is still not being added to the cart. No errors are thrown up either. And my cart content remain empty.

Does anyone have an idea whats going on?


I really need to start having my eyes checked.... quantity should be qty...
all fixed now..

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.