Hello. I am re-writing a Classic ASP website in PHP, which I am new to, but learning fast. I have got a long way with the project but I have now hit a problem which I have been trying to overcome for some days, but everything I try seems to run into a brick wall. It's like this...
I have a page 'list-content.php' which extracts a list of music titles from a database and displays them in a list, together with an 'add to cart' button for each one.
On the page I have a cart icon which updates itself and displays a number which is the number of items in the cart. Clicking the icon opens the 'cart.php' page in the same window, thereby closing the 'list-content' page. A button on the 'cart.php' page re-opens 'list-content' again.
Items which are added to the cart are stored in a database table along with a unique order number, and the plan is to delete the order once it has been paid for (via PayPal) and processed. Here is the problem:
I need to store the order details on the users device, so that if the user closes the browser without completing the order he can come back to it at a later stage and the cart will still be able to pick up the details from the database. I have tried numerous ways to do this. I'm sure it can be done because I have experienced only recently a well known DIY store's website which still had the details of what I had placed in my cart when I looked some days later.
This is causing massive brain-ache and if anyone can show me how to do this I promise I will love you forever!
I have a page 'list-content.php' which extracts a list of music titles from a database and displays them in a list, together with an 'add to cart' button for each one.
On the page I have a cart icon which updates itself and displays a number which is the number of items in the cart. Clicking the icon opens the 'cart.php' page in the same window, thereby closing the 'list-content' page. A button on the 'cart.php' page re-opens 'list-content' again.
Items which are added to the cart are stored in a database table along with a unique order number, and the plan is to delete the order once it has been paid for (via PayPal) and processed. Here is the problem:
I need to store the order details on the users device, so that if the user closes the browser without completing the order he can come back to it at a later stage and the cart will still be able to pick up the details from the database. I have tried numerous ways to do this. I'm sure it can be done because I have experienced only recently a well known DIY store's website which still had the details of what I had placed in my cart when I looked some days later.
This is causing massive brain-ache and if anyone can show me how to do this I promise I will love you forever!