This is the API docs for LemonStand V1, which has been discontinued. LemonStand is now a cloud based platform, available at lemonstand.com.

LemonStand API

Shop_ShippingParams class

Defined in /modules/shop/models/shop_shippingparams.php, lines 31-264
Inheritance Phpr_Extension » Phpr_Extensible » Phpr_Validatable » Db_Base » Db_WhereBase » Db_SqlBase » Db_ActiveRecord » Shop_ShippingParams
Author LemonStand eCommerce Inc.
Represents the store shipping configuration. This class contains the shipping configuration information that you can edit on the System/Shipping Configuration page.

Public properties

Show inherited properties.

Property Type Description Defined By
auto_create_timestamps array a list of create timestamp columns. Db_ActiveRecord
auto_timestamps boolean determines whether create and update timestamp field should be set automatically. Db_ActiveRecord
auto_update_timestamps array a list of update timestamp columns. Db_ActiveRecord
calculated_columns array contains a list of calculated columns. Db_ActiveRecord
city string specifies the shipping origin city name. Shop_ShippingParams
country Shop_Country a reference to the shipping origin country. Shop_ShippingParams
custom_columns array contains a list of custom fields definition. Db_ActiveRecord
default_country Shop_Country a reference to the default shipping country. Shop_ShippingParams
default_shipping_city string specifies the default shipping city name. Shop_ShippingParams
default_shipping_zip string specifies the default shipping ZIP/postal code. Shop_ShippingParams
default_state Shop_CountryState a reference to the default shipping state. Shop_ShippingParams
dimension_unit string specifies the dimensions unit to use in the shipping cost calculations. Shop_ShippingParams
display_shipping_service_errors boolean determines if shipping service errors should be displayed to visitors. Shop_ShippingParams
fetched array contains an associative array of table column values fetched from the database. Db_ActiveRecord
has_and_belongs_to_many array contains a list of Has and Belongs To Many relations. Db_ActiveRecord
has_many array contains a list of Has Many relations. Db_ActiveRecord
has_one array contains a list of Has One relations. Db_ActiveRecord
primary_key string specifies a name of the table primary key. Db_ActiveRecord
sender_company string specifies the sender company name. Shop_ShippingParams
sender_first_name string specifies the sender first name. Shop_ShippingParams
sender_last_name string specifies the sender last name. Shop_ShippingParams
sender_phone string specifies the sender phone number. Shop_ShippingParams
state Shop_CountryState a reference to the shipping origin state. Shop_ShippingParams
street_addr string specifies the shipping origin street address. Shop_ShippingParams
validation Phpr_Validation contains the model's validation object. Db_ActiveRecord
weight_unit string specifies the weight unit to use in the shipping cost calculations. Shop_ShippingParams
zip_code string specifies the shipping origin ZIP/postal code. Shop_ShippingParams

Public methods

Show inherited methods.

