October 14th, 2009, 04:45 AM
Webshop user tracking
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.
November 19th, 2009, 06:23 PM
Re: Webshop user tracking
that system should work...
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 :-)
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.