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.
First at all you need a database, a relational database management system (RDBMS) to handle that DB, a sever language which will make queries to that DB.
Probably the easier (mainly because it is freeware) is to use Apache as server, MySQL as DB / DB management system, and PHP as the server-side language. PHP/MySQL, by short.
Do you know all these? If not, it is time to learn them. Or to hire a professional.
After learning at least the basis of those languages/RDBMS, you may shorten the implementation time on using a framework. For PHP/MySQL you may use templates created in Drupal. Or in Joomla. Google for.