Shipping Calculator

Jan 17, 2006

I'm attempting to create a shopping cart shipping calculator using the total $ provided by the cart itself (%total%). Basically the script needs to take the %total%, compare it to a bunch of arrays in the javascript, and provide the shipping charge as a percentage of the total. For example:

The cart total ends up being $15 (or %total%).

The set rates for shipping are:

Standard Shipping
$1 - $4.99 : 7.95% (of total)
$5 - $9.99 : 9.95%
$10 - $19.99 : 11.95%

Overnight Shipping
$1 - $4.99 : 9.95% (of total)
$5 - $9.99 : 11.95%
$10 - $19.99 : 19.95%

Two radio buttons would show the 2 shipping options and the shipping charges like this:
O Standard: $1.79
O Overnight: $2.99

View 3 Replies


ADVERTISEMENT

Shipping Calculation :: Modify Script To Calculate The Shipping Cost?

Oct 18, 2011

i have follow a tutorial from this site http:[url]....i would like to customize the script for shipping cost as in like: for the drop down , user can choose either 'west' or 'east' on the drop down, my problem now is i don't know how to modified JavaScript to calculate the shipping cost and i have done the calculation for product quantity in php.i would like to do it like using my $ct_qty(php) *shipping cost (javascript).if user select west:

1 quantity = $6

2 quantity = $8

3 quantity = $9...and so on...8 quantity above = F.O.C

and for east showing different price like:

1 quantity = $9

2 quantity = $13

3 quantity = $15...and so on...8 quantity above = F.O.C

View 4 Replies View Related

Simplecart Js Quantity Shipping - Specify Different Shipping For Different Items?

May 14, 2011

I am using simplecart js and I am trying to get shipping to work.

<script type="text/javascript">
simpleCart.email = "payment@domain.co.uk";
simpleCart.checkoutTo = PayPal;[code]....

Now the problem with this is whenever I add any item to the cart it adds �1 to the shipping, but I want to specify different shipping for different items. Is there anyway I can do this?

View 5 Replies View Related

Calculating Shipping With If/else And Function?

Sep 21, 2009

I am having difficulty getting the following assignment to run properly:Many companies charge a shipping and handling charge for purchases. Create a Web page that allows a user to enter a purchase price into a text box and includes a JavaScript function that calculates shipping and handling. Add functionality to the script that adds a minimum shipping and handling charge of $1.50 for any purchase that is less than or equal to $25.00.For any orders over $25.00, add 10% to the total purchase price for shipping and handling,but do not include the $1.50 minmum shipping and handling charge. The formula for calculating a percentage is price * percent / 100. For example, the formula for calculating 10% of a $50.00 purchase price is 50 * 10 / 100, which results in a shipping and handling charge of $5.00. After you determine the total cost of the order (purchase plus shipping and handling), display it in an alert dialog box. Save the document as CalcShipping.html.This is what I have after working on it round and round for 4 hours yesterday:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">[code].....

View 5 Replies View Related

Can't Combine Shipping Across Items?

Dec 2, 2010

Right now this javascript shopping cart works to 1. charge shipping based on the item, 2. the destination country, 3. it combines shipping for a quantity over 1 of the SAME item.Each item has 2 different possible shipping charges. I am trying to get the javascript to check the shopping cart to see what item in the cart has the highest possible shipping charge, charge that amount to that item, and charge the lowest possible shipping charge on all other items in the cart. If item A is purchased alone shipping is $5.00.If purchased with item B, which costs $10.00 to ship alone, the $10.00 is charged for item B and only $3.00 for item A. Because item B had the higher shipping charge at a quantity of one.

I have tried adding various things like me.items[current], item.shipping, me.shipping, this.shipping, shipping_Cost, and other things next to the second && in the part of the script that shows the country. I have also tried adding && if (me.whatever) and && if (item.whatever) and similar things at the beginning of the script next to if (this.country). I have found the parts of the script that pertain to cart items and to updating the shopping cart.The javascript is in 2 parts. One part goes in the item page, which I will post first. The second part goes in an external javascript file which I will post at the bottom. In between there is the part that shows the shopping cart. It isn't part of the javascript.

