Javascript + PHP/MySQL powered online cart
A very simple test of ajax and PHP powered cart, for my personal website.
Cart content is stored in PHP sessions, and its display is live-updated with AJAX.
I used Prototype for AJAX calls, guess I could also use it for other things to reduce the code... like with getElelemtByClassName() or something...).
- Javascript only for now, but making it non-javascript-browsers-OK would be (and will be) very easy.
- Only one item of each in cart.
- No check-out, nothing, just the cart.
- No taxes, sending fees, etc. for now (guess I'll add this when I'll do the checkout thing)
- No "one-item-page", no categories, no tags, etc.
The related-post in my blog is here (in french).
The cart
-
Your cart is empty.
-
Total:
0 €
The shop contents
-
An object
35 €
-
Another object
35 €
-
Something
50 €
-
Stuff
15 €
-
A thing
100 €
-
Another thing
100 €
-
Something
567 €
-
Another item
958 €