![]() |
Cart Class insert and update - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Cart Class insert and update (/showthread.php?tid=35062) |
Cart Class insert and update - El Forum - 10-18-2010 [eluser]Ngulo[/eluser] hi all guys i've to update or insert data into cart class. so i've write down this code: Code: /////////////IF (YES) EXIST CART IN SESSION/////////////////////// the problem is that CI can't tell me if $this->cart->contents() exist or not....or right he says to me that Cart always is not in session so this code is always true on Code: if(!$this->cart->contents()){ always true :/ !! } so everytime he recharge cart array instead :/ i'm wondering how to control if exist or not cart? :/ really thanks guys ![]() Cart Class insert and update - El Forum - 10-18-2010 [eluser]Ngulo[/eluser] ok sorry guys i just fixed this problem just using if(count($this->cart->contents())) thanks anyway. ![]() |