<script type="text/javascript" src="simpleCart.js"></script>
<script type="text/javascript">
<!-- [code]......

View 2 Replies View Related

Jquery :: Copy Billing/Shipping IE7 OE Error?

May 1, 2011

I have created a form that includes billing and shipping information. When the user clicks the checkbox next to "Shipping Information is the same as Billing Information" the form should copy the contents filled in the shipping fields to the billing fields. All works well, except in Internet Explorer 7, I get an object expected error. I'm using jQuery JavaScript Library v1.4.2.

Code:
<div class="box1 store-customer-info">
<h1>Checkout - Step 2 of 3</h1>
<div class="records">[code]....

View 1 Replies View Related

State Field For Copying Shipping Same As Billing Not Working?

Dec 7, 2009

I am trying to copy the billing information to be the same as the shipping information when they select the checkbox. Everything seems to work except for the State field which is a drop down. Depending on what country they select, the state field will automatically populate. how I can copy the billing state to be the same as shipping as well?

View 2 Replies View Related

Multiple The Quantity Ordered By The Kind Of Shipping Selected In My <select> List?

Mar 4, 2009

What I want to do it multiple the quantity ordered by the kind of shipping selected in my <select> list.

I'm pretty sure that what I've got to do is establishe a quantity ordered variable like this var qty = form["Q" + i].value And then multiply that qty variable by the ShippingCost. But no mater where I stick this var statement it always either stops the script cold or comes up as a black or undefined value.

<script type="text/javascript">
/* <![CDATA[ */
var ListCount = 5[code].....

View 2 Replies View Related

How To Make A Simple Select Menu That Adds A Flat Rate Shipping Fee?

Oct 18, 2005

Can someone tell me how to make a javascript that will add a shipping price ($5.00) to any price that is listed as a value for a select menu on multiple drop downs?

<select name="shirt">
<option value="10.00">s-l</option>
<option value="12.00">xl-xxl</option>
</select>

Price: <input type="text" name="total" value="$0.00" /> (would show this without touching the drop down)
Price: <input type="text" name="total" value="$15.00" /> (would show this if selecting s-l)
Price: <input type="text" name="total" value="$17.00" /> (would show this if selecting xl-xxl)

<select name="shorts">
<option value="14.00">s-l</option>
<option value="16.00">xxl-xxl</option>
</select>

Price:
<input type="text" name="total" value="$0.00" /> (would show this without touching the drop down)
Price: <input type="text" name="total" value="$19.00" /> (would show this if selecting s-l)
Price: <input type="text" name="total" value="$21.00" /> (would show this if selecting xl-xxl)

View 5 Replies View Related

Working On An Mpg Calculator ?

Oct 4, 2009

I am working on an Mpg calculator and I am stuck.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

I have a mistake when it is suppose to calculate.

View 4 Replies View Related

Make A Calculator App?

Mar 25, 2011

I'm trying to make a calculator app; with a few differences. I have a text field with a numberpad below it, I got the numbers to show up in the text field, but am unsure as to how when I hit the enter button - it would store them in a variable?...I am also wondering as to how it would store current value and then allow me to input another value(maybe on the next page) and either subtract or add to it(the first value that is stored).I am also wondering how to get a decimal point in place(need it for currency).

Here is my code:

<html>
<head>
<script type = "text/javascript">

[code].....

View 10 Replies View Related

Creating A Less Than Or More Than Calculator?

Dec 2, 2011

I have the last assignment that she wants us to do and I had to pull up another assignment that she wanted us to build upon( which is one of those coding without anything advance)

<html>
<head>
<title>

[code]....

now she wants us to do max <beta and then name the variables with if a<b and I don't know if I put that in the concatenation or what to name my variables!

View 18 Replies View Related

Price Calculator

Jan 4, 2007

I am trying to create a price calculator that automatically calculates the price of custom made picture frame. I got an equation that finds the square area of the frame by multiplying the perimeter (2*length*width) by the thickness (which the user can choose from 1.5", 2" or 3"). Then it multiplies it by a decimal number (0.27 if the frame is 1.5" thick, 0.23 if its 2" thick, and 0.18 if its 3" thick). Then it adds a $5 custom made fee to the final answer. But when I save it to an html file and load it in Internet Explorer, it doesn't calculate. Code:

View 5 Replies View Related

Field Calculator

Jul 26, 2007

I'm having some problems with a calculator that I'm working on and am stumped on a particular situation regarding adding additional script and how it should be written. I've searched the forum and the web and just cant locate a viable solution. Code:

View 1 Replies View Related

Basic Calculator

Dec 6, 2003

I know there is a million of them but here's a little calculator script I made just for kicks. Feedback is always appreciated, good or bad.

I think I did a pretty good job of mirroring the windows calculator functionality.

Basic keys are mapped (optionally) to the keyboard.


<html>
<head>
<title>Web Calculator</title>
<style type="text/css">
table
{
text-align:center;
background-color:#e5e5c5;
}

.button
{
width:55px;
font-weight:bold;
background-color:lightblue;
color:#333399;
}

.functbut
{
width:55px;
font-weight:bold;
background-color:lightblue;
color:red;
}

.back
{
width:115px;
font-weight:bold;
background-color:lightblue;
color:red;
}

.header
{
color:#333399;
}

#display
{
text-align:right;
}
</style>
<script type="text/javascript">
var find=document.getElementById;
var temp=0;
var total=0;
var which=0;
var m=0;

function Mplus()
{
m=parseFloat(find('display').value) + m;
find('memory1').value="M+*";
}

function Mclear()
{
m=0;
find('memory1').value="M+";
}

function Mrecall()
{
find('display').value=m;
}

function Mreplace()
{
m=find('display').value;
}

function showMe(num)
{
if(temp==0)
{
find('display').value=num;
temp=1;
}
else
{
find('display').value+=num;
}
}

function calcEm(num)
{
str=parseFloat(find('display').value);
if(which==0)
{
total=find('display').value;
temp=0;
which=num;
}
else if(which==1)
{
find('display').value=parseFloat(total)+ str;
total=find('display').value;
which=num;
temp=0;
}
else if(which==2)
{
find('display').value=parseFloat(total) * str;
total=find('display').value;
which=num;
temp=0;
}
else if(which==3)
{
find('display').value=parseFloat(total) / str;
total=find('display').value;
which=num;
temp=0;
}
else if(which==4)
{
find('display').value=parseFloat(total) - str;
total=find('display').value;
which=num;
temp=0;
}

}

function clearAll()
{
find('display').value=0;
which=0;
temp=0;
total=0;
}

function clearDisplay()
{
find('display').value="0"
temp=0;
}

function fractIt()
{
find('display').value=(1) / str;
}

function getPerc()
{
var d=find('display').value=str / 100;
calcEm(0);
}

function backSpace()
{
find('display').value=find('display').value.substring("0",find('display').value.length-1);
}

function getRoot()
{
find('display').value=Math.sqrt(find('display').value);
}

function invertIt()
{
var w=find('display').value.indexOf("-");
if(w==-1)
{
find('display').value="-" + find('display').value
}
else
{
find('display').value=find('display').value.substring("1",find('display').value.length);
}
}



function keyHandler()
{
keys=new Array();
keys[97]=("1");
keys[98]=("2");
keys[99]=("3");
keys[100]=("4");
keys[101]=("5");
keys[102]=("6");
keys[103]=("7");
keys[104]=("8");
keys[105]=("9");
keys[96]=("0");
keys[13]=("equal");
keys[107]=("plus");
keys[110]=("dot");
keys[109]=("minus");
keys[106]=("times");
keys[111]=("divide");
keys[110]=("dot");
keys[8]=("back");
keys[27]=("clear");

kc=window.event.keyCode;

if(keys[kc]!=undefined)
{
cColor('#333399');
setTimeout('cColor("lightblue")',100);
find(keys[kc]).click();
}
return false;
}
function cColor(bcolor)
{
find(keys[kc]).style.background=bcolor;
}

