Like many here, i am a novice. i have read alot and gone through tutorials and actually have a good grasp of how functions, arrays, DOM and so on work.
But i just can't put all the elements i have learn't together to create my shopping cart site.
I’ll give you an over view of what I have to do, then what’s trouble me:
• Display of a few toys on a single web page with their name, image and price and a drop down menu to allow the user to select a desired quantity of each toy.
• AddToCart() function should do the following: i) Store the name of each toy, quantity and sum (calculated by quantity*price) in three global arrays name,quantity and sum.
• The ViewCart() function should do the following i) Iterate (loop) through the three arrays name,price and sum and display the elements of the three arrays in the cells of a dynamically generated table. The total sum of the shopping cart should also be displayed somewhere at the end of the table.
I would really appriciate some pointers on how to tackle this problem.
Thankyou in advanced