Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    Feb 2012
    Posts
    3
    Thanks
    0
    Thanked 1 Time in 1 Post

    Fix Payment form

    1) Project Details: (be as specific as possible):
    I am looking for someone to please fix my form so that the quantity section will update the price correctly, and also if the quantity is more then 5 I would like the price to change to a specific price.

    Here is my form:

    Code:
    <script type="text/javascript">
    
    florida_tax_rate = .07;
    
    function update_price(radio) {
    
        price = parseFloat(radio.getAttribute("price"));
        shipping = parseFloat(document.getElementById("shipping").innerHTML);
        
        subtotal = document.getElementById("subtotal");
        grand_total = document.getElementById("grand_total");
        
        subtotal.innerHTML = price;
        grand_total.innerHTML = (shipping + price).toFixed(2);
        
        update_tax();
        
    }
    
    function update_tax() {
        
        menu = document.getElementsByName("ShippingState")[0];
        
        state = menu.value;
        is_florida = state.match(/^(florida|fl)$/i);
    
        price = parseFloat(document.getElementById("subtotal").innerHTML);
        shipping = parseFloat(document.getElementById("shipping").innerHTML);
        
        real_subtotal = price + shipping;
        taxes = 0.00;
        
        if (is_florida) {
            taxes = real_subtotal * florida_tax_rate;
        }
        
        grand_total = document.getElementById("grand_total");
        
        document.getElementById("taxes").innerHTML = taxes.toFixed(2);
        grand_total.innerHTML = (real_subtotal + taxes).toFixed(2);
        
    }
    
    </script>
    
    <form>
    <input onchange="update_price(this);" type="radio" name="package" value="non-chamber" price="450.00" /> 
    Non-Chamber Member (Qty: 0-5)<br />
    <select name="Quantity">
      <option value="Please Select" selected="selected">Please Select</option>
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
      <option value="5">5</option>
      <option value="6">6</option>
      <option value="7">7</option>
      <option value="8">8</option>
      <option value="9">9</option>
      <option value="10">10</option>
      <option value="11">11</option>
      <option value="12">12</option>
      <option value="13">13</option>
      <option value="14">14</option>
      <option value="15">15</option>
      <option value="16">16</option>
      <option value="17">17</option>
      <option value="18">18</option>
      <option value="19">19</option>
      <option value="20">20</option>
    </select>
    <br />
    
    <input onchange="update_price(this);" type="radio" name="package" value="chamber" price="425.00" /> 
    Chamber Member (Qty: 0-5)<br />
    <select name="Quantity">
      <option value="Please Select" selected="selected">Please Select</option>
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
      <option value="5">5</option>
      <option value="6">6</option>
      <option value="7">7</option>
      <option value="8">8</option>
      <option value="9">9</option>
      <option value="10">10</option>
      <option value="11">11</option>
      <option value="12">12</option>
      <option value="13">13</option>
      <option value="14">14</option>
      <option value="15">15</option>
      <option value="16">16</option>
      <option value="17">17</option>
      <option value="18">18</option>
      <option value="19">19</option>
      <option value="20">20</option>
    </select>
    
    <div style="display:none;"><select onchange="update_tax();" name="ShippingState">
    <option value="Florida" selected="selected">Florida</option>
    </select></div>
    
    
    
    <br />
    
    Subtotal: $<span id="subtotal">0.00</span><br />
    <div style="display:none;">Shipping: $<span id="shipping">0.00</span><br /></div>
    Taxes: $<span id="taxes">0.00</span><br />
    Grand Total: $<span id="grand_total">0.00</span><br />
    <br />
    
    <img src="http://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif" onClick="document.paypalPayment.submit();" />
    <input type="hidden" name="process" id="process" value="1" />
    </form>
    2) Payment method/ details (Paypal, check? Timeline?):

    I need this done in 2 hours and I will pay via paypal as soon as the job is done

  2. Users who have thanked wizard0522 for this post:

    miennh_coding (02-17-2012)


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •