Welcome Guest, Not a member yet? Register   Sign In
Annoying problem with Cart
#1

[eluser]eokorie[/eluser]
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:

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



        //var_dump($data);

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

I have enabled logging and I get this error:

Code:
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?

Thanks


Messages In This Thread
Annoying problem with Cart - by El Forum - 05-11-2011, 04:41 AM
Annoying problem with Cart - by El Forum - 05-11-2011, 07:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB