Click to See Complete Forum and Search --> : Performing Calculations


May 11th, 2000, 07:51 AM
I'm kind of in bind here...

I am setting up a shopping cart using the CartIt shopping system. What I am trying to do is calculate the options chosen for an individual item and have that total show up at the bottom of the screen so the customer will know exactly how much the item costs with any options he/she has chosen.

An example web page is at http://demo.cartit.com/computer.html

Here's the catch...

Each option given uses a variable called eop_ and the pricing for the variable is denoted by Name^Price^Weight. Somehow I need the script to search out all eop_ values within the form and then calculate just the price value (not the name or weight) at the bottom of the page.

Here's an example of one option:


<TD>Memory</TD><TD><SELECT NAME="eop_Memory">
<OPTION VALUE="16MB SDRAM^0^0">16MB SDRAM</OPTION>
<OPTION VALUE="32MB SDRAM^89.95^0">32MB SDRAM --Add $89.95</OPTION>
<OPTION VALUE="64MB SDRAM^149.95^0">64MB SDRAM --Add $149.95</OPTION>
<OPTION VALUE="128MB SDRAM^249.95^0">128MB SDRAM --Add $249.95</OPTION>
<OPTION VALUE="256MB SDRAM^389.95^0">256MB SDRAM --Add $389.95</OPTION>
</SELECT></TD>




The one thing that I am trying to avoid however is the need to set a bunch of arrays and stuff..that's why I would like to have the script search out all eop_ values.

I am a paying customer! Please help!!!

Jack