|
Custom Cart Speed
Hi,
I'm currently using my own (very simple) shopping cart, it basically uses a string as a session variable in this format: item_id,qty;item_id,qty;etc. (So if I had 3 of item 42 and 1 of item 6 it would be "42,3;6,1".
Then I split the string at the top of every page and use an array for the rest of the page.
I started looking at classes and I love them. I want to make a cart class and use that instead (much more organized and easier to access data).
I was looking at oscommerce's script to get an idea of how they do it, but they have so many includes that it's impossible to keep track of what's what.
So my question is:
What's the fastest way to put classes into the session (I was looking at serialize and unserialize, idk if there's any alternatives because I heard they were slow)?
|