Welcome Guest, Not a member yet? Register   Sign In
Unable to add more than 10 items to cart
#1

[eluser]xbonez[/eluser]
I'm testing adding items to the shopping cart like this:

Code:
$item = $this->model->getSingleItem();

for($i = 0; $i < 11; $i++) {
    $this->cart->insert(array(
            'id' => $item->id++,
            'qty' => 1,
            'price' => 1,
            'name' => $item->title
        ));
}

However, the above loop only adds 10 items to the shopping cart. Even if I modify the loop above to run 20 times, I still get only 10 items in the cart. Is this a known bug, or am I doing something wrong?

Doing

Code:
echo count($this->cart->contents());

always shows a count of 10 or less. Never more.

I'm using CI 2.1.2. If someone can confirm they don't face this issue in a previous version, perhaps I can use the cart class from an older version of CI.


Messages In This Thread
Unable to add more than 10 items to cart - by El Forum - 07-22-2012, 08:27 PM
Unable to add more than 10 items to cart - by El Forum - 07-22-2012, 09:56 PM
Unable to add more than 10 items to cart - by El Forum - 07-22-2012, 10:11 PM
Unable to add more than 10 items to cart - by El Forum - 07-23-2012, 09:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB