|
<<prev |
1 |
2 |
3 |
4 |
5 |
next>>
FREE Shipping based on Order Total - Method 1
NOTE: This modification will make all methods of shipping free. If you have multiple methods of shipping and wish to make different methods free or if you want to make different methods free based on more than one order total you should consider using one of the modifications on page 3 or page 4.
Locate the following two lines in jsship.snp:
function GetShippingCharge(nIndex)
{
We are going to insert some lines of code between the two lines above and the two lines that follow them as shown below:
// make a copy so value doesn't change in calling function.
var nIdx = nIndex;
NOTE: Be sure to turn word wrap off in your text editor and then make sure the lines do not wrap (become multiple lines) upon saving the snippit file.
The lines of code we are going to add are as follows:
// RealCartUniversity FREE Shipping if order is
// over $100.00 added following 8 lines
if(nOrderTtl >= 100) // <<- change the "100" to other
{ //number here if desired.
nShipCharge = 0.00;
return nShipCharge;
}
// end RealCartUniversity FREE shipping routine.
Copy and paste the lines above into your jsship.snp file so that the beginning of the GetShippingCharge() function now resembles the following: (added lines are in bright blue while original code is shown in navy blue)
function GetShippingCharge(nIndex)
{
// RealCartUniversity FREE Shipping if order is
// over $100.00 added following 8 lines
if(nOrderTtl >= 100) // <<- change the "100" to other
{ //number here if desired.
nShipCharge = 0.00;
return nShipCharge;
}
// end RealCartUniversity FREE shipping routine.
// 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;
On orders LESS than $100.00 your shipping pull-down menu on your checkout page will resemble this:
Select shipping:
On orders MORE than $100.00 your shipping pull-down menu on your checkout page will resemble this:
Select shipping:
Since some of the lines of code displayed above may wrap due to the length of the lines and your current font size setting please view this file to see which lines are to remain intact without wrapping. To see the entire modified jsship.snp file please click here. The changes are highlighted with red type. You may download this modified jsship1.zip file, extract it and then save the new jsship.snp file to your current theme folder called jsship.snp. Rebuild Checkout, republish and enjoy.
This concludes the first version of FREE Shipping based on Order Total. The next 2 pages show how to achieve this on only the first shipping choice you have defined.
<<prev |
1 |
2 |
3 |
4 |
5 |
next>>
|