User Guide | Item Shipping Configuration

flexi cart contains many features to aid the custom development of an e-commerce site.
In some instances, some of the features may be considered overkill, or may not require a database table to handle a feature.
In these cases, specific database tables can be disabled, or with some tables, specific columns can be disabled if not required.

In addition to this, the database tables and columns can be renamed to match the custom naming conventions.

Item Shipping Configuration

Item Shipping Function Index | Get Item Shipping Helper Data | Item Shipping Admin Data
Config Setup Information

Table Schema Diagram | Setup Notes

Table Settings

Item Shipping Table

Help with the Table Configuration

Show / Hide Help

Internal Name: The name that flexi cart internally references the table or column by.

Default Name: The default table or column name used in the actual table.

Data Type: The data type that is expected by the table column.

  • bool : Requires a boolean value set as either '0' (FALSE) or '1' (TRUE).
  • string : Requires a textual value.
  • int : Requires a numeric value. It does not matter whether the value is an integer, float, decimal etc.


Config File Location

The config file is located in CodeIgniters 'config' folder and is named 'flexi_cart.php'.

Item Shipping Table Schema Diagram

A database table schema diagram, showing how the item shipping table is related to the location and custom item tables.
Note: The custom item table must be created by you. The diagram highlights how it is then related to the item shipping table.
Table and columns names are defined using their internal names.

General Item Shipping Setup Notes

Below are some general notes to consider when setting up and managing the item shipping table.

  • If multiple item shipping rules are available to the carts current shipping location, then only the first rule ordered by the lowest table row id will be returned.

Item Shipping Table

Contains shipping settings for specific cart items.


Table and Column Names
Help
Internal Name Default Name Data Type Description
table shipping_item_rules - The tables name.
id ship_item_id int The tables primary key.
item ship_item_item_fk int Relates the item shipping settings to an item (product).
The value acts as a foreign key relating the table to the primary key of a custom item (product) table.
location ship_item_location_fk int Relates the item shipping settings to a location, so it will only be displayed if that location is set.
The value acts as a foreign key relating the table to the primary key of the location table.
zone ship_item_zone_fk int Relates the item shipping settings to a location zone, so it will only be displayed if a location from that zone is set.
The value acts as a foreign key relating the table to the primary key of the location zones table.
value ship_item_value int The shipping rate of the defined item.
A value of '0' equals free shipping for the item, a value of more than '0' acts as a per item surcharge that is applied to the shipping total.
If the item shipping setting is not meant to set a shipping rate, the value can be set as NULL.
separate ship_item_separate bool Defines whether the item should be shipped separately from other items in the cart.
When an item is shipped separately, a shipping rate is calculated for the item and is added to the carts shipping total.
banned ship_item_banned int Defines whether the defined item can be shipped to a specific location.
A value of '0' means the item can be shipped anywhere.
A value of '1' means the item CAN ONLY be shipped to the defined location or zone.
A value of '2' means the item CANNOT be shipped to the defined location or zone.
status ship_item_status bool Defines the status of whether the item shipping setting is active or disabled.
Disabled records will not be used by flexi cart functions.
Notes

If the table is enabled, then all columns are required.

The related location tables do not need to be enabled to use the item tax table.


The item shipping table has a one-to-many relationship with an item, i.e. one item can have many shipping rates setup for different locations.
Therefore, the item shipping data must be setup as a table seperate from the custom user defined item table.

Example
// Example #1 : Defining the table and column names.

$config['database']['item_shipping']['table'] = 'shipping_item_rules';
$config['database']['item_shipping']['columns']['id'] = 'ship_item_id';
// Example #2 : Disabling the table.

$config['database']['item_shipping']['table'] = FALSE;