This is my first time browsing the CodeIgniter basket library. I have all the settings for my session, and when I go to add an item to the cart, it appears in $ this-> cart-> contents (); So far, so good. The addition is as follows:
$data = array( 'id' => 1, 'qty' => 1, 'price' => 20, 'name' => "Item1"); $rowid = $this->cart->insert($data);
But when I try to add the same element again, it does not increase the amount of this element in the basket. I imagined that doing the same insert would add another one, increasing the number of this line to 2, but it is not.
If I add another product, it appears next to the first. But again, attempts to add another one of this product do not allow to increase the score.
Of course, I don’t notice something. Perhaps you know what it is.
Thank you very much!
source share