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
ADVERTISEMENT
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
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
View Related
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
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
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
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
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
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
Jan 27, 2011
I have write my code for calculate, discount, total plus other cost but it didnt work for me. I have stuck here for a week, I have done everything to make it right but it seems that doesnt listen to me, so correct my code.
First option; I have 4 choices of tours; people can choose 1 in 4.
Second options; I have 4 different choices of payments; people can choose 1 in 4 Need to alert them if they didnt choose each of the option.
Total cost of choice for tour deduct each option of payment for discount
Example;
<script type="text/javascript" language="javascript">
View 9 Replies
View Related
Aug 19, 2009
Please take a look at the picture below:When you enter the value of Volume and Unit Cost... it should automatically add up into Net Cost and VAT (including float number).
View 1 Replies
View Related
Jan 26, 2011
I have tried to work on this code for the last 2 weeks, can not figure out what is wrong with my code,please have a look for me, it will greatly appreciated from me; here my details;I work on <script type="text/javascript" language="javascript"> from dreamweaver:)to set my code to calculate, different Fiji tour (4 options, choose 1 in options)Payment (4 options, choose 1 in options)The cost of tour - discount base on tour cost. (discount has 4 different calculate)Need to be alert if they not choose 1 in each type.Second cost if they choose to fly out , will cost plus $400 on top the above cost. This is an optional, so they don;t need to buy if they want.I have attached my code, please have a look,
View 19 Replies
View Related
Apr 28, 2011
I am having troubles with calculating costs on a form. When I press the cost button, it doesn't generate the calculations.
var fday = document.getElementById("reg_start_date").value;
var lday = document.getElementById("reg_end_date").value;
if (fday == "2011-09-05" && lday == "2011-09-06")
[code]....
View 1 Replies
View Related
Oct 17, 2011
how to achieve client-side calculation on my company booking form, using Javascript.The total amount for accommodation is calculated based on the room type (single or twin), zone chosen and meal plan (which then assigns a certain rate per week,so for example Single room, Zone 2, Self Catering would be �165 per week). There is a table of rates here : http:[utl].....The code would then use the arrival and departure date to calculate the number of weeks, add a booking fee of �50 and output the total amount.The form is located here: http:[url]....
View 1 Replies
View Related
Apr 16, 2011
Have to make a calculator to calculate wallpaper sizes and cost (college course so not for the 'real world' so doesnt need a great deal of functionality. Do i make a form in html and then name each cell? what then? Lost as hell here and been watching countless tutorials for js, need guidance i think now.
View 18 Replies
View Related
Jul 24, 2010
I'm trying to create a four-box form in which the user enters information into the first two boxes,and the program fills the second two boxes in.Basically,I need a form to calculate the square footage and cost of a vinyl banner.In the first text box the user would enter the banner's height.In the second box the user would enter the banner's width.
The third box would multiply the height by the width and display the total square footage of the banner.So far, I have this part down. The following is what I need help with: the fourth box.The fourth box needs to display the cost of the banner. I have a complicated pricing structure. For example:
If the total square feet for the banner is under 12 square feet, the cost is $60.00. If the square feet for the banner is between 13 and 25 square feet. The cost is $4.80/square foot and ect...I believe this would be done using some variation of an IF statement but I can't get it to work.Using this example, what would I add to the form to get this work? The following is the form I have so far which just consists of the calculation of the square feet which is all I've been able to get working.
Code:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>[code].....
View 3 Replies
View Related
May 4, 2011
I have a program in which a user must enter number of books and price and then calculate the total cost of the items, i have tried and tried to get it working to no effect can anyone see where i have went wrong.
View 2 Replies
View Related
Dec 6, 2010
I am having some difficulty in constructing a window.confirm() function that works with my code.So if the form data is valid, I need to use a window.confirm() dialog box to show the user's total cost based on the rental rate of equipment chosen and the reservation period. The user must accept the cost by pressing the confirm button, and if user cancels do not submit data.I have written this code but cannot figure out how to find the number of days from the 2 date fields and use that to calculate and display the total cost.
//confirm submit and display rental cost
var equip = document.forms[0].equipment.value
var pDate = document.forms[0].pickupDate.value[code].....
View 5 Replies
View Related
Aug 25, 2010
I am making a mock website where the user make their own computer by selecting items from drop down menus. Then a value of the item comes up below. this works but i am having trouble adding the numbers up for the total cost.
Here is my code:
<html><head><title>build</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
</style></head>
<body>
<script type="text/javascript"> .....
View 1 Replies
View Related
Jul 31, 2009
I would like to build a cost estimator similar to [URL].. I have seen several example but none have exactly what CSSninja has.
View 1 Replies
View Related
Jul 26, 2011
I have used a Google search to find code that will muliply an entered quantity with a fixed price and provide a total and then code to add the various totals into a 'grand' total.
View 2 Replies
View Related
Feb 11, 2009
I am not a programmer so this may be simple but I am not sure what the proper code is. I am trying to place a script I have on my website for a simple product cost calculator.The fields are simple quantity, product, cost per product and total.What my issue is, is that I am trying to put a 59.00 fee as a variable that will be charged on any order, it is a service fee, I just can,t figure it out. I thought I could just change the 0 to 59.00 at the variable but it is not workingHere is the code:
function showDivs(divs)
{
//get number of div to show
[code]....
View 5 Replies
View Related
Feb 21, 2011
I have a simple form on my artwork website that allows a customer to enter a numer of prints and a number of colours and then calculates a price of the order (for their curiosity only - that is the end of the function).I have now changed the way I have priced my orders and want to make it so that, for instance, if a customer wants 2 prints it will be �150.00 (�75 per print) but 3 prints will be �195.00 (65 per print) and so on the more they order.What I want to do is to add a list of prints from 1 to 10 with a radio button next to each. the user can then select 5 prints.The way my form works right now (see code below) is that the customer enters a numeric value and then the javascript takes the value and multiples by a pre-set "PrintAmount" value.Because that value is constant - I can't make multiples of prints different values (or can I ?) Heres my javascript (form below):
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
<!--
[code]....
View 26 Replies
View Related
Mar 7, 2006
I have the two text boxes on a form, both of which a user enters a
number. I simple need to ADD THESE UP!
I know, its daft, but no matter what I do, it just adds them together.
Example: 1+1 is clearly 2, but it outputs 11!
An example of my code:
var loan = document.loandata.loan.value;
var other = document.loandata.other.value;
total = (loan+other);
View 5 Replies
View Related
Jan 7, 2007
I am trying to make a script that prints a date in the format Sunday
14th January 2007. Where the date that is displayed is the next sunday
3 weeks from now. For example today is 7th January. The script would
print Sunday 28th January 2007. It would read that all of this week
until next sunday when it would change to Sunday 4th February.
View 12 Replies
View Related
Feb 5, 2007
It's probably something with rounding off, or floating point problems.
I have a timer which is used when solving the Rubik's cube. It has to
measure an exact time, but the clock display I made shows a different
value than the actual time (also displayed after session: ...). I am
using the same variable for both displays. sometimes it's off by .02.
View 1 Replies
View Related