Admin Shipping Functions
Shipping Function Index |
Shipping Config |
Get Shipping Session Data |
Get Shipping Helper Data |
Set Shipping Session Data
Help with Admin Functions
Show / Hide Help
Name: The name of the function (method).
Data Type: The data type that is expected by the function.
- bool : Requires a boolean value of 'TRUE' or 'FALSE'.
- string : Requires a textual value.
- int : Requires a numeric value. It does not matter whether the value is an integer, float, decimal etc.
- array : Requires an array.
Required: Defines whether the parameter requires a value to be submitted.
Default: Defines the default parameter value that is used if no other value is submitted.
get_db_shipping()
Gets records from the shipping options table.
Library and Requirements
Available via the admin library only.
Requires all shipping database tables to be enabled.
Function Parameters
get_db_shipping(sql_select, sql_where)
Help
Name |
Data Type |
Required |
Default |
Description |
sql_select |
string | array |
No |
FALSE |
Define the database fields returned via an SQL SELECT statement.
Read the defining SQL documentation for further information.
|
sql_where |
string | int | array |
No |
FALSE |
Set the SQL WHERE statement used to filter the database records to return.
Read the defining SQL documentation for further information.
|
How it Works
The function runs an SQL SELECT statement on the 'Shipping Options' table.
By default, the SQL statement is NOT joined to the 'Shipping Rates' table, but can be by using flexi carts 'Query Builder - SQL JOIN' function.
The query can be customised by submitting 'sql_select' and 'sql_where' data to the functions parameters.
Notes
This function is compatible with flexi carts 'Query Builder' functions.
This function can be chained with CodeIgniters query functions 'result()', 'row()' etc.
Read the Query Result documentation for further information on all the combined flexi cart and CodeIgniter functions that are available.
If an int value is submitted to the 'sql_where' parameter, the function will automatically match the value against the tables primary key.
Example: If 'sql_where' is submitted as an int of '101', the SQL WHERE statement will be "WHERE 'primary_key_column' = 101
".
Return Values
Failure:FALSE | An error message will be set.
Success:object
Example
$sql_select = array(...);
$sql_where = array(...);
$this->flexi_cart_admin->get_db_shipping($sql_select, $sql_where)->result();
insert_db_shipping()
Inserts a new record to the shipping option table.
Library and Requirements
Available via the admin library only.
Requires all shipping database tables to be enabled.
Function Parameters
insert_db_shipping(sql_insert)
Help
Name |
Data Type |
Required |
Default |
Description |
sql_insert |
array |
Yes |
FALSE |
Set the SQL INSERT statement used to insert data into the database.
Read the defining SQL documentation for further information.
|
How it Works
The function runs an SQL INSERT statement on the 'Shipping Options' table, inserting data defined via the 'sql_insert' parameter.
Return Values
Failure:FALSE | An error message will be set if a required table/feature is disabled.
Success:int | id of the inserted record.
Example
$sql_insert = array(...);
$this->flexi_cart_admin->insert_db_shipping($sql_insert);
update_db_shipping()
Updates records in the shipping options table.
Library and Requirements
Available via the admin library only.
Requires all shipping database tables to be enabled.
Function Parameters
update_db_shipping(sql_update, sql_where)
Help
Name |
Data Type |
Required |
Default |
Description |
sql_update |
array |
Yes |
FALSE |
Set the SQL UPDATE statement used to update data into the database.
Read the defining SQL documentation for further information.
|
sql_where |
string | int | array |
No |
FALSE |
Set the SQL WHERE statement used to filter the database records to update.
Read the defining SQL documentation for further information.
|
How it Works
The function runs an SQL UPDATE statement on the 'Shipping Options' table, updating data defined via the 'sql_update' parameter and filtered via the 'sql_where' parameter.
Notes
This function is compatible with flexi carts 'Query Builder' functions.
If an int value is submitted to the 'sql_where' parameter, the function will automatically match the value against the tables primary key.
Example: If 'sql_where' is submitted as an int of '101', the SQL WHERE statement will be "WHERE 'primary_key_column' = 101
".
Return Values
Failure:FALSE | An error message will be set if a required table/feature is disabled.
Success:int | The number of affected rows.
Example
$sql_update = array(...);
$sql_where = array(...);
$this->flexi_cart_admin->update_db_shipping($sql_update, $sql_where);
delete_db_shipping()
Deletes records from the shipping options table, and if defined, any related child shipping rates.
Library and Requirements
Available via the admin library only.
Requires all shipping database tables to be enabled.
Function Parameters
delete_db_shipping(sql_where, delete_children)
Help
Name |
Data Type |
Required |
Default |
Description |
sql_where |
string | int | array |
Yes |
FALSE |
Set the SQL WHERE statement used to filter the database records to delete.
Read the defining SQL documentation for further information.
|
delete_children |
string |
No |
FALSE |
Define whether to also delete all related shipping rate records.
As a precaution, 'delete' must be submitted to delete child records.
|
How it Works
The function runs an SQL DELETE statement on the 'Shipping Options' table filtered via the 'sql_where' parameter.
If the 'delete_children' parameter is set, then all related records from the 'Shipping Rates' table will also be deleted.
Notes
This function is compatible with flexi carts 'Query Builder' functions.
If an int value is submitted to the 'sql_where' parameter, the function will automatically match the value against the tables primary key.
Example: If 'sql_where' is submitted as an int of '101', the SQL WHERE statement will be "WHERE 'primary_key_column' = 101
".
Return Values
Failure:FALSE | An error message will be set if a required table/feature is disabled.
Success:int | The number of affected rows.
Example
$sql_where = array(...);
$this->flexi_cart_admin->delete_db_shipping($sql_where);
get_db_shipping_rate()
Gets records from the shipping rate table.
Library and Requirements
Available via the admin library only.
Requires all shipping database tables to be enabled.
Function Parameters
get_db_shipping_rate(sql_select, sql_where)
Help
Name |
Data Type |
Required |
Default |
Description |
sql_select |
string | array |
No |
FALSE |
Define the database fields returned via an SQL SELECT statement.
Read the defining SQL documentation for further information.
|
sql_where |
string | int | array |
No |
FALSE |
Set the SQL WHERE statement used to filter the database records to return.
Read the defining SQL documentation for further information.
|
How it Works
The function runs an SQL SELECT statement on the 'Shipping Rates' table.
By default, the SQL statement is NOT joined to the 'Shipping Options' table, but can be by using flexi carts 'Query Builder - SQL JOIN' function.
The query can be customised by submitting 'sql_select' and 'sql_where' data to the functions parameters.
Notes
This function is compatible with flexi carts 'Query Builder' functions.
This function can be chained with CodeIgniters query functions 'result()', 'row()' etc.
Read the Query Result documentation for further information on all the combined flexi cart and CodeIgniter functions that are available.
If an int value is submitted to the 'sql_where' parameter, the function will automatically match the value against the tables primary key.
Example: If 'sql_where' is submitted as an int of '101', the SQL WHERE statement will be "WHERE 'primary_key_column' = 101
".
Return Values
Failure:FALSE | An error message will be set if a required table/feature is disabled.
Success:object
Example
$sql_select = array(...);
$sql_where = array(...);
$this->flexi_cart_admin->get_db_shipping_rate($sql_select, $sql_where)->result();
insert_db_shipping_rate()
Inserts a new record to the shipping rate table.
Library and Requirements
Available via the admin library only.
Requires all shipping database tables to be enabled.
Function Parameters
insert_db_shipping_rate(sql_insert)
Help
Name |
Data Type |
Required |
Default |
Description |
sql_insert |
array |
Yes |
FALSE |
Set the SQL INSERT statement used to insert data into the database.
Read the defining SQL documentation for further information.
|
How it Works
The function runs an SQL INSERT statement on the 'Shipping Rates' table, inserting data defined via the 'sql_insert' parameter.
Return Values
Failure:FALSE | An error message will be set if a required table/feature is disabled.
Success:int | id of the inserted record.
Example
$sql_insert = array(...);
$this->flexi_cart_admin->insert_db_shipping_rate($sql_insert);
update_db_shipping_rate()
Updates records in the shipping rate table.
Library and Requirements
Available via the admin library only.
Requires all shipping database tables to be enabled.
Function Parameters
update_db_shipping_rate(sql_update, sql_where)
Help
Name |
Data Type |
Required |
Default |
Description |
sql_update |
array |
Yes |
FALSE |
Set the SQL UPDATE statement used to update data into the database.
Read the defining SQL documentation for further information.
|
sql_where |
string | int | array |
No |
FALSE |
Set the SQL WHERE statement used to filter the database records to update.
Read the defining SQL documentation for further information.
|
How it Works
The function runs an SQL UPDATE statement on the 'Shipping Rates' table, updating data defined via the 'sql_update' parameter and filtered via the 'sql_where' parameter.
Notes
This function is compatible with flexi carts 'Query Builder' functions.
If an int value is submitted to the 'sql_where' parameter, the function will automatically match the value against the tables primary key.
Example: If 'sql_where' is submitted as an int of '101', the SQL WHERE statement will be "WHERE 'primary_key_column' = 101
".
Return Values
Failure:FALSE | An error message will be set if a required table/feature is disabled.
Success:int | The number of affected rows.
Example
$sql_update = array(...);
$sql_where = array(...);
$this->flexi_cart_admin->update_db_shipping_rate($sql_update, $sql_where);
delete_db_shipping_rate()
Deletes records from the shipping rate table.
Library and Requirements
Available via the admin library only.
Requires all shipping database tables to be enabled.
Function Parameters
delete_db_shipping_rate(sql_where)
Help
Name |
Data Type |
Required |
Default |
Description |
sql_where |
string | int | array |
Yes |
FALSE |
Set the SQL WHERE statement used to filter the database records to delete.
Read the defining SQL documentation for further information.
|
How it Works
The function runs an SQL DELETE statement on the 'Shipping Rates' table filtered via the 'sql_where' parameter.
Notes
This function is compatible with flexi carts 'Query Builder' functions.
If an int value is submitted to the 'sql_where' parameter, the function will automatically match the value against the tables primary key.
Example: If 'sql_where' is submitted as an int of '101', the SQL WHERE statement will be "WHERE 'primary_key_column' = 101
".
Return Values
Failure:FALSE | An error message will be set if a required table/feature is disabled.
Success:int | The number of affected rows.
Example
$sql_where = array(...);
$this->flexi_cart_admin->delete_db_shipping_rate($sql_where);