# Table Rate Shipping by Class, Weight, Price, Quantity & Volume for WooCommerce

## Use Cases

⇒ Calculate shipping by class, weight, price, quantity & volume.
⇒ Calculate shipping by increase in weight, price, quantity & volume.
⇒ Calculate shipping by volumetric/dimensional weight.
⇒ When you have thousands of rules and inserting it one by one is impossible, you can just prepare CSV and import using this plugin.
⇒ When you have complex cost formula using weight, price, quantity & volume, plugin allows fixed value or formula in cost field.

## Features

#### = SHIPPING BY CLASS, WEIGHT, PRICE, QUANTITY & VOLUME =

When plugin checks for a rule all the 5 limits class, weight, price, quantity & volume should match for cost in that rule to be used as shipping cost.

In class field you can select one or more shipping classes. Weight, price, quantity & volume can be fixed value, range or empty. For range you can insert value like 10-15 means it can be any value between or equal to 10 and 15. Empty fields are shown as “- Any -” it means that field will be skipped by plugin for matching. When you click the table cell, you are allowed to edit that cell.

#### = COST FORMULA =

In formula you can use below operators, variables and functions. E.g. 2*ceil(twi)+2.5. Using formulas you can implement complex shipping requirements.

Operators: +, -, * and /.

Variables: Suffix f, t and i in below variables means upper limit, lower limit and increase in current rule.
E.g. if weight range limit is 10-20 and package weight is 13 then tw = 13, twf = 10, twt = 20 and twi = 3.

• tw: Total weight. twf: Total weight from. twt: Total weight to. twi: Total weight increase.
• tp: Total price(tax incl.). tpf: Total price(tax incl.) from. tpt: Total price(tax incl.) to. tpi: Total price(tax incl.) increase.
• tq: Total quantity. tqf: Total quantity from. tqt: Total quantity to. tqi: Total quantity increase.
• tv: Total volume. tvf: Total volume from. tvt: Total volume to. tvi: Total volume increase.
• skip: Skip current rule.
• stop: Stop checking further and discard shipping method.

Functions:

• ceil(): Return numbers rounded up to the nearest integer. E.g. ceil(2.4) = 3.
• floor(): Return numbers rounded down to the nearest integer. E.g. ceil(2.4) = 2.
• sqrt(): Return square root of numbers. E.g. sqrt(9) = 3.
• abs(): Return absolute value of numbers. E.g. abs(-4.2) = 4.2.

#### = CSV IMPORT/EXPORT =There two places from where you can import/export CSV, below zones list and above table rates table.

When you import above CSV at below zones list, two zones Asia and Europe are created with continent, country, state and postcode as in columns and table rate shipping methods are added to these zones and table rates are imported to these methods. If zone with zone name already exists new zone is not created but zone details are updated and existing table rate shipping methods are replaced with new methods with table rates as in CSV.

When you import above CSV at above table rates table in zone Europe then only table rates in CSV with zone Europe are imported and if zone columns are not there in CSV then all the table rates are imported.

Continent, country and state columns data should be in same format as above. Continent AS is Asia, country IN is India, state IN:GJ is Gujarat in India. You can find complete list here.

#### = FRONTEND CHECKOUT PROCESS =

Checkout process remains the same, it will show all the table rate shipping methods for which matching rule is found and if for any method matching rule is not found that method will not be shown.

#### = UNIT TESTED ROBUST CODE =

Complete plugin is developed with unit tested robust code with decent code coverage using the best software development standards and WordPress best practices.

## Server requirements

```PHP 5.6 or greater
MySQL 5.6 or greater
WordPress 4.4 or greater
WooCommerce 2.6 or greater```

```v1.4.0 - Not Yet Released
------------------------------------------------------------
[new] shipping by length
[new] shipping by width
[new] shipping by height
[new] shipping by area
[new] shipping by months of a year
[new] shipping by dates of a month
[new] shipping by days of a week
[new] shipping by hours of a day
[new] shipping by products
[new] shipping by categories
[new] customer role based shipping methods```

What would you like to see in future releases? Submit ideas and suggestions in the comments section here.

## Changelog

```v1.3.0 - 5th April, 2021
------------------------------------------------------------
[new] added support to import shipping method options along with zones & table rates

v1.2.1 - 23rd December, 2017 - Release Notes: goo.gl/ioxASB
------------------------------------------------------------
[fix] regenerate pot file
[fix] volumetric divisor if not numeric give error in frontend
[fix] change table decimal data type from 12,6 to 24,6
[fix] mo_string column added to wpml's icl_string_translations table
[fix] issue when shipping cost is stop and calculation type is per line/class
[fix] fatal error when multi currency disabled in woocommerce multilingual
[fix] shipping class update not taking effect
[update] table rates label and action bar in same line

v1.2.0 - 11th May, 2017 - Release Notes: goo.gl/YzopEk
------------------------------------------------------------
[new] wpml support

v1.1.0 - 22nd March, 2017
------------------------------------------------------------