Javascript Trouble with Shopping cart function
Posted: 06 May 2010 09:31 AM   [ Ignore ]
Newbie
Rank
Total Posts:  30
Joined  2010-04-25

Hi all,

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.

• Add to Shopping Cart – A button (“Add to Cart”) should appear either next to each toy or one for the entire page so that when clicked the desired quantity of each toy can be added to the shopping cart, by executing the appropriate event handler method and invoking the Javascript function AddToCart().

• 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[].

• A “view shopping cart” button should also appear on the page so that when clicked the appropriate event handler method is executed which will invoke the Javascript function ViewShoppingCart(). The ViewShoppingCart() function should display the the contents of the user’s shopping cart in the form of a dynamically generated table. Each row of the table should display the name of the toy, the quantity, the price and the sum (quantity*price) which is present in the shopping cart. Finally the total price of all toys in the shopping cart should be displayed at the end of the table.

• 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.

_____________________________________________________________________

Los Angeles Website Design
Free Press Release Submission

Profile
 
 
Posted: 10 May 2010 12:29 AM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  1
Joined  2010-05-10

Any web site that sells products needs a way for the visitor to choose items and pay for them. A web shopping cart provides that facility to the web site programmer. There are 2 kinds of web shopping carts:For this reason, the functions should be written and stored in a separate .js file that is included into each HTML page that shopping cart functionality is needed for. The cookies should be persistent, and contain a list of the items and quantities by reference number.

Kia Amanti Parts

Profile
 
 
Posted: 04 February 2011 06:35 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  3
Joined  2011-02-04

I would really appriciate some pointers on how to tackle this problem
______________________________________
(.....Google.....)

Profile
 
 
Posted: 10 February 2011 02:36 AM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  6
Joined  2011-02-09

DOES ANYONE HAVE ASOLUTION FOR THIS PROBLEM ?
_____________________________________________________
contract hire company implants capillaires cheveux montreal seo company

Profile
 
 
Posted: 06 March 2011 09:36 PM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  1
Joined  2011-03-06
ajaybali - 06 May 2010 09:31 AM

Hi all,

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.

• Add to Shopping Cart – A button (“Add to Cart”) should appear either next to each toy or one for the entire page so that when clicked the desired quantity of each toy can be added to the shopping cart, by executing the appropriate event handler method and invoking the Javascript function AddToCart().

• 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[].

• A “view shopping cart” button should also appear on the page so that when clicked the appropriate event handler method is executed which will invoke the Javascript function ViewShoppingCart(). The ViewShoppingCart() function should display the the contents of the user’s shopping cart in the form of a dynamically generated table. Each row of the table should display the name of the toy, the quantity, the price and the sum (quantity*price) which is present in the shopping cart. Finally the total price of all toys in the shopping cart should be displayed at the end of the table.

• 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.

nội thất fami | nội thất 190

What you put out very good, I hope to receive many ways to solve it

Profile
 
 
Posted: 10 January 2012 01:52 PM   [ Ignore ]   [ # 5 ]
Newbie
Rank
Total Posts:  23
Joined  2010-07-23

You can contact with any expert web programmer to get solved. I think these are not very serious problems. Hope you will get the solution.
Certified translation

Profile