![]() |
cart library sometimes works, sometimes not - 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 library sometimes works, sometimes not (/showthread.php?tid=37902) |
cart library sometimes works, sometimes not - El Forum - 01-24-2011 [eluser]penta997[/eluser] Hello. I'm using a cart library to get orders in my web bookstore. But when I call a addCart function on one of my book it's works, but not all the time. Please, help There is my model function: Code: function get_books_by_ID($id) Controller function: Code: function addCards() And part of view Code: <tr> and index view, where I displaing a cart total and total_items Code: <tr> cart library sometimes works, sometimes not - El Forum - 01-24-2011 [eluser]cideveloper[/eluser] Couple of things 1) I assume there is only one book per BOOK_ID so you shouldn't need to do the loop 2) you don't need the first line in addCards function Code: function addCards($id=1){ view Code: <tr> 3) what is the datatype for the user_data field in the ci_sessions table where session data is stored. cart library sometimes works, sometimes not - El Forum - 01-24-2011 [eluser]penta997[/eluser] Where can i find this info about ci sessions table? cart library sometimes works, sometimes not - El Forum - 01-24-2011 [eluser]cideveloper[/eluser] However you created the database. e.g. phpmyadmin, etc cart library sometimes works, sometimes not - El Forum - 01-24-2011 [eluser]penta997[/eluser] BOOK_ID int(10), BOOK_Title varchar(98), BOOK_Price decimal(5,2), but it is a data which I displaing, but temporary I don't save data nowhere. I will sav data in Order table, later when user check items and accept his address and ect. cart library sometimes works, sometimes not - El Forum - 01-25-2011 [eluser]penta997[/eluser] the carts still works random. do you have any idea why?? Maybe is something wrong with sesstion configuration or cart configuration?? |