function keyOnOff()
{
var b=find('keychoice').checked
if(b==true)
{
document.onkeydown=keyHandler;
}
else
{
document.onkeydown="";
}
}
function checkHandler()
{
var e=find('keychoice').checked
if(e==false)
{
e=true;
}
else
{
e=false;
}
keyOnOff();
}

</script>
</head>
<body>
<table cellspacing="0" border="1">
<thead>
<th colspan="6" class="header">Web Calculator</th>
</thead>
<tr>
<td colspan="6"><input type="text" size="43" id="display" value="0."></td>
</tr>
<tr>
<td colspan="2"><input type="button" value="Backspace" id="back" class="back" onclick="backSpace()"></td>
<td colspan="2"><input type="button" id="ce" value="CE" class="back" onclick="clearDisplay()"></td>
<td colspan="2"><input type="button" id="clear" value="C" class="back" onclick="clearAll()"></td>
</tr>
<tr>
<td><input type="button" class="functbut" value="MC" onclick="Mclear();"></td>
<td><input type="button" class="button" id="7" value="7" onclick="showMe(&#397;')"></td>
<td><input type="button" class="button" id="8" value="8" onclick="showMe(&#398;')"></td>
<td><input type="button" class="button" id="9" value="9" onclick="showMe(&#399;')"></td>
<td><input type="button" class="functbut" id="divide" value="/" onclick="calcEm(3)"></td>
<td><input type="button" class="button" id="sqrt" value="sqrt" onclick="getRoot();"></td>
</tr>
<tr>
<td><input type="button" class="functbut" value="MR" onclick="Mrecall();"></td>
<td><input type="button" class="button" id="4" value="4" onclick="showMe(&#394;')"></td>
<td><input type="button" class="button" id="5" value="5" onclick="showMe(&#395;')"></td>
<td><input type="button" class="button" id="6" value="6" onclick="showMe(&#396;')"></td>
<td><input type="button" class="functbut" id="times" value="*" onclick="calcEm(2)"></td>
<td><input type="button" class="button" id="perc" value="%" onclick="getPerc()"></td>
</tr>
<tr>
<td><input type="button" class="functbut" value="MS" onclick="Mreplace();"></td>
<td><input type="button" class="button" id="1" value="1" onclick="showMe(&#391;')"></td>
<td><input type="button" class="button" id="2" value="2" onclick="showMe(&#392;')"></td>
<td><input type="button" class="button" id="3" value="3" onclick="showMe(&#393;')"></td>
<td><input type="button" class="functbut" id="minus" value="-" onclick="calcEm(4)"></td>
<td><input type="button" class="button" id="x" value="1/x" onclick="fractIt()"></td>
</tr>
<tr>
<td><input type="button" class="functbut" value="M+" id="memory1" onclick="Mplus();"></td>
<td><input type="button" class="button" id="0" value="0" onclick="showMe(&#390;')"></td>
<td><input type="button" class="button" id="flop" value="+/-" onclick="invertIt()"></td>
<td><input type="button" class="button" id="dot" value="." onclick="showMe(this.value)"></td>
<td><input type="button" class="functbut" id="plus" value="+" onclick="calcEm(1)"></td>
<td><input type="button" class="functbut" id="equal" value="=" onclick="calcEm(0)"></td>
</tr>
<tr>
<td colspan="6" class="header">Num Pad On:<input type="checkbox"
id="keychoice" onclick="checkHandler();keyOnOff();"></td>
</tr>
</table>

</body>
</html>

Happy Calculating...

View 3 Replies View Related

Make Calculator To Be A Pop Up

Feb 19, 2009

I have a simple calculator written using javascript and html. I would like to make it such that when a link to the calculator is clicked, a pop up window with this calculator appears rather than referring a user to anew page.

View 2 Replies View Related

Calculator With If/then Statement?

May 26, 2010

I am working on a script that calculates the rental rate for a property. I currently have this code and form, which works as I wish it to.

