I'm developing a webshop; i've to track the user's activities within the webshop.
I am totally new to this, i have the following in mind: I'll use a PHP script to create a XML document on the server, the name of the XML file is the ID of the PHP Session of the user. When the user browses the webshop; an AJAX function will check the content op the XML file and when users add a product to their carts an PHP function will write that information in de XML file. To make a long story short: I'll use a PHP script to create an XML file that will be used as a shoppingcart. i'll use a AJAX function to read out the information in this "shoppingcart". When the session ends or the user orders the products; the data will be stored in the mySQL database for permanent storage.
I am curious what yoou guys think about this system. I hope i've made myself understandable.
although I would probably have two tables in the database, one temp and one for completed orders... then call my database functions form a hidden frame... when a user adds something to the cart the hidden frame will update the temp table with the new item, once the user completes his order the hidden script will move the order over to the perm table for processing.
Just a different way of architecting the function, hope it stimulates your critical thinking on it :-)
Bookmarks