order
extends expRecord
in package
This is the class expRecord
Tags
Table of Contents
- $applied_discounts : mixed
- $attachable_items_to_save : mixed
- $billing_required : mixed
- $cart_discounts : mixed
- $classname : mixed
- $default_sort_direction : mixed
- $default_sort_field : mixed
- $do_not_validate : mixed
- $forced_shipping : mixed
- $get_assoc_for : mixed
- $get_attachable_for : mixed
- $grouping_sql : mixed
- $has_and_belongs_to_many : mixed
- $has_and_belongs_to_self : mixed
- $has_extended_fields : mixed
- $has_many : mixed
- $has_many_self : mixed
- $has_one : mixed
- $identifier : mixed
- $needs_approval : mixed
- $orderitem : mixed
- $product_discounts : mixed
- $product_forcing_shipping : mixed
- $promos : mixed
- $rank_by_field : mixed
- $shipping_required : mixed
- $shipping_taxed : mixed
- $shippingmethods : mixed
- $supports_revisions : mixed
- $tablename : mixed
- $taxzones : mixed
- $total : mixed
- $validate : mixed
- $validates : mixed
- $attachable_item_types : mixed
- $classinfo : mixed
- $table : mixed
- __construct() : mixed
- __get() : null
- Generic magic method
- __isset() : bool
- Generic magic method
- __set() : mixed
- Generic magic method We MUST create/set non-existing properties for Exponent code to work
- __unset() : mixed
- Generic magic method
- afterCreate() : mixed
- after creating item
- afterDelete() : mixed
- is run after deleting item, should delete associated items here if needed
- afterSave() : mixed
- after saving item
- afterUpdate() : mixed
- after updating item
- afterValidation() : mixed
- after validating item
- afterValidationOnCreate() : mixed
- after validating item during creation
- afterValidationOnUpdate() : mixed
- after validating item during update
- associateWith() : mixed
- get objects this item belongs to ??
- attachItem() : bool
- attach to item
- beforeCreate() : mixed
- before creating item
- beforeDelete() : mixed
- is run before deleting item
- beforeSave() : mixed
- before saving item
- beforeUpdate() : mixed
- before updating item
- beforeValidation() : mixed
- before validating item
- beforeValidationOnCreate() : mixed
- before validating item during creation
- beforeValidationOnUpdate() : mixed
- before validating item during update
- build() : mixed
- Adds table fields as class properties to current "record" class.
- calculateGrandTotal() : mixed
- cleanOrderitems() : mixed
- countOrderitemsByShippingmethod() : mixed
- delete() : bool
- delete item
- displayname() : string
- name of model
- find() : array<string|int, mixed>|int|object
- find an item or items
- findBy() : array<string|int, mixed>
- find an item by column
- findValue() : array<string|int, mixed>|bool
- find a value(s) by column
- findWhereAttachedTo() : array<string|int, mixed>
- this function finds models that have this attachable item attached
- forcedShipping() : bool
- Determine if the order has any item with forced shipping
- getAssociatedObjects() : null
- get item's associated objects
- getAttachableItemTables() : array<string|int, mixed>
- used for import/export
- getBillingMethods() : mixed
- getCartTotal() : mixed
- getCurrentBillingMethod() : mixed
- getCurrentShippingMethod() : mixed
- getDefaultOrderStatus() : mixed
- getDefaultOrderType() : mixed
- getForcedShippingMethod() : shippingmethod
- Update order object with forced shipping details
- getInvoiceNumber() : mixed|null
- Return next invoice number and advance counter
- getOrderDiscounts() : mixed
- getOrderitemsByShippingmethod() : mixed
- getOrdersCount() : int
- Return number of orders in requested state
- getOrderStatuses() : mixed
- getOrderType() : mixed
- getOrderTypes() : mixed
- getPoster() : null|string
- return the item poster
- getSalesReps() : mixed
- getShippingMethods() : mixed
- getStatus() : mixed
- getTimestamp() : mixed
- return the item timestamp
- getUserCart() : mixed
- isItemInCart() : mixed
- isSearchable() : bool
- is model content searchable?
- makeSefUrl() : mixed
- make an sef_url for item
- name() : string
- name of model for backwards compat with old modules
- refresh() : bool
- re-construct the item from the database
- rerank() : mixed
- rerank items
- save() : mixed
- save item
- saveAssociatedObjects() : mixed
- save associated objects
- setCartCookie() : mixed
- setOrderStatus() : mixed
- setOrderType() : mixed
- setReferencingIds() : mixed
- sortStatuses() : mixed
- update() : mixed
- update item
- validate() : bool
- validate item sef_url
- validateDiscounts() : mixed
- checkForAttachableItems() : bool
- check for what objects may be attached
- getAttachableItems() : mixed
- get attached objects for this item
- getAssociatedObjectsForThisModel() : mixed
- gets associated objects for this model
- makeManyToManyTablename() : string
- create a many to many table relationship
- mergeReturnCount() : mixed
- setReturnCount() : mixed
Properties
$applied_discounts
public
mixed
$applied_discounts
= 0
$attachable_items_to_save
public
mixed
$attachable_items_to_save
$billing_required
public
mixed
$billing_required
= \false
$cart_discounts
public
mixed
$cart_discounts
= 0
$classname
public
mixed
$classname
= ''
$default_sort_direction
public
mixed
$default_sort_direction
= ''
$default_sort_field
public
mixed
$default_sort_field
= ''
$do_not_validate
public
mixed
$do_not_validate
= array()
$forced_shipping
public
mixed
$forced_shipping
= \false
$get_assoc_for
public
mixed
$get_assoc_for
= array('orderitem', 'billingmethod', 'order_discounts')
$get_attachable_for
public
mixed
$get_attachable_for
= array()
$grouping_sql
public
mixed
$grouping_sql
= ''
$has_and_belongs_to_many
public
mixed
$has_and_belongs_to_many
= array()
$has_and_belongs_to_self
public
mixed
$has_and_belongs_to_self
= array()
$has_extended_fields
public
mixed
$has_extended_fields
= array()
$has_many
public
mixed
$has_many
= array('orderitem', 'order_discounts', 'billingmethod', 'order_status_changes')
$has_many_self
public
mixed
$has_many_self
= array()
$has_one
public
mixed
$has_one
= array('order_status', 'order_type', 'shippingmethod', 'user')
$identifier
public
mixed
$identifier
= 'id'
$needs_approval
public
mixed
$needs_approval
= \false
$orderitem
public
mixed
$orderitem
= array()
$product_discounts
public
mixed
$product_discounts
= 0
$product_forcing_shipping
public
mixed
$product_forcing_shipping
= ''
$promos
public
mixed
$promos
= array()
$rank_by_field
public
mixed
$rank_by_field
= ''
$shipping_required
public
mixed
$shipping_required
= \false
$shipping_taxed
public
mixed
$shipping_taxed
= \false
$shippingmethods
public
mixed
$shippingmethods
= array()
$supports_revisions
public
mixed
$supports_revisions
= \false
$tablename
public
mixed
$tablename
= ''
$taxzones
public
mixed
$taxzones
= array()
$total
public
mixed
$total
= 0
$validate
public
mixed
$validate
= array()
$validates
public
mixed
$validates
= array()
$attachable_item_types
protected
mixed
$attachable_item_types
= array()
$classinfo
protected
mixed
$classinfo
= \null
$table
protected
mixed
$table
= 'orders'
Methods
__construct()
public
__construct([mixed $params = null ][, mixed $get_assoc = true ][, mixed $get_attached = true ]) : mixed
Parameters
- $params : mixed = null
- $get_assoc : mixed = true
- $get_attached : mixed = true
Return values
mixed —__get()
Generic magic method
public
__get( $property) : null
Parameters
Return values
null —__isset()
Generic magic method
public
__isset( $property) : bool
Parameters
Return values
bool —__set()
Generic magic method We MUST create/set non-existing properties for Exponent code to work
public
__set( $property, $value) : mixed
Parameters
Return values
mixed —__unset()
Generic magic method
public
__unset( $property) : mixed
Parameters
Return values
mixed —afterCreate()
after creating item
public
afterCreate() : mixed
Return values
mixed —afterDelete()
is run after deleting item, should delete associated items here if needed
public
afterDelete() : mixed
Return values
mixed —afterSave()
after saving item
public
afterSave() : mixed
Return values
mixed —afterUpdate()
after updating item
public
afterUpdate() : mixed
Return values
mixed —afterValidation()
after validating item
public
afterValidation() : mixed
Return values
mixed —afterValidationOnCreate()
after validating item during creation
public
afterValidationOnCreate() : mixed
Return values
mixed —afterValidationOnUpdate()
after validating item during update
public
afterValidationOnUpdate() : mixed
Return values
mixed —associateWith()
get objects this item belongs to ??
public
associateWith( $datatype, $id) : mixed
Type of associations has_and_belongs_to_many
Parameters
Return values
mixed —attachItem()
attach to item
public
attachItem( $item[, string $subtype = '' ][, bool $replace = true ]) : bool
Parameters
Return values
bool —beforeCreate()
before creating item
public
beforeCreate() : mixed
Return values
mixed —beforeDelete()
is run before deleting item
public
beforeDelete() : mixed
Return values
mixed —beforeSave()
before saving item
public
beforeSave() : mixed
Return values
mixed —beforeUpdate()
before updating item
public
beforeUpdate() : mixed
Return values
mixed —beforeValidation()
before validating item
public
beforeValidation() : mixed
Return values
mixed —beforeValidationOnCreate()
before validating item during creation
public
beforeValidationOnCreate() : mixed
Return values
mixed —beforeValidationOnUpdate()
before validating item during update
public
beforeValidationOnUpdate() : mixed
Return values
mixed —build()
Adds table fields as class properties to current "record" class.
public
build([mixed $params = array() ]) : mixed
Loads Table schema data and creates new class properties based upon the fields in given table.
Additionally, if a record ID is given, that record is pulled and field values are also populated into class properties.
Parameters
- $params : mixed = array()
-
array or Object for table selection
Tags
Return values
mixed —calculateGrandTotal()
public
calculateGrandTotal() : mixed
Return values
mixed —cleanOrderitems()
public
cleanOrderitems() : mixed
Return values
mixed —countOrderitemsByShippingmethod()
public
countOrderitemsByShippingmethod(mixed $shippingmethod_id) : mixed
Parameters
- $shippingmethod_id : mixed
Return values
mixed —delete()
delete item
public
delete([string $where = '' ]) : bool
Parameters
- $where : string = ''
Return values
bool —displayname()
name of model
public
static displayname() : string
Return values
string —find()
find an item or items
public
find([string $range = 'all' ][, null $where = null ][, null $order = null ][, null $limit = null ], int $limitstart[, bool $get_assoc = true ][, bool $get_attached = true ][, array<string|int, mixed> $except = array() ][, bool $cascade_except = false ]) : array<string|int, mixed>|int|object
Parameters
- $range : string = 'all'
-
// all, revisions, first, bytitle, count, bytag, bycat,
- $where : null = null
- $order : null = null
- $limit : null = null
- $limitstart : int
- $get_assoc : bool = true
- $get_attached : bool = true
- $except : array<string|int, mixed> = array()
- $cascade_except : bool = false
Return values
array<string|int, mixed>|int|object —findBy()
find an item by column
public
findBy( $column, $value[, bool $get_assoc = true ][, bool $get_attached = true ][, array<string|int, mixed> $except = array() ][, bool $cascade_except = false ]) : array<string|int, mixed>
Parameters
- $column :
- $value :
- $get_assoc : bool = true
- $get_attached : bool = true
- $except : array<string|int, mixed> = array()
- $cascade_except : bool = false
Return values
array<string|int, mixed> —findValue()
find a value(s) by column
public
findValue([string $range = 'all' ][, string $column = null ][, string $where = null ][, string $order = null ][, bool $distinct = false ]) : array<string|int, mixed>|bool
Parameters
- $range : string = 'all'
- $column : string = null
- $where : string = null
- $order : string = null
- $distinct : bool = false
Return values
array<string|int, mixed>|bool —findWhereAttachedTo()
this function finds models that have this attachable item attached
public
findWhereAttachedTo( $content_type) : array<string|int, mixed>
Parameters
Return values
array<string|int, mixed> —forcedShipping()
Determine if the order has any item with forced shipping
public
forcedShipping() : bool
Return values
bool —getAssociatedObjects()
get item's associated objects
public
getAssociatedObjects([object $obj = null ]) : null
Type of associations has_one has_many has_and_belongs_to_many
Parameters
- $obj : object = null
Return values
null —getAttachableItemTables()
used for import/export
public
getAttachableItemTables() : array<string|int, mixed>
Return values
array<string|int, mixed> —getBillingMethods()
public
getBillingMethods() : mixed
Return values
mixed —getCartTotal()
public
getCartTotal() : mixed
Return values
mixed —getCurrentBillingMethod()
public
getCurrentBillingMethod() : mixed
Return values
mixed —getCurrentShippingMethod()
public
getCurrentShippingMethod() : mixed
Return values
mixed —getDefaultOrderStatus()
public
static getDefaultOrderStatus() : mixed
Return values
mixed —getDefaultOrderType()
public
static getDefaultOrderType() : mixed
Return values
mixed —getForcedShippingMethod()
Update order object with forced shipping details
public
getForcedShippingMethod() : shippingmethod
Return values
shippingmethod —getInvoiceNumber()
Return next invoice number and advance counter
public
getInvoiceNumber([bool $increment = true ]) : mixed|null
Parameters
- $increment : bool = true
Return values
mixed|null —getOrderDiscounts()
public
getOrderDiscounts() : mixed
Return values
mixed —getOrderitemsByShippingmethod()
public
getOrderitemsByShippingmethod(mixed $shippingmethod_id) : mixed
Parameters
- $shippingmethod_id : mixed
Return values
mixed —getOrdersCount()
Return number of orders in requested state
public
static getOrdersCount([string $state = 'new' ]) : int
Parameters
- $state : string = 'new'
Return values
int —getOrderStatuses()
public
static getOrderStatuses() : mixed
Return values
mixed —getOrderType()
public
getOrderType() : mixed
Return values
mixed —getOrderTypes()
public
static getOrderTypes() : mixed
Return values
mixed —getPoster()
return the item poster
public
getPoster([null $display = null ]) : null|string
Parameters
- $display : null = null
Return values
null|string —getSalesReps()
public
static getSalesReps() : mixed
Return values
mixed —getShippingMethods()
public
getShippingMethods() : mixed
Return values
mixed —getStatus()
public
getStatus() : mixed
Return values
mixed —getTimestamp()
return the item timestamp
public
getTimestamp(int $type) : mixed
Parameters
- $type : int
Return values
mixed —getUserCart()
public
static getUserCart() : mixed
Return values
mixed —isItemInCart()
public
isItemInCart(mixed $id, mixed $type[, mixed $orderitem_id = null ]) : mixed
Parameters
- $id : mixed
- $type : mixed
- $orderitem_id : mixed = null
Return values
mixed —isSearchable()
is model content searchable?
public
static isSearchable() : bool
Return values
bool —makeSefUrl()
make an sef_url for item
public
makeSefUrl() : mixed
Return values
mixed —name()
name of model for backwards compat with old modules
public
name() : string
Return values
string —refresh()
re-construct the item from the database
public
refresh() : bool
Tags
Return values
bool —rerank()
rerank items
public
rerank( $direction[, string $where = '' ]) : mixed
Parameters
Return values
mixed —save()
save item
public
save([bool $validate = false ][, bool $force_no_revisions = false ]) : mixed
Parameters
- $validate : bool = false
- $force_no_revisions : bool = false
Return values
mixed —saveAssociatedObjects()
save associated objects
public
saveAssociatedObjects() : mixed
Type of associations has_one
Return values
mixed —setCartCookie()
public
static setCartCookie(mixed $cart) : mixed
Parameters
- $cart : mixed
Return values
mixed —setOrderStatus()
public
setOrderStatus(mixed $params) : mixed
Parameters
- $params : mixed
Return values
mixed —setOrderType()
public
setOrderType(mixed $params) : mixed
Parameters
- $params : mixed
Return values
mixed —setReferencingIds()
public
setReferencingIds() : mixed
Return values
mixed —sortStatuses()
public
static sortStatuses(mixed $a, mixed $b) : mixed
Parameters
- $a : mixed
- $b : mixed
Return values
mixed —update()
update item
public
update([array<string|int, mixed>|object $params = array() ]) : mixed
Parameters
- $params : array<string|int, mixed>|object = array()
Return values
mixed —validate()
validate item sef_url
public
validate() : bool
Return values
bool —validateDiscounts()
public
validateDiscounts([mixed $redirectOnFailureTo = array('controller' => 'cart', 'action' => 'show') ]) : mixed
Parameters
- $redirectOnFailureTo : mixed = array('controller' => 'cart', 'action' => 'show')
Return values
mixed —checkForAttachableItems()
check for what objects may be attached
protected
checkForAttachableItems( $params) : bool
Parameters
Return values
bool —getAttachableItems()
get attached objects for this item
protected
getAttachableItems() : mixed
Return values
mixed —getAssociatedObjectsForThisModel()
gets associated objects for this model
private
getAssociatedObjectsForThisModel([array<string|int, mixed> $except = array() ][, bool $cascade_except = false ]) : mixed
Type of associations has_extended_fields has_one has_many has_many_self has_and_belongs_to_many has_and_belongs_to_self
Parameters
- $except : array<string|int, mixed> = array()
- $cascade_except : bool = false
Return values
mixed —makeManyToManyTablename()
create a many to many table relationship
private
makeManyToManyTablename( $assoc_table) : string
Parameters
Return values
string —mergeReturnCount()
private
mergeReturnCount([mixed $merge_array = array() ]) : mixed
Parameters
- $merge_array : mixed = array()
Return values
mixed —setReturnCount()
private
setReturnCount(mixed $orig_referrer[, mixed $merge_array = array() ]) : mixed
Parameters
- $orig_referrer : mixed
- $merge_array : mixed = array()