CLOSE this help screen to edit your page. To return to it, Click the "Help" link on your product page templates (while in "EDIT MODE")
|
Editing the Product Page Templates
Step by Step "How To" Guide to editing the product templates.
|
Change the following variables by clicking the [Edit File Now] button in the other browser window. Change each of the variables according to these instructions.
- Form posting URL (formURL)
- Email Subject (emailSubject)
- Email Address (emailAddr)
- SMTP Email Web Host (emailHost)
- Thank You Page (thanksPage)
- Taxable State (taxableState)
- Sales Tax Rate (taxRate)
- Shipping Weight Type (shipping)
- Allow Checks (allowChck)
- Allow Visa (allowVisa)
- Allow MasterCard (allowMcrd)
- Allow Discover (allowDisc)
- Allow American Express (allowAmex)
- Default Shipping Method (shipType)
- Shipping Calculations (calcShipping() function)
Back to top
Form Posting URL
The Form posting URL needs to be changed to match your web address. If using the included NT form mailer program you will want to leave it as it is. (except for the domain and any subdirectories)
UNIX users will want to use the included CGI script (or use their ISP's)
IMPORTANT!: Investigate your options for form to email with your ISP before you spend a lot of time trying to get our FREE mailers to work. Chances are good that your Web Hosting ISP has a reliable form to email program that likely has more features than our freebies. (Remember we sell an inexpensive CART, the mailers are freebies to be used if nothing better is available.) It's wise to invest in a good form to email program. NT users might want to look at Comments.exe by Greyware.
After you finish editing the checkout form variable values save PAY.HTML and upload your progress to the web so we and others can offer our assistance.
Back to top
Email Subject
Enter the subject for your email the cart will send when orders are placed.
Example:
var emailSubject = "Order from Web Site";
var emailSubject = "On-Line Shopping Cart order";
Back to top
Your Email Address
Your email address to send the orders to.
Examples:
var emailAddr = "steve@hotmail.com";
var emailAddr = "cartorders@yourcompany.com";
Back to top
Web Hosts's SMTP mail server
This is where most users make mistakes. What you want to put in this variable value is the Web Host's SMTP Server NOT your ISP's dialup email server if different.
If you don't know the IP address or the Server Name, contact your Web Hosting Provider and ask them what their server name is. Tell them you want to utilize form to email on your site. They may even suggest a form to email program that is already on their site.
Examples:
var emailHost = "smtp.mywebhost.net";
var emailHost = "mail.myisp.com";
Back to top
Thank You Page location
This points our NT form to email program to the correct page to display after the order is processed.
Examples:
var thanksPage = "../cart/thanks.html";
var thanksPage = "http://www.yourserver.com/cart/thanks.html";
var thanksPage = "http://www.isp.net/~yours/cart/thanks.html";
Back to top
Taxable State
This is for the two letter state code that you must charge tax for.
Examples:
var taxableState = "NY";
var taxableState = "TX";
var taxableState = "KY";
Back to top
Tax Rate
This is the Tax Rate for your Taxable State above in decimal form. If your Tax Rate is 6 1/2 % then you would set this value to 0.065 (no quotes - this is a NUMBER.)
Examples:
var taxRate = 0.065;
var taxRate = 0.0525;
var taxRate = 0.08375;
Back to top
Shipping Weight Type
Use pounds, ounces, metric tons, whatever your product line weighs here. If you sell nothing but baseball cards, obviously you will want to use ounces for this unit. If you are selling computers, you will want to use pounds. We left a lot of configuration options open to you in the shipping function to allow ALL types of web site authors to use the cart. There will be quite a bit of fine tuning to do to your shipping function to assure that it meets your specific needs. More on that later in this file.
Examples:
var shipping = "ounces";
var shipping = "grams";
var shipping = "pounds";
Back to top
Allow Checks and Money orders
This is another value that is NOT enclosed with quotes. I realize this may get a little confusing if I don't fill you in on why. In programming there is a thing called a Boolean value. Say it with me: "Boo'-lee-an val-u". Very good. This means that the type of variable we are dealing with is a true or false value, and, as a result needs no quote marks. Try to remember that so you don't inadvertently add them if you run into JavaScript errors down the line.
Example:
var allowChck = true;
var allowChck = false;
Back to top
Allow Visa (MasterCard, Discover and Amex)
Very similar to the Allow Checks variable above, setting any of these to true or false will cause them to appear or disappear on the "Check Out" form. Set them accordingly. Remember NO QUOTES!
Back to top
Default Shipping Method
You are licensed to get as fancy with your shipping capability as you want. To make things simple, however, we've allowed you to specify a default shipping method that you can elaborate on by manipulating the JavaScript yourself, having a trusted friend or colleague do it for you or you can wait until we start stockpiling various shipping calculation functions on our site for download.
That being said I can best explain this variable as the "default" method that will be used unless you code in some variations. To keep the cart generic enough for everyone this is a function we couldn't contain inside the cart as everyone's needs are so different. If the thought of inventing your own shipping scripts scares the styrofoam packing right outta ya then leave this set to USPS as this is the cheapest way to ship as well as the most standard relying on weight as the main ingredient in figuring out how much postage you will need. For more info on customizing your shipping, or working with the default values, see the next section.
Examples:
var shipType = "USPS";
var shipType = "FedEx";
var shipType = "UPS";
var shipType = "DHL";
Back to top
Shipping Calculations
Ahh now the fun part! This is the closest you will come to programming!! =o) Come on now, don't panic on me. All we are going to do is "Copy and Paste" a few if statements and tweak them to match your specific needs.
IMPORTANT: Remember that shipping and handling is a price set by YOU to AT LEAST cover your cost of shipping, if not more. Shipping involves a hard cost to you that you must pay to the US Postal Service, Fedex or the carrier of your choice. Handling on the other hand is what you are doing when you are stuffing your customer's order into a box, taping it up and attaching shipping labels and maybe even postage. Since I assume you are in business to make a profit you need to realize that handling takes time. Since time is money and handling takes time then it stands to reason that handling takes MONEY! This is why some companies charge you $19.95 shipping and handling and when you get your package you see that the postage only cost $12.13 for example. Time is valuable, time is money. That is why you should charge a little extra to cover your time and trouble to get the order to your customer. We're not talking major moolah here, just a few bucks to cover your 'down time' as you labor over a box.
Without further delay let's look at what is involved here and how simple it really is.
function calcShipping()
{
if (oWeight > 100)
{
ShipAmount = "55.00";
return ShipAmount;
}
if (oWeight > 75)
{
ShipAmount = "34.00";
return ShipAmount;
}
This is what part of the calcShipping() function looks like in the PAY.HTML file. It consists of repetitive if statements ordered from higher weight test values to lower ones. What I mean is that first you test the oWeight (short for 'Order Weight') for the LARGEST possible value it could have. In some cases this may be quite small. In others it could be quite large. YOU need to decide what the max cutoff is for total shipping weight and add your shipping charges to this function accordingly.
Let's look at these a little more closely.
if (oWeight > 100)
This line tests to see if the order weight is greater than 100.
{
ShipAmount = "55.00";
return ShipAmount;
}
If it is over 100, then the function returns a Shipping Amount of 55.00 and stops testing the value for what it weighs. If the shipping amount is LESS than 100 it will continue to test.
For each successive if statement decrease the amount to test for and calculate what it would cost you to ship this to the farthest US destination from your location. This should be your default value for shipping so you will always at least break even on every order, most of the time making a buck or two for your trouble. Play with these values until you are satisfied and you are ready to sell some stuff on the web!
One alternative to figuring out a monstrous JavaScript test for every conceivable weight is to stair step these weight tests by 5 pounds and then smaller as you reach orders totaling 4, 3, 2 and 1 pound in weight. Take a look at the existing script to get an idea of what we are talking about here.
Another alternative that makes modifying this script unnecessary would be to add shipping to the price of your item where practical. Especially if you sell things that can fit in a flat envelope. In most every case this will only cost you $3.00 at the US Post Office and you can charge $5-10 for shipping thereby making your shipping a little more profitable. It's totally up to you. This is your site and your on-line store.
Finishing Up
If you have edited all of the variables and like what you see. Save this file and go back to the browser and do a few test orders to see how your shipping function works! You will see the shipping function in action if you add the ZIP code on the order form and then select another form field (so the browser will check to see if the zip code changed. If so it will calculate shipping.)
|
Copyright © 1998, The Real Soft Shopping Cart
|
|