Muddy_Funster Posted August 26, 2013 Share Posted August 26, 2013 fermac, can you do a mysqldump on your server (specifically the tables that this connects to)? If you can dump your tables that this script connects to then I'll have a bash at recreating the problem - and hopefully getting closer to an answer as well. Quote Link to comment Share on other sites More sharing options...
Fermac Posted August 26, 2013 Author Share Posted August 26, 2013 I dropped you a private message Muddy. Quote Link to comment Share on other sites More sharing options...
Fermac Posted August 27, 2013 Author Share Posted August 27, 2013 Hi all, thanks for your help, this has now been resolved. Quote Link to comment Share on other sites More sharing options...
Muddy_Funster Posted August 27, 2013 Share Posted August 27, 2013 could you mark the thread as answered and, if at all possible, stick in a summary of the solution for others who may have a simmilar problem in the future? Quote Link to comment Share on other sites More sharing options...
Solution Fermac Posted August 27, 2013 Author Solution Share Posted August 27, 2013 2 different sections of code needed fixed for the cart to work correctly. Firstly, the displaying of the cart was not selecting any of the items from the database that associated with the cart ID. It was re-written to select only the details needed to keep code to a minimum and also to be a lot cleaner with correct error debugging. Secondly, the updating of the cart when the "Update" button was pressed. It was taking the long way around a short simple task, it was performing updates on items that hadn't changed quantities, it was re-written as follows: - Quantities are changed to between 0-10 and update is submitted. - Script checks to see which quantities have changed (if any). - If there are changes to the quantities, the script selects which items have been changed. - It then loops through all of the quantity changes and either removes the row (if the value is 0) or updates the row (i the values is 1 or more). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.