[FLA] shopping cart data
- Started
- Last post
- 9 Responses
- Timson
hi,
i'm planning to build a shopping cart in flash and was wondering what would be the best way to keep track of the items inside it. Undo already told me of using a multidimensional array but now i just read about the shared object. that looks particularly handy as the user will leave the site for it's payment and then gets send back for a detailed overview of his payment.
i'm just looking for a bit more insight or helpfull tips, thanks.
- st33d0
http://www.kirupa.com/developer/…
Hrmm, seems a pretty cool tool. See if it operates like a general purpose flash object. As in
user.data.shopList = new Array();
If that works then you can combine Undo's method with this Flash cookie.
- UndoUndo0
thats a good idea if the user leaves yr site to pay and then returns. The only problem with shared objects and cookies is that they can be read or "borrowed" by unscrupulous users. a more secure way would be to store an identifier in the cookie and the shopping cart details in a db in you have php and database skills. this could also be useful for shopping history etc.
- st33d0
I second ^
- Timson0
thanks, but an extra database isn't an option (no budget). so i'll have to stick with flash only.
so you guys would suggest a combination of shared object and a multi array?
or would one of these two methods be sufficient, if so, wich would you suggest? shared object or array?
- UndoUndo0
I would think of it like this. the array is the carrier and the shared object is storage.
The array carries the users data in flash, whilst they browse itema, change quantities in the cart, add and remove items...etc. at the point the user decides they will 'check out' the cookie is then used to store this definitive info which is picked up on their return to the site. this way you dont need to keep writing info to the SO and retrieving it.
- Timson0
thanks, that's pretty close on how i was planning to do it. and now you've told me, i'm sure it will also be the best way to do it. from my point of view of course :)
- UndoUndo0
of course :)
- jpea0
to resurrect the thread, do you know if it's possible to read data from a SO that was created and written to on another domain? i'm trying to figure out if i can read it once the site redirects into https, but as far as i can tell, it can only read from the domain that created it, correct?
- caseyc0
I'm pretty sure you can't read a SO from another domain, which made me wonder when Undo said:
"The only problem with shared objects and cookies is that they can be read or "borrowed" by unscrupulous users."
Undo - Do you mean users on the local machine? Or have you seen a way to exploit it through the web?