miracle_potential Posted May 27, 2008 Share Posted May 27, 2008 Hey guys, Got a basket on my shop, but when a user hits add to basket I want the basket (iframe) to refresh and the only way I can think of doing this is AJAX. But I'm not sure about sessions and AJAX is there any other way of doing this or can someone help me with the AJAX and sessions. The baskets contents are all stored as session variables so I wouldnt have thought it be this hard to do v.v Quote Link to comment Share on other sites More sharing options...
amites Posted May 27, 2008 Share Posted May 27, 2008 only way I've come up with to work with AJAX and sessions gets a little complex, the idea being post the SESSION ID to the page (run it through an encryption engine of some sort) and then call the session ID and load the values simple concept tedious implementation, if anyone else has a better way I'd love to hear it, as I've been tinkering with ways to implement this for a while Quote Link to comment Share on other sites More sharing options...
acidglitter Posted May 27, 2008 Share Posted May 27, 2008 what i'm doing is i just have a link on the product page and when you click it it calls up a javascript function. then that function uses ajax to load a php page that adds the product to their "basket" (really just a mysql table) then updates the php session to say theres another item in the basket on the link its like onclick="addtobasket(product id number, price)" 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.