Method Description Defined By
add_form_custom_area() adds a form custom area. Db_ActiveRecord
add_form_field() makes a column visible in forms. Db_ActiveRecord
add_form_partial() adds a custom form partial. Db_ActiveRecord
add_form_section() adds a form section. Db_ActiveRecord
after_create() called after a new object is saved to the database. Db_ActiveRecord
after_create_saved() called after a new object is saved to the database. Db_ActiveRecord
after_delete() called after an existing or new record is deleted from the database. Db_ActiveRecord
after_save() called after an existing or new record is created or updated in the database. Db_ActiveRecord
after_update() called after an existing record is updated in the database. Db_ActiveRecord
after_validation() triggered after the model column values are validated. Db_ActiveRecord
after_validation_on_create() triggered after a new model column values are validated. Db_ActiveRecord
after_validation_on_update() triggered after an existing model column values are validated. Db_ActiveRecord
before_create() called before a new object is saved to the database. Db_ActiveRecord
before_delete() called before a record is deleted from the database. Db_ActiveRecord
before_save() called before an existing or new record is created or updated in the database. Db_ActiveRecord
before_update() called before an existing record is updated in the database. Db_ActiveRecord
before_validation() triggered before the model column values are validated. Db_ActiveRecord
before_validation_on_create() triggered before a new model column values are validated. Db_ActiveRecord
before_validation_on_update() triggered before an existing model column values are validated. Db_ActiveRecord
collection() executes the find_all() method and returns a collection. Db_ActiveRecord
columnValue() alias for the displayField() method. Db_ActiveRecord
define_column() adds a column definition to the model. Db_ActiveRecord
define_multi_relation_column() adds column definition for has_and_belongs_to_many or has_many relation field. Db_ActiveRecord
define_relation_column() adds column definition for has_on or belongs_to relation field. Db_ActiveRecord
delete() deletes the record from the database. Db_ActiveRecord
delete_form_field() deletes a form field by its corresponding column name. Db_ActiveRecord
displayField() returns a formatted column value. The field should be defined with define_column(), Db_ActiveRecord
find() finds a record by its primary key value. Db_ActiveRecord
find_all() finds all records and returns the Db_DataCollection object, containing a list of models. Db_ActiveRecord
find_by() finds a record by a field value. Db_ActiveRecord
find_column_definition() finds a column definition by the column name. Db_ActiveRecord
find_form_field() finds a form field definition by its corresponding column name. Db_ActiveRecord
get() returns the class instance. Shop_ShippingParams
join() adds a table to the query with JOIN statement. Db_SqlBase
limit() allows to limit the result of the find_all() method with the specified number of records. Db_ActiveRecord
list_related_records_deferred() returns a list of relation objects, taking into account deferred relations. Db_ActiveRecord
order() allows to order the result of the find_all() method by a specific table column. Db_SqlBase
orWhere() adds OR statement to the where clause, allowing to to limit the result of the find() and find_all() methods with SQL filter. Db_WhereBase
paginate() allows to limit the result of the find_all() method with a single page of records. Db_ActiveRecord
requestRowCount() returns a number of rows which would be returned with find_all() method. Db_ActiveRecord
save() saves record to the database. Db_ActiveRecord
where() allows to limit the result of the find() and find_all() methods with SQL filter. Db_WhereBase

Events

Event Description
shop:onGetShippingParams Allows to override the store shipping parameters.

Property details

city property

public string $city;
Specifies the shipping origin city name.

country property

public Shop_Country $country;
A reference to the shipping origin country.

default_country property

public Shop_Country $default_country;
A reference to the default shipping country.

default_shipping_city property

public string $default_shipping_city;
Specifies the default shipping city name.

default_shipping_zip property

public string $default_shipping_zip;
Specifies the default shipping ZIP/postal code.

default_state property

public Shop_CountryState $default_state;
A reference to the default shipping state.

dimension_unit property

public string $dimension_unit;
Specifies the dimensions unit to use in the shipping cost calculations. Allowed values are:
  • IN
  • CM

display_shipping_service_errors property

public boolean $display_shipping_service_errors;
Determines if shipping service errors should be displayed to visitors.

sender_company property

public string $sender_company;
Specifies the sender company name.

sender_first_name property

public string $sender_first_name;
Specifies the sender first name.

sender_last_name property

public string $sender_last_name;
Specifies the sender last name.

sender_phone property

public string $sender_phone;
Specifies the sender phone number.

state property

public Shop_CountryState $state;
A reference to the shipping origin state.

street_addr property

public string $street_addr;
Specifies the shipping origin street address.

weight_unit property

public string $weight_unit;
Specifies the weight unit to use in the shipping cost calculations. Allowed values are:
  • LBS
  • KGS

zip_code property

public string $zip_code;
Specifies the shipping origin ZIP/postal code.

Method details

get() method

public static Shop_ShippingParams get(boolean $edit_mode=false)
$edit_mode boolean this parameter is used by the system internally.
{return} Shop_ShippingParams returns the Shop_ShippingParams object.
Returns the class instance. Use this method instead of the constructor to create instances of the class.