Removing the last item of a cart |
[eluser]Блум[/eluser]
Hello, I just found out that if an item is the last one in the cart, I can not remove it by: Code: $data = array( Is it normal or is it a bug? Should I check if there is only one item in the cart and remove it with $this->cart->destroy()? I'm using CI 2.0.2. Thanks
[eluser]Sudz[/eluser]
Sorry by mistake it was posted. follow this http://ellislab.com/codeigniter/user-gui.../cart.html
[eluser]Блум[/eluser]
answer to the upper mistaken post ..but why? This is definitely not going to remove it.
[eluser]Блум[/eluser]
As it is written in http://ellislab.com/codeigniter/user-gui.../cart.html : Code: $data = array(
[eluser]Блум[/eluser]
Yes, it matches. Since I can increase the quantity.. and decrease it to 1.
[eluser]Sudz[/eluser]
Study this tutorial it will help you http://blog.insicdesigns.com/2010/01/bui...art-class/
[eluser]Блум[/eluser]
[quote author="Sudhakar Prajapati" date="1304437771"]Study this tutorial it will help you http://blog.insicdesigns.com/2010/01/bui...art-class/[/quote] I'm afraid it can't help me, the example in there doesn't even have a cart item removal.. and at the end is not well done.
[eluser]Блум[/eluser]
It seems like it is written for some old CI version, isn't it? And it uses some "products" db table which is not provided in this example.. Anyway I run it just to be sure, and it has absolute the same behavior, and it should, since it has nothing really different than we discussed in the previous posts. Can anyone confirm my statement, that (on CI 2.0.2) the last single element in the cart can not be removed with 'qty' => 0? |
Welcome Guest, Not a member yet? Register Sign In |