User Guide | Getting Cart Config Session Data

When the flexi cart library is first loaded, an array is automatically created that is setup to match the carts default settings, this data is then stored in the browsers session. All items and settings that are then later added and altered within the cart are updated to the carts session data.

The data within the carts session can then be accessed and in many cases, formatted and customised using the large range of functions that are available from the lite and standard libraries.

Get Cart Config Session Data

Cart Column Config | Cart Settings Config | Cart Internal Settings Config
Cart Config Function Index | Set Cart Config Session Data | Cart Config Admin Data
Get Order Config Settings from Session

order_number() | minimum_order() | minimum_order_status()

Get Tax Config Settings from Session

display_prices_inc_tax() | cart_prices_inc_tax()

Get Custom Statuses from Session

custom_status_1() | custom_status_2() | custom_status_3()

Get Misc. Config Settings from Session

cart_data_id() | reward_point_multiplier()

Help with Session Data 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.

cart_data_id()

Returns the id of the current cart data array.

The cart id is used to identify cart data that is saved to the database.


Library and Requirements

Available via the lite, standard and admin libraries.

Does not require any database tables to be enabled.

Return Values

Value Not Set:FALSE

Value Set:int

Examples
Note: The returned example values below are displaying live data from the current cart session data.
cart_data_id() What is the current cart data id (if set)? bool(false)

order_number()

Returns the current order number.


Library and Requirements

Available via the lite, standard and admin libraries.

Does not require any database tables to be enabled.

Return Values

Value Not Set:FALSE

Value Set:string

Examples
Note: The returned example values below are displaying live data from the current cart session data.
order_number() What is the current order number (if set)? bool(false)

minimum_order()

Returns the minimum order value required for the cart to checkout.


Library and Requirements

Available via the lite, standard and admin libraries.

Does not require any database tables to be enabled.

Function Parameters
minimum_order(format, internal_value) Help
Name Data Type Required Default Description
format bool No TRUE Define whether to format the returned value as a currency.
internal_value bool No FALSE Defines whether to return the value using the carts internal currency instead of the users current currency.
Return Values

Value Set:int | (string if value is formatted)

Examples
Note: The returned example values below are displaying live data from the current cart session data.
minimum_order(TRUE, FALSE) What is the current currencies minimum order value? £0.00
minimum_order(TRUE, TRUE) What is the internal currencies minimum order value? £0.00

minimum_order_status()

Returns whether a defined cart summary column is equal or more than the minimum required value to checkout.


Library and Requirements

Available via the lite, standard and admin libraries.

Does not require any database tables to be enabled.

Function Parameters
minimum_order_status(summary_column, inc_discount) Help
Name Data Type Required Default Description
summary_column string No item_summary_total Defines the summary column to return discount data for.
Valid values are 'item_summary_total', 'shipping_total' and 'total'.
If no value is set, discount data will be returned for all summary columns.
inc_discount bool No TRUE Define whether the returned value should include any active discounts.
Return Values

Invalid:FALSE

Valid:TRUE

Examples
Note: The returned example values below are displaying live data from the current cart session data.
minimum_order_status('item_summary_total', TRUE) Is the 'Item Summary Total' >= £0.00, including any set discounts? bool(true)
minimum_order_status('item_summary_total', FALSE) Is the 'Item Summary Total' >= £0.00, excluding any set discounts? bool(true)

display_prices_inc_tax()

Returns whether the user is currently viewing prices including tax.


Library and Requirements

Available via the lite, standard and admin libraries.

Does not require any database tables to be enabled.

Return Values

Excluding Tax:FALSE

Including Tax:TRUE

Examples
Note: The returned example values below are displaying live data from the current cart session data.
display_prices_inc_tax() Are prices currently displayed including tax? bool(true)

cart_prices_inc_tax()

Returns whether the cart is setup by default to handle and display all prices as including tax.


Library and Requirements

Available via the lite, standard and admin libraries.

Does not require any database tables to be enabled.

Return Values

Excluding Tax:FALSE

Including Tax:TRUE

Examples
Note: The returned example values below are displaying live data from the current cart session data.
cart_prices_inc_tax() Do prices submitted to the cart include tax? bool(true)

reward_point_multiplier()

Returns the reward point multiplier that is used to calculate the number of reward points earnt per 1 unit of currency (i.e £1.00).


Library and Requirements

Available via the lite, standard and admin libraries.

Does not require any database tables to be enabled.

Return Values

Value Set:int

Examples
Note: The returned example values below are displaying live data from the current cart session data.
reward_point_multiplier() How many reward points are earnt per £1.00? 10.0000

custom_status_1()

Returns the value of the carts custom status #1.


Library and Requirements

Available via the lite, standard and admin libraries.

Does not require any database tables to be enabled.

Return Values

Value Not Set:FALSE

Value Set:string | int

Examples
Note: The returned example values below are displaying live data from the current cart session data.
custom_status_1() What is the value of the carts custom status #1? bool(false)

custom_status_2()

Returns the value of the carts custom status #2.


Library and Requirements

Available via the lite, standard and admin libraries.

Does not require any database tables to be enabled.

Return Values

Value Not Set:FALSE

Value Set:string | int

Examples
Note: The returned example values below are displaying live data from the current cart session data.
custom_status_2() What is the value of the carts custom status #2? bool(false)

custom_status_3()

Returns the value of the carts custom status #3.


Library and Requirements

Available via the lite, standard and admin libraries.

Does not require any database tables to be enabled.

Return Values

Value Not Set:FALSE

Value Set:string | int

Examples
Note: The returned example values below are displaying live data from the current cart session data.
custom_status_3() What is the value of the carts custom status #3? bool(false)