Looking for a paypal/quanty calculator script...

Discussion in 'Programming' started by rapidadds, Dec 28, 2008.

  1. #1
    Ok, im not really sure what i'm looking for, so I though I would post it hear. What I want is something to add to my website. My website link is: www.rapidadds.com/mobaccounts. Now, what I want is a script that will do this, lets say, somebody wants to buy 1 ipod for 200.00, 2 plasma screen TVs for 800.00 and a new dvd player for 100.00, and, i want the page set-up to be like this:
    Ipods: (text box here to enter quanty) (total price here after quanty has been totaled together)
    TVs: (textbox here to enter quanty) (Total price after total with the quanty)
    dvd: (textbox here to enter quanty) (Total price after total with the quanty)

    Then down here, it would say Total: (total price here) then RIGHT here, a paypal button to pay for it.

    I hope that that is not confusing, if you have any scripts to do that, please post what you have, a free script would be great, because my site is just for fun for the most part.

    Thanks!
     
    rapidadds, Dec 28, 2008 IP
  2. it career

    it career Notable Member

    Messages:
    3,562
    Likes Received:
    155
    Best Answers:
    0
    Trophy Points:
    270
    #2
    You can get the shopping cart code from paypal account.
     
    it career, Dec 28, 2008 IP
  3. rapidadds

    rapidadds Guest

    Messages:
    240
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Ok, i found something, but it don't work correctly, here is the link set up on my site... rapidadds.com/mobaccounts/test.html

    Here is the code, can you see a fix?
    <body>
    <body bgcolor="#FFFFFF" text="#000000">
    <script language="javascript">
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Untitled Page</title>
    <meta name="GENERATOR" content="Created by BlueVoda">
    <style type="text/css">
    div#container
    {
    width: 144px;
    position: relative;
    margin-top: 0px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    }
    body
    {
    text-align: center;
    margin: 0;
    }
    </style>
    <script language="JavaScript" type="text/javascript">
    <!--
    function ValidateForm1(theForm)
    {
    var strFilter = /^[-+]?\d*\.?\d*$/;
    var chkVal = theForm.Editbox1.value;
    if (!strFilter.test(chkVal))
    {
    alert("Sorry, quantity must be at least 1");
    theForm.Editbox1.focus();
    return false;
    }
    var strValue = theForm.Editbox1.value;
    if (strValue != "" && !(strValue >= 1))
    {
    alert("Sorry, quantity must be at least 1");
    theForm.Editbox1.focus();
    return false;
    }
    return true;
    }
    //-->
    </script>
    </head>
    <div id="container">
    <div id="bv_" style="position: absolute; left: 241; top: 272; width: 144; height: 89; z-index: 5; background-color: #E6EEFF" align="left">
    <form action="https://www.paypal.com/cgi-bin/webscr" target="paypal" method="post" width="10" height="10">
    <input type="hidden" name="business" value="cherisjewelry@mchsi.com">
    <input type="hidden" name="item_name" value="Letters">
    <input type="hidden" name="item_number" value>
    <input type="hidden" name="no_shipping" value="1">
    <input type="hidden" name="currency_code" value="USD">
    <input type="hidden" name="lc" value="US">
    <input type="hidden" name="bn" value="PP-ShopCartBF">
    <input type="hidden" name="lc" value="US">
    <input type="hidden" name="bn" value="PP-ShopCartBF"><p>
    <input type="text" id="Editbox2" style="position: absolute; left: 68px; top: 31px; width: 72px; font-family: Courier; font-size: 19px; z-index: 0" size="8" name="amount" value onFocus="this.blur" readonly>
    </p>
    
    
    <div id="bv_Text1" style="position: absolute; left: 7px; top: 9px; width: 53px; height: 16px; z-index: 1" align="left">
    <font style="font-size: 13px" color="#000000" face="Arial">Quantity</font></div>
    <div id="bv_Text2" style="position: absolute; left: 7px; top: 37px; width: 53px; height: 16px; z-index: 2" align="left">
    <font style="font-size: 13px" color="#000000" face="Arial">Amount</font></div>
    <p>
    <input type="text" id="Editbox1" style="position: absolute; left: 67px; top: 6px; width: 72px; font-family: Courier; font-size: 19px; z-index: 3" size="8" name="quantity1" value wrap onKeyUp="
    val = this.value;
    this.form.amount.value=3*this.value;
    "> </p>
    
    
    <div id="bv_AdvancedButton1" style="position: absolute; left: 7px; top: 58px; width: 134px; height: 23px; z-index: 4" align="center">
    <font size="2" face="Arial" color="#FFFFFF">
    <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_cart_SM.gif" border="0" name="AddToCart" alt="Make payments with PayPal - it's fast, free and
    secure!" width="96" height="21">
    </div>
    </form>
    </div>
    <div id="bv_" style="position: absolute; left: 4px; top: 235px; width: 136px; height: 16px; z-index: 6" align="left">
    <font style="font-size: 13px" color="#000000" face="Arial"></font>
    </div>
    </div>
    </font>
    </body>
    HTML:
     
    rapidadds, Dec 28, 2008 IP