Overview
The shipping rules in Premium Rate are configured via a comma-separated (CSV) spreadsheet. The extension comes with many examples for you to use, found in the docs directory. Its recommended you take one of these or the template csv to begin the rule creation.
Deciding your Rules
By now you should know the following:
- Your shipping zones
- The weight, price and quantity filters you wish to change shipping rates based on
- The shipping method names you wish to display
- The shipping rates and actions based on the criteria (items, destination) given
Before you write your CSV file it’s really important you understand your requirements and what you are going to achieve.
Write your rules in a bulleted one page document and try to break them down to the simplest form.
In Premium Rate we split the CSV file into conditions and actions. When the conditions are met the actions are undertook.
Once you have all your requirements broken down you can then start building the csv file. We recommend you firstly tackle a simple scenario, and then expand the csv file to meet the more complex needs. Test as you go along, there is no point constructing a large CSV file without testing progressively, we can almost guarantee it just wont work.
The rest of this section looks at configuring your conditions and setting your actions via the csv file. Bear in mind that any actions specified in the csv spreadsheet are also influenced by the store wide configuration of Premium Rate in System->Configuration->Shipping Methods
.
CSV Tips & Tricks
You need to use a template to work your rates into. We recommend using a spreadsheet program such as Open Office (preferred by us) or Excel to manipulate the rules.
Some key notes on using CSV files:
- Do not change the order of the columns
- A CSV must be delimited by commas
- If on a Mac using Excel save as Windows file type
- Destinations use ‘best-match’ logic to match the appropriate rule
- Any value left empty should be an asterisk ‘*’ which can mean anything, or anything else (on destinations)
- There are specific formats for entering of countries and states/regions
- The option to upload a CSV is not shown until you modify the configuration scope
- Upload the csv file by changing website scope under the shipping method configuration
If you are having issues with configuring your CSV file please see the CSV Configuration and Troubleshooting Guide to diagnose.
CSV Definition
Field Name |
Description | Default? |
Use ISO3 Country codes (e.g. USA,GBR). Use ‘*’ if you want to apply to all countries. Multiple countries can be present on a single row (e.g. “GBR,FRA”) | * | |
Destination State – use * for all. Enter state/region code e.g. CA | * | |
City |
Destination City (generally not used) – use * for all | * |
Destination zip code. If using numeric ranges then set this to the number you wish the search to start from. If using pattern matching then set this to the pattern you require. See pattern matching for details | * | |
Zip/Postal code To |
Used for Post code ranges for Canada only | * |
Minimum combined weight of the products in cart must be greater than the value in the CSV file | * | |
Maximum weight of combined products in cart must be less than or equal to the value in the CSV file. | * | |
Minimum price of the products in cart must be greater than the value in the CSV file | * | |
Maximum total price of products in cart must be less than or equal to the value in the CSV file. | * | |
Minimum quantity of items of the products in cart must be greater than the value in the CSV file | * | |
Maximum number of the products in cart must be less than or equal to the value in the CSV file. | * | |
Shipping Price |
Price of shipping | Required |
Adds a lot of functionality to Premium Rate. Unless you are doing something complex you can often leave this column empty | * | |
This is the label that will tell the end user the shipping option e.g. 1st Class, Courier, UPS Ground | Required | |
Sort Order |
If you wish to change the order of displayed rates set numerical order in this column | * |