Issue with HTML and "Add to Cart" button using Forms

Discussion in 'Web Design & Coding' started by truero82, Apr 9, 2006.

  1. truero82

    truero82 Dmn Techie

    Joined:
    Apr 9, 2006
    Messages:
    4
    Likes Received:
    0
    Location:
    Urbana, IL
    Currently, I am having an issue at the following web address:
    http://www.ur-net.biz/customdeskmenu.html

    The issue is that I can get the "Add to Cart" button to give a solid price, but I can not get it to add the prices of any of the form fields on the page. Here is the string in the button that is associated with the price:

    <input type="hidden" name="amount" value="429.99">

    I need the amount to = 429.99 + the values of each of the forms on the page.

    Normally I would assume that I could just type in <input type="hidden" name="amount" value="429.99, form1, form2, form3, etc"> and get the propper responce. I know that I must be making a mistake somehow. (I listed the value's of each of the drop down items as their price value). Perhaps I need a code that specifies that each option specifically adds a certain amount to <input type="hidden name="amount" value="SumValue(429.99,form1,form2,etc)"> ???

    Please take a look at the site and help me fix this problem. Thank you very much!
     
    truero82, Apr 9, 2006
    #1
    1. Advertisements

  2. truero82

    Goober THQ's Jester Moderator

    Joined:
    Jul 26, 2004
    Messages:
    2,864
    Likes Received:
    35
    Location:
    Colorado
    Glad to see that you made it here safely. I am sure that you will have more than enough help. Welcome to THQ.
     
    Goober, Apr 9, 2006
    #2
    1. Advertisements

  3. truero82

    James Photojournalist

    Joined:
    Dec 24, 2002
    Messages:
    6,662
    Likes Received:
    35
    I cannot seem to connect to the website. Are you using a PHP, ASP or some sort of other scripting method for this cart?
     
    James, Apr 9, 2006
    #3
  4. truero82

    truero82 Dmn Techie

    Joined:
    Apr 9, 2006
    Messages:
    4
    Likes Received:
    0
    Location:
    Urbana, IL
    The cart is a Paypal based cart. The button is an auto-generated paypal button, but the HTML code is easily changeable.

    The issue I am having may be because all the forms on the page are separate, however, I would imagine that seeing as each one has its own Name, Text, and Values that they should be able to be called to, and accumulated to, one general location (namely the <input type="hidden" name="amount" value="[this spot]"> field).

    The page is created using yahoo sitebuilder (yes, I know - lame), but should still allow for the value line to add multiple fields (simple excel procedures would be easier, lol).

    In the forms there is an option to "Specify Custom Behavior" that has a blank "Action" box for http link and a "Method" option of "POST" or "GET". I am not sure that information will be useful or not. Please advise.
     
    truero82, Apr 9, 2006
    #4
  5. truero82

    truero82 Dmn Techie

    Joined:
    Apr 9, 2006
    Messages:
    4
    Likes Received:
    0
    Location:
    Urbana, IL
    Ok, I am going to try and make this simple. I have listed a test for you HTML'ers out there... (in fact... if you can acomplish it, it would help me out a ton). I have listed the beginning code for a portion of a the website located in this thread. It has 2 price tags in bold of 429.99. What we need to do is get those 2 price tags to change whenever the options below are chose from the drop down menus. Please let me know how this is possible... feel free to use the <SCRIPT> command because javascript is allowed. Thank you for your help.
    HTML:
    <head>
    <title>Custom Computer Menu</title>
    <base href="http://www.ur-net.biz/">
    </head>
    <img src="images/ULT31586_main2.jpg" ALIGN="left" ALT="Desktop Image">Item No: 00025
    <br><h2><FONT color="red">PRICE: $429.99</FONT></h2>
    <center>
    <form method="post" action=https://www.paypal.com/cgi-bin/webscr target="paypal">
    <input type="hidden" name="cmd" value="_cart">
    <input type="hidden" name="business" value="[myemailaddress]">
    <input type="hidden" name="item_name" value="UR-Net Custom Desktop">
    <input type="hidden" name="item_number" value="00025">
    <input type="hidden" name="amount" value="429.99">
    <input type="hidden" name="currency_code" value="USD">
    <input type="hidden" name="shipping" value="39.00">
    <input type="hidden" name="shipping2" value="">
    <input type="hidden" name="handling_cart" value="">
    <input type="hidden" name="bn" value="ButtonFactory.PayPal.001">
    <input type="image" name="add" src="http://www.powersellersunite.com/buttonfactory/x-click-but22.gif">
    </form>
    <br>
    <br>
    <br>
    <FONT color="red"><h5>Usually ships within 5-7 Days</h5>
    <br>
    <br>
    <img src="images/multi_logo.JPG" align="left"><br>
    <br>
    <br>
    <br>
    <center><img src="images/processor.png"></center><br>
    <img src="images/intel_logo2.jpg" align="left">
    <select name="item1" align="right" size="1">
    <option name="amount" value="0.00">Intel Celeron 2.93GHz (Base)
    <option name="amount" value="104.99">Intel Celeron 3.06GHz (add 104.99)
    <option name="amount" value="119.99">Intel Celeron 3.20GHz (add 119.99)
    <option name="amount" value="199.99">Intel P4 3.0GHz (add 199.99)
    <option name="amount" value="239.99">Intel P4 3.2GHz (add 239.99)
    <option name="amount" value="299.99">Intel P4 3.4GHz (add 299.99)
    <option name="amount" value="439.99">Intel P4 3.6GHz (add 439.99)
    </select>
    <br>
    <br>
    <center><img src="images/os.png"></center><br>
    <img src="images/xp_logo.jpg" align="left">
    <select name="item2" align="right" size="1">
    <option name="amount" value="0.00">Windows XP Professional Installed (base)
    <option name="amount" value="0.00">Windows 2000 Pro Installed (base)
    <option name="amount" value="0.00">Windows XP Home Installed (base)
    <option name="amount" value="89.99">Windows XP Home w/CD (add 89.99)
    <option name="amount" value="109.99">Windows XP Media Center w/CD (add 109.99)
    <option name="amount" value="139.99">Windows XP Professional w/CD (add 139.99)
    <option name="amount" value="34.99">Xandros Standard w/CD (add 34.99)
    <option name="amount" value="64.99">Xandros Deluxe w/CD (add 64.99)
    <option name="amount" value="89.99">Xandros Business w/CD (add 89.99)
    <option name="amount" value="69.99">Xandros Surf Sid Linux w/CD (add 69.99)
    <option name="amount" value="0.00">Red Hat Linux Installed (base)
    </select>
    <br>
    <br>
    <br>
    <center><img src="images/office.png"></center><br>
    <img src="images/office_logo2.jpg" align="left">
    <select name="item3" align="right" size="1">
    <option name="amount" value="0.00">Office Professional Installed (base)
    <option name="amount" value="124.99">Student and Teacher w/CD (add 124.99)
    <option name="amount" value="149.99">Office Basic w/CD (add 149.99)
    <option name="amount" value="341.99">Office Standard w/CD (add 341.99)
    <option name="amount" value="356.99">Office Professional w/CD (add 356.99)
    </select>
    <br>
    <br>
    <br>
    <center><img src="images/memory.png"></center><br>
    <img src="images/Ultra_Logo2.jpg" align="left">
    <select name="item4" align="right" size="1">
    <option name="amount" value="0.00">256MB DDR400 RAM (base)
    <option name="amount" value="44.99">512MB DDR400 w/$20Reb (add 44.99)
    <option name="amount" value="46.99">512MB DDR533 RAM (add 46.99)
    <option name="amount" value="79.99">2x512MB DDR400 w/$20Reb (add 79.99)
    <option name="amount" value="81.99">1024MB DDR533 RAM (add 81.99)
    <option name="amount" value="163.98">2048MB DDR533 RAM (add 163.99)
    </select>
    <br>
    <br>
    
     
    truero82, Apr 10, 2006
    #5
  6. truero82

    James Photojournalist

    Joined:
    Dec 24, 2002
    Messages:
    6,662
    Likes Received:
    35
    Where is the link for this page? I tested the buy now and the price is being copied over just fine for me.
     
    James, Apr 11, 2006
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.