RealCart UNIVERSITY
Courses [Home]  [Search]  [Index]  [Help]  [Help]

Higher Learning for the Internet’s most effective shopping cart - Attend On-line.

<<prev | 1 | 2 | 3 | 4 | 5 | next>>

FREE Shipping Based on Order Total - The Basics

RealCart was designed to be infinitely customizable. Nowhere does this promise hold more true than in the JavaScript functions of RealCart. Although you do not need to know any JavaScript to customize RealCart or to participate in this course and subsequently modify your RealCart shipping routines, it wouldn’t hurt to read a book entitled JavaScript for the World Wide Web from Peachpit Press. It is only 195 pages long but it contains everything you need to become a weekend warrior JavaScript coder. Never-the-less, having zero JavaScript knowledge is just fine for the purpose of attending this course.

RealCart was designed to allow multiple shipping options. Since there is no limit on how many shipping options you can offer there is also no limit on the different ways you can force RealCart to charge shipping. For the purpose of this course we are going to focus on forcing RealCart to charge shipping charges three different ways:

  • Method 1 — FREE shipping on orders totalling $100 or more.
  • Method 2 — FREE default shipping on orders totalling $100 or more.
  • Method 3 — FREE default shipping on orders totalling $100 or more, FREE premium shipping on orders totalling $200 or more.
  • Optional Message — Display an optional message to shopper telling them that they have FREE shipping.
This course, although fairly short, will completely explain how to get RealCart to charge shipping on orders under $100.00 while allowing FREE shipping on all orders totally $100.00 or more as well as other methods of charging shipping.

Clone jsship.snp

Clone the file jsship.snp and then open the cloned copy in your current theme folder in a text editor. Locate the following block of code. It should appear somewhere around the 60th to 65th line of the snippit file. You are looking for:

function GetShippingCharge(nIndex)
{
  // make a copy so value doesn't change in calling function.
  var nIdx = nIndex;

  // Assign values of selected shipType object to
  // variable for easier readability.
  var nID = shipOption[nIndex].ID;
  var nType = shipOption[nIndex].Type;
  var nShipCharge = 0;
  var nMatchVal = 0;
  var bFound = false;
  var nLastIndex = -1;

This is the section of code we are going to modify to achieve our FREE shipping over $100.00 method. Actually we are merely going to add a few lines to the beginning of this routine. The first variation we will do of this function will change all shipping methods to ($0) if the order is over $100. We will also look at a way of only changing the first method to ($0) while leaving any additional shipping methods at regular price.

<<prev | 1 | 2 | 3 | 4 | 5 | next>>


About RealCart U | Courses | Admissions | Administration | Alumni | Directories | Case Studies | Help

Contact the Webmaster staff
Copyright information
Privacy statement

Copyright © 1995-2002, RealCartUniversity.com