Code:
<script type="text/javascript">
function roundCents(amount) {

[code]....

View 3 Replies View Related

Get A Calculator To Work With IF/THEN?

Oct 19, 2010

I am trying to make a calculator that calculates the amount of words inputted (words) and multiplying it with a variable decided by an If/Then statement. The way I want it to work is that if there is 1-10,000 inputted it multiplies whatever that amount is by .29, and if there is 10,000-20,000 by .26, and anything more than 20,000 by .24. This is what I have come up with so far:

Code JavaScript:
<script type="text/javascript">
function wordcount(){

[code]....

View 2 Replies View Related

JS Calculator Not Working In Mozilla But Ok In IE

Feb 26, 2010

I have an online calculator in javascript which works in IE but not Moz.

site: [URL]

code:
function workit()
{
var xsource = new Array(0,0.09,0.1); // source language
var xtarget = new Array(0,0.09,0.10,0.12,0.14); // target language

[Code]....

View 4 Replies View Related

Time Calculator For Website?

Nov 24, 2010

I am trying to implement a time calculator onto my website with preset times to tell how long it would take to make troops. Say you want to make 100 Catapults and each Catapult takes one minute and ten seconds to make, I would like to be able to show the time in days /hours / minutes preferably in the format of 0:00:00. I would like it so someone can type in the amount of troops they want. There are Infantry that take 0:00:22, Cavalry that take 0:00:52, Archers that take 0:00:35 and Catapults that take 0:01:10.

View 2 Replies View Related

Change Calculator And Checkboxes?

Nov 23, 2011

Show a checkbox list with names of the coins. The user picks the coins he/she has and presses submit.
Then prompt boxes show up asking how many toonies you have (if the user selected toonies) and it does that for each one that has been checked marked.I've tried this

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

[code]....

View 11 Replies View Related

Javascript Currency Calculator

Mar 3, 2007

I am trying to write a currency calculator that can convert between 4 currencies.

I have managed to get as far as to convert from one currency to the other 3 but can not make it convert between the others. Could you please give me some advice how to continue? Code:

View 5 Replies View Related

Memory Functions On A Calculator?

May 22, 2010

I'm trying to make a calculator in HTML/Javascript but I'm having trouble with the memory buttons. Here is the code:

<html>
<head>
<title>Env X Software | Env X Online Calc</title>

[code]....

View 9 Replies View Related

Variables In Calculator Type?

Mar 29, 2011

I have a text field with a numberpad below it, I got the numbers to show up in the text field, but am unsure as to how when I hit the enter button - it would store them in a variable?...I am also wondering as to how it would store current value and then allow me to input another value(maybe on the next page) and either subtract or add to it(the first value that is stored).I need the calculator to be like a numberpad/money calculator, so when the user will enter a specific amount(stored in variable), (there will be two decimal places for currency(not sure how to get this working)i want the "point" to be there when they enter in numbers).then they add in another amount, how would i subtract/add this to the first stored value?

<html>
<head>
<script type = "text/javascript">

[code]....

View 3 Replies View Related

Mortgage Calculator Script

Nov 4, 2003

Where could I find a mortgage calculator script I could place on my website? I found a really cool one at www.dave.imarc.net/php free to use but I have a hard time understanding how to install it. I really don't even know what php is.

Could someone maybe guide me out of this programming lingo darkness?

View 2 Replies View Related

Financial Calculator In A CFM Page.

May 17, 2004

Here's the deal...I have a form in my Coldfusion page that is a financial calculator (you type in the amount of the goods and the interest and it computes your monthly payments. It drops the numbers into the input fields in the form). This form uses javascript to do the calculations. So here is the problem.

I have three columns on my site. The left column has a couple of short forms that use the "CFFORM" tag. It seems that when i have the CFFORM tag in the page for whatever the reason the form can't do that math anymore. When I remove the CFFORM from the page it works fine.

What is the work around for this and why is there even a conflict between the two? I am closing all of my tags form tags.

I also use ColdFusion includes in the page, are they going to cause problems with the script too?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved