Documentation

Shop_Order_Model extends Core_Entity
in package

Shop_Order_Model

Tags
subpackage

Shop

version
7.x
author

Hostmake LLC

copyright

© 2005-2022 ООО "Хостмэйк" (Hostmake LLC), http://www.hostcms.ru

Table of Contents

TYPE  = 5
$config  : mixed
ORM config
$order_items  : int
Backend property
$rollback  : mixed
Backend property
$_allowedTags  : array<string|int, mixed>
Allowed tags. If list of tags is empty, all tags will show.
$_attributes  : array<string|int, mixed>
Entity Attributes
$_belongsTo  : array<string|int, mixed>
Belongs to relations
$_changeCopiedName  : bool
Change copied name is necessary, default FALSE
$_changedColumns  : array<string|int, mixed>
List of changed columns
$_dataValues  : array<string|int, mixed>
data-values, e.g. dataMyValue
$_forbiddenTags  : array<string|int, mixed>
Forbidden tags. If list of tags is empty, all tags will show.
$_hasMany  : array<string|int, mixed>
One-to-many or many-to-many relations
$_hasOne  : array<string|int, mixed>
One-to-one relations
$_hasRevisions  : mixed
Has revisions
$_marksDeleted  : mixed
Marks deleted entity
$_modelColumns  : array<string|int, mixed>
List of columns in model with values
$_modelName  : mixed
Model name, e.g. 'book' for 'Book_Model'
$_nameColumn  : string
Column consist item's name
$_oShop_Discountcard  : mixed
$_preloadValues  : array<string|int, mixed>
List of preloaded values
$_primaryKey  : string
Primary key
$_propertyValues  : array<string|int, mixed>
Values of all properties of item
$_queryBuilder  : Core_QueryBuilder_Select
Select query builder
$_shortcodeTags  : array<string|int, mixed>
List of Shortcodes tags
$_showXmlCountry  : bool
Show countries data in XML
$_showXmlCurrency  : bool
Show currency data in XML
$_showXmlDelivery  : bool
Show delivery data in XML
$_showXmlItems  : mixed
Show order items data in XML
$_showXmlOrderStatus  : bool
Show order statuses data in XML
$_showXmlPaymentSystem  : bool
Show payment systems data in XML
$_showXmlProperties  : bool
Show properties in XML
$_showXmlSiteuser  : bool
Show siteuser data in XML
$_skipColumns  : array<string|int, mixed>
List of skipped columns from table
$_sorting  : array<string|int, mixed>
Default sorting for models
$_tableColumns  : array<string|int, mixed>
List of columns in table
$_tableName  : mixed
Table name, e.g. 'books' for 'Book_Model'
$_typicalForbiddenTags  : array<string|int, mixed>
Typical forbidden tags.
$_xmlSortPropertiesValues  : mixed
Sort properties values in XML
__call()  : mixed
Triggered when invoking inaccessible methods in an object context
__construct()  : mixed
Constructor.
add()  : self
Add related object. If main object does not save, it will save.
addAllowedTag()  : self
Add tag to allowed tags list
addAttribute()  : self
Add entity attribute
addCml()  : mixed
Add order CommerceML
addEntities()  : self
Add children entities
addEntity()  : self
Add a children entity
addForbiddenTag()  : self
Add tag to forbidden tags list
addForbiddenTags()  : self
Add tags to forbidden tags list
addPurchaseDiscount()  : self
Add discounts to the shop_order
addXmlTag()  : self
Add external tag for entity
applyMarksDeleted()  : self
Apply markDeleted flag if is set
backupRevision()  : self
Backup revision
cancel()  : self
Cancel the order
cancelPaid()  : self
Cancel payment
changeCopiedName()  : self
Set if change copied name is necessary
changed()  : bool
Check model has been changed.
changeStatusCanceled()  : self
Change cancel on opposite
changeStatusPaid()  : self
Change cancel on opposite
changeStatusPosted()  : self
Change posted
check()  : self
Check model values. If model has incorrect value, one will correct or call exception.
checkShopOrderItemStatuses()  : mixed
checkShopOrderStatusDeadline()  : self
Check shop order status deadline
chunk()  : bool
Retrieve a small chunk and feeds each one into $callback for processing. It stops looping when $callback returns FALSE
clear()  : self
Clear object
clearEntities()  : self
Clear enities
clearEntitiesAfterGetXml()  : self
Clear all entities after XML generation
clearXmlTags()  : mixed
Clear external XML tags for entity.
companyBadge()  : string
Backend badge
copy()  : Core_Entity
Copy object
create()  : self
Insert new object data into database
createDir()  : self
Create directory for item
createInvoice()  : self
Generate invoice by invoice_template or set invoice like id
date()  : mixed
delete()  : Core_Entity
Delete object from database
deleteAll()  : self
Delete all object
deleteReservedItems()  : self
Delete reserved items for order
factory()  : mixed
Create and return an object of model
find()  : self
Find object in database and load one. Use clear() before find() with conditions!
findAll()  : array<string|int, mixed>
Find all objects
getAmount()  : float
Get amount of order
getByShopId()  : array<string|int, mixed>
Get orders by shop id
getChangedData()  : array<string|int, mixed>
Get changed columns with values
getClassName()  : string
Get Model CallsName
getCount()  : int|false
Get count object
getCustomerName()  : mixed
getDatabaseDriver()  : string
Get name of Database Driver
getDataValues()  : array<string|int, mixed>
Get dataValues
getEntities()  : array<string|int, mixed>
Get children entities
getFieldIDs()  : array<string|int, mixed>
Get visible field's IDs
getFields()  : array<string|int, mixed>
Get field's values
getFirst()  : null|Core_ORM
Get fist entity, ordered by primary key
getForbiddenTags()  : array<string|int, mixed>
Get forbidden tags list
getFullAddress()  : mixed
getLast()  : null|Core_ORM
Get last entity, ordered by primary key
getMarksDeleted()  : string
Get column name for marks deleted
getModelName()  : string
Get model name, e.g. 'book' for 'Book_Model'
getName()  : string
Get entity name
getNameColumn()  : string
Get Name Column
getOrderHref()  : string
Get item href
getOrderPath()  : string
Get item path include CMS_FOLDER
getPrimaryKey()  : mixed
Get primary key value
getPrimaryKeyName()  : string
Get primary key name
getPrintlayoutReplaces()  : array<string|int, mixed>
Get printlayout replaces
getPropertyValues()  : array<string|int, mixed>
Values of all properties of item Значения всех свойств товара
getQuantity()  : float
Get quantity of items in an order
getRelatedSite()  : Site_Model|null
Get Related Site
getRelations()  : array<string|int, mixed>
Get $this->_relations
getResponsibleUsers()  : array<string|int, mixed>
Get responsible users
getStdObject()  : stdObject
Get stdObject for entity and children entities
getSum()  : float
Get sum of order
getTableColumns()  : array<string|int, mixed>
Get tableColumns
getTableColums()  : array<string|int, mixed>
Get table columns. Fix wrong method name
getTableName()  : string
Get table name
getTrashDescription()  : string
Get entity description
getWeight()  : float
Get order weight
getXml()  : string
Get XML for entity and children entities
getXmlTagName()  : string
Get tag name
getXmlTags()  : array<string|int, mixed>
Get external XML tags for entity.
historyPushCanceled()  : self
Push canceled history
historyPushChangeStatus()  : self
Push change status history
historyPushChangeUser()  : self
Push change status history
historyPushPaid()  : self
Push paid history
historyPushPosted()  : self
Push posted history
isCallable()  : bool
Verify that the contents of a variable can be called as a function
isEmptyPrimaryKey()  : bool
Check is primary key NULL
markDeleted()  : Core_Entity
Mark entity as deleted
merge()  : self
Merge list item with another one
notifyBotsChangeStatus()  : self
Notify Bots
order_items()  : mixed
order_itemsBadge()  : string
Backend badge
orderPopover()  : string
Get Popover Content
ordersCurrentMonth()  : int
Get the number of orders for the current month
ordersCurrentYear()  : int
Get the number of orders for the current year
ordersToday()  : int
Get the number of orders for today
paid()  : self
Pay the order
post()  : self
Add entries
propertyValue()  : string
Get property value for SEO-templates
queryBuilder()  : Core_QueryBuilder_Select
Get query builder for select
recalcDelivery()  : bool
Recalc delivery price by delivery conditions
remove()  : self
Remove related object. If main object does not save, it will save.
removeForbiddenTag()  : self
Remove tag from forbidden tags list
reserveItems()  : self
Reserve items for order
rollbackRevision()  : self
Rollback Revision
save()  : self
Save object. Uses self::update() or self::create()
sendMail()  : self
Send order e-mails
setCheck()  : self
Set _check flag
setDatabaseDriver()  : mixed
Set name of Database Driver
setMarksDeleted()  : self
Set column name for marks deleted
setRelations()  : self
Set $this->_relations
setXmlTagName()  : self
Set name of XML node
shop_order_status_idBackend()  : string
Backend callback method
showXmlCountry()  : self
Show country in XML
showXmlCurrency()  : self
Show currency in XML
showXmlDelivery()  : self
Show delivery in XML
showXmlItems()  : self
Show items in XML
showXmlOrderStatus()  : self
Show order's status in XML
showXmlPaymentSystem()  : self
Show payment system in XML
showXmlProperties()  : self
Show properties in XML
showXmlSiteuser()  : self
Show siteuser in XML
smallAvatarBackend()  : mixed
sum()  : string
Get order sum with currency name
toArray()  : array<string|int, mixed>
Convert Object to Array
uncancel()  : self
Uncancel the order
undelete()  : self
Turn off deleted status
unpost()  : self
Remove all shop warehouse entries by document
update()  : self
Update object data into database
weightBackend()  : string
Backend callback method
_createNotification()  : self
Create notification for subscribers
_deleteDigitalItems()  : self
Delete digital items
_getCopiedName()  : mixed
Get the name of a new copied object
_paidShopDiscountcard()  : mixed
_paidTransaction()  : self
Списание или возврат товара на склад, начисление и стронирование операций по лицевому счету
_prepareData()  : self
Prepare entity and children entities
_preparePropertyValue()  : mixed
Prepare Property Value
getDatabase()  : Core_DataBase
Get Database

Constants

Properties

$config

ORM config

public static mixed $config = \NULL

$order_items

Backend property

public int $order_items = 1

$rollback

Backend property

public mixed $rollback = 0

$_allowedTags

Allowed tags. If list of tags is empty, all tags will show.

protected array<string|int, mixed> $_allowedTags = array()

$_attributes

Entity Attributes

protected array<string|int, mixed> $_attributes = array()

$_belongsTo

Belongs to relations

protected array<string|int, mixed> $_belongsTo = array('shop' => array(), 'shop_company' => array('model' => 'Company', 'foreign_key' => 'company_id'), 'shop_country_location' => array(), 'shop_country' => array(), 'shop_country_location_city' => array(), 'shop_country_location_city_area' => array(), 'shop_delivery' => array(), 'shop_delivery_condition' => array(), 'siteuser' => array(), 'shop_currency' => array(), 'shop_order_status' => array(), 'shop_payment_system' => array(), 'source' => array(), 'user' => array())

$_changeCopiedName

Change copied name is necessary, default FALSE

protected bool $_changeCopiedName = \FALSE

$_changedColumns

List of changed columns

protected array<string|int, mixed> $_changedColumns = array()

$_dataValues

data-values, e.g. dataMyValue

protected array<string|int, mixed> $_dataValues = array()

$_forbiddenTags

Forbidden tags. If list of tags is empty, all tags will show.

protected array<string|int, mixed> $_forbiddenTags = array('deleted', 'user_id', 'datetime', 'payment_datetime', 'status_datetime')

$_hasMany

One-to-many or many-to-many relations

protected array<string|int, mixed> $_hasMany = array('shop_order_item' => array(), 'shop_item_reserved' => array(), 'shop_siteuser_transaction' => array(), 'shop_discountcard_bonus' => array(), 'shop_discountcard_bonus_transaction' => array(), 'shop_purchase_discount_coupon' => array(), 'shop_order_history' => array())

$_hasOne

One-to-one relations

protected array<string|int, mixed> $_hasOne = array()
// Relation one-to-one for Book-Comment: protected $_hasOne = array('comment' => array()); // Equivalence relation one-to-one for Book-Comment with detailed conditions: // comment - Model name // foreign_key - Foreign key protected $_hasOne = array('comment' => array( 'foreign_key' => 'book_id' ));

$_hasRevisions

Has revisions

protected mixed $_hasRevisions = \FALSE

$_marksDeleted

Marks deleted entity

protected mixed $_marksDeleted = 'deleted'

$_modelColumns

List of columns in model with values

protected array<string|int, mixed> $_modelColumns = array()

$_modelName

Model name, e.g. 'book' for 'Book_Model'

protected mixed $_modelName = \NULL

$_nameColumn

Column consist item's name

protected string $_nameColumn = 'invoice'

$_oShop_Discountcard

protected mixed $_oShop_Discountcard = \NULL

$_preloadValues

List of preloaded values

protected array<string|int, mixed> $_preloadValues = array('shop_country_location_city_area_id' => 0, 'shop_country_location_city_id' => 0, 'shop_country_location_id' => 0, 'shop_country_id' => 0, 'unloaded' => 0)

$_primaryKey

Primary key

protected string $_primaryKey = 'id'

$_propertyValues

Values of all properties of item

protected array<string|int, mixed> $_propertyValues = \NULL

$_shortcodeTags

List of Shortcodes tags

protected array<string|int, mixed> $_shortcodeTags = array()

$_showXmlCountry

Show countries data in XML

protected bool $_showXmlCountry = \FALSE

$_showXmlCurrency

Show currency data in XML

protected bool $_showXmlCurrency = \FALSE

$_showXmlDelivery

Show delivery data in XML

protected bool $_showXmlDelivery = \FALSE

$_showXmlItems

Show order items data in XML

protected mixed $_showXmlItems = \FALSE

$_showXmlOrderStatus

Show order statuses data in XML

protected bool $_showXmlOrderStatus = \FALSE

$_showXmlPaymentSystem

Show payment systems data in XML

protected bool $_showXmlPaymentSystem = \FALSE

$_showXmlProperties

Show properties in XML

protected bool $_showXmlProperties = \FALSE

$_showXmlSiteuser

Show siteuser data in XML

protected bool $_showXmlSiteuser = \FALSE

$_skipColumns

List of skipped columns from table

protected array<string|int, mixed> $_skipColumns = array()

$_sorting

Default sorting for models

protected array<string|int, mixed> $_sorting = array('shop_orders.datetime' => 'ASC')

$_tableColumns

List of columns in table

protected array<string|int, mixed> $_tableColumns = array()

$_tableName

Table name, e.g. 'books' for 'Book_Model'

protected mixed $_tableName = \NULL

$_typicalForbiddenTags

Typical forbidden tags.

protected array<string|int, mixed> $_typicalForbiddenTags = array()

$_xmlSortPropertiesValues

Sort properties values in XML

protected mixed $_xmlSortPropertiesValues = \TRUE

Methods

__call()

Triggered when invoking inaccessible methods in an object context

public __call(string $name, array<string|int, mixed> $arguments) : mixed
Parameters
$name : string

method name

$arguments : array<string|int, mixed>

arguments

Return values
mixed

__construct()

Constructor.

public __construct([int $id = NULL ]) : mixed
Parameters
$id : int = NULL

entity ID

Return values
mixed

add()

Add related object. If main object does not save, it will save.

public add(Core_ORM $model[, string $relation = NULL ]) : self
Parameters
$model : Core_ORM
$relation : string = NULL
Tags
hostcms-event

modelname.onBeforeAdd

hostcms-event

modelname.onAfterAdd

$object = Core_ORM::factory('Main', 1);

$child = Core_ORM::factory('Child') $child->value1 = 'some value1'; $child->value2 = 'some value2';

$object->add($child);

Return values
self

addAllowedTag()

Add tag to allowed tags list

public addAllowedTag(string $tag) : self
Parameters
$tag : string

tag

Return values
self

addAttribute()

Add entity attribute

public addAttribute(string $name, string $value) : self
Parameters
$name : string
$value : string
Return values
self

addCml()

Add order CommerceML

public addCml(Core_SimpleXMLElement $oXml) : mixed
Parameters
$oXml : Core_SimpleXMLElement
Tags
hostcms-event

shop_order.onBeforeGetCmlUserName

hostcms-event

shop_order.onAddCmlSelectShopOrderItems

Return values
mixed

addEntities()

Add children entities

public addEntities(array<string|int, mixed> $aChildrenEntities) : self
Parameters
$aChildrenEntities : array<string|int, mixed>
Return values
self

addEntity()

Add a children entity

public addEntity(Core_Entity $oChildrenEntity) : self
Parameters
$oChildrenEntity : Core_Entity
Return values
self

addForbiddenTag()

Add tag to forbidden tags list

public addForbiddenTag(string $tag) : self
Parameters
$tag : string

tag

Return values
self

addForbiddenTags()

Add tags to forbidden tags list

public addForbiddenTags(array<string|int, mixed> $aTags) : self
Parameters
$aTags : array<string|int, mixed>

array of tags

Return values
self

addPurchaseDiscount()

Add discounts to the shop_order

public addPurchaseDiscount(array<string|int, mixed> $aOptions) : self
Parameters
$aOptions : array<string|int, mixed>

array('amount' => $amount, 'quantity' => $quantity, 'prices' => $aDiscountPrices, 'applyDiscounts' => TRUE, 'applyDiscountCards' => TRUE)

Return values
self

addXmlTag()

Add external tag for entity

public addXmlTag(string $tagName, string $tagValue[, array<string|int, mixed> $attributes = array() ]) : self
Parameters
$tagName : string

tag name

$tagValue : string

tag value

$attributes : array<string|int, mixed> = array()

attributes

Return values
self

applyMarksDeleted()

Apply markDeleted flag if is set

public applyMarksDeleted() : self
Return values
self

backupRevision()

Backup revision

public backupRevision() : self
Return values
self

cancel()

Cancel the order

public cancel() : self
Tags
hostcms-event

shop_order.onBeforeCancel

hostcms-event

shop_order.onAfterCancel

Return values
self

cancelPaid()

Cancel payment

public cancelPaid() : self
Tags
hostcms-event

shop_order.onBeforeCancelPaid

hostcms-event

shop_order.onAfterCancelPaid

Return values
self

changeCopiedName()

Set if change copied name is necessary

public changeCopiedName(bool $changeCopiedName) : self
Parameters
$changeCopiedName : bool

mode

Return values
self

changed()

Check model has been changed.

public changed() : bool
Return values
bool

changeStatusCanceled()

Change cancel on opposite

public changeStatusCanceled() : self
Tags
hostcms-event

shop_order.onBeforeChangeStatusCanceled

hostcms-event

shop_order.onAfterChangeStatusCanceled

Return values
self

changeStatusPaid()

Change cancel on opposite

public changeStatusPaid() : self
Tags
hostcms-event

shop_order.onBeforeChangeStatusPaid

hostcms-event

shop_order.onAfterChangeStatusPaid

Return values
self

changeStatusPosted()

Change posted

public changeStatusPosted() : self
Tags
hostcms-event

shop_order.onBeforeChangeStatusPosted

hostcms-event

shop_order.onAfterChangeStatusPosted

Return values
self

check()

Check model values. If model has incorrect value, one will correct or call exception.

public check([bool $exception = FALSE ]) : self
$object = Core_ORM::factory('Book', 1); $object->value = 123; $object->check(TRUE)->save();
Parameters
$exception : bool = FALSE

Call exception (TRUE) or correct value (FALSE). Default FALSE.

Return values
self

checkShopOrderItemStatuses()

public checkShopOrderItemStatuses() : mixed
Return values
mixed

checkShopOrderStatusDeadline()

Check shop order status deadline

public checkShopOrderStatusDeadline() : self
Return values
self

chunk()

Retrieve a small chunk and feeds each one into $callback for processing. It stops looping when $callback returns FALSE

public chunk(int $count, callable $callback[, bool $bCache = TRUE ]) : bool
Parameters
$count : int

chunk size

$callback : callable
$bCache : bool = TRUE

use cache

Return values
bool

clear()

Clear object

public clear() : self
Return values
self

clearEntities()

Clear enities

public clearEntities() : self
Return values
self

clearEntitiesAfterGetXml()

Clear all entities after XML generation

public clearEntitiesAfterGetXml([bool $clear = TRUE ]) : self
Parameters
$clear : bool = TRUE

mode

Return values
self

clearXmlTags()

Clear external XML tags for entity.

public clearXmlTags() : mixed
Return values
mixed

companyBadge()

Backend badge

public companyBadge(Admin_Form_Field $oAdmin_Form_Field, Admin_Form_Controller $oAdmin_Form_Controller) : string
Parameters
$oAdmin_Form_Field : Admin_Form_Field
$oAdmin_Form_Controller : Admin_Form_Controller
Return values
string

create()

Insert new object data into database

public create() : self
Tags
hostcms-event

modelname.onBeforeCreate

hostcms-event

modelname.onAfterCreate

Return values
self

createDir()

Create directory for item

public createDir() : self
Return values
self

createInvoice()

Generate invoice by invoice_template or set invoice like id

public createInvoice() : self
Return values
self

date()

public date() : mixed
Return values
mixed

delete()

Delete object from database

public delete([mixed $primaryKey = NULL ]) : Core_Entity
Parameters
$primaryKey : mixed = NULL

primary key for deleting object

Tags
hostcms-event

shop_order.onBeforeRedeclaredDelete

Return values
Core_Entity

deleteAll()

Delete all object

public deleteAll([bool $bCache = TRUE ][, int $limit = 100 ]) : self
Parameters
$bCache : bool = TRUE

use cache

$limit : int = 100

default 100 Core_ORM::factory('Book')->Comments->deleteAll();

Return values
self

deleteReservedItems()

Delete reserved items for order

public deleteReservedItems() : self
Return values
self

factory()

Create and return an object of model

public static factory( $modelName[,  $primaryKey = NULL ]) : mixed
Parameters
$modelName :

Model name

$primaryKey : = NULL

Primary key

Return values
mixed

find()

Find object in database and load one. Use clear() before find() with conditions!

public find([mixed $primaryKey = NULL ][, bool $bCache = TRUE ]) : self
Parameters
$primaryKey : mixed = NULL

default NULL

$bCache : bool = TRUE

use cache // Find an object and load (without lazy load) // If an object is not found, primary key sets NULL $oBook = Core_ORM::factory('Book')->find(1);

Return values
self

findAll()

Find all objects

public findAll([bool $bCache = TRUE ]) : array<string|int, mixed>
Parameters
$bCache : bool = TRUE

use cache, default TRUE // Find objects $aBooks = Core_ORM::factory('Book')->findAll(); foreach ($aBooks as $oBook) { var_dump($oBook->id); }

Tags
hostcms-event

modelname.onBeforeFindAll

hostcms-event

modelname.onAfterFindAll

Return values
array<string|int, mixed>

getAmount()

Get amount of order

public getAmount() : float
Return values
float

getByShopId()

Get orders by shop id

public getByShopId(int $shop_id) : array<string|int, mixed>
Parameters
$shop_id : int

shop id

Return values
array<string|int, mixed>

getChangedData()

Get changed columns with values

public getChangedData() : array<string|int, mixed>
Return values
array<string|int, mixed>

getClassName()

Get Model CallsName

public static getClassName( $modelName) : string
Parameters
$modelName :

Model name

Return values
string

getCount()

Get count object

public getCount([bool $bCache = TRUE ][, string $fieldName = '*' ][, bool $distinct = FALSE ]) : int|false
Parameters
$bCache : bool = TRUE

use cache, default TRUE

$fieldName : string = '*'

default '*'

$distinct : bool = FALSE

default FALSE

Return values
int|false
$iCount = Core_ORM::factory('Book')->getCount(); var_dump($iCount);

getCustomerName()

public getCustomerName() : mixed
Return values
mixed

getDatabaseDriver()

Get name of Database Driver

public static getDatabaseDriver() : string
Return values
string

getDataValues()

Get dataValues

public getDataValues() : array<string|int, mixed>
Return values
array<string|int, mixed>

getEntities()

Get children entities

public getEntities() : array<string|int, mixed>
Return values
array<string|int, mixed>

getFieldIDs()

Get visible field's IDs

public getFieldIDs() : array<string|int, mixed>
Return values
array<string|int, mixed>

getFields()

Get field's values

public getFields() : array<string|int, mixed>
Return values
array<string|int, mixed>

getFirst()

Get fist entity, ordered by primary key

public getFirst([bool $bCache = TRUE ]) : null|Core_ORM
Parameters
$bCache : bool = TRUE

use cache, default TRUE

Return values
null|Core_ORM
$mObject = Core_ORM::factory('Book')->getFirst(); if (!is_null($mObject)) { echo $mObject; }

getForbiddenTags()

Get forbidden tags list

public getForbiddenTags() : array<string|int, mixed>
Return values
array<string|int, mixed>

getFullAddress()

public getFullAddress() : mixed
Return values
mixed

getLast()

Get last entity, ordered by primary key

public getLast([bool $bCache = TRUE ]) : null|Core_ORM
Parameters
$bCache : bool = TRUE

use cache, default TRUE

Return values
null|Core_ORM
$mObject = Core_ORM::factory('Book')->getLast(); if (!is_null($mObject)) { echo $mObject; }

getMarksDeleted()

Get column name for marks deleted

public getMarksDeleted() : string
Return values
string

getModelName()

Get model name, e.g. 'book' for 'Book_Model'

public getModelName() : string
Return values
string

getName()

Get entity name

public getName() : string
Tags
hostcms-event

modelname.onBeforeGetName

Return values
string

getNameColumn()

Get Name Column

public getNameColumn() : string
Return values
string

getOrderHref()

Get item href

public getOrderHref() : string
Return values
string

getOrderPath()

Get item path include CMS_FOLDER

public getOrderPath() : string
Return values
string

getPrimaryKey()

Get primary key value

public getPrimaryKey() : mixed
Return values
mixed

getPrimaryKeyName()

Get primary key name

public getPrimaryKeyName() : string
Return values
string

getPrintlayoutReplaces()

Get printlayout replaces

public getPrintlayoutReplaces() : array<string|int, mixed>
Tags
hostcms-event

shop_order.onAfterGetPrintlayoutReplaces

Return values
array<string|int, mixed>

getPropertyValues()

Values of all properties of item Значения всех свойств товара

public getPropertyValues([bool $bCache = TRUE ][, array<string|int, mixed> $aPropertiesId = array() ][, bool $bSorting = FALSE ]) : array<string|int, mixed>
Parameters
$bCache : bool = TRUE

cache mode status

$aPropertiesId : array<string|int, mixed> = array()

array of properties' IDs

$bSorting : bool = FALSE

sort results, default FALSE

Return values
array<string|int, mixed>

Property_Value

getQuantity()

Get quantity of items in an order

public getQuantity() : float
Return values
float

getRelatedSite()

Get Related Site

public getRelatedSite() : Site_Model|null
Tags
hostcms-event

shop_order.onBeforeGetRelatedSite

hostcms-event

shop_order.onAfterGetRelatedSite

Return values
Site_Model|null

getRelations()

Get $this->_relations

public getRelations() : array<string|int, mixed>
Return values
array<string|int, mixed>

getResponsibleUsers()

Get responsible users

public getResponsibleUsers() : array<string|int, mixed>
Return values
array<string|int, mixed>

getStdObject()

Get stdObject for entity and children entities

public getStdObject([mixed $attributePrefix = '_' ]) : stdObject
Parameters
$attributePrefix : mixed = '_'
Tags
hostcms-event

shop_order.onBeforeRedeclaredGetStdObject

Return values
stdObject

getSum()

Get sum of order

public getSum() : float
Return values
float

getTableColumns()

Get tableColumns

public getTableColumns() : array<string|int, mixed>
Return values
array<string|int, mixed>

getTableColums()

Get table columns. Fix wrong method name

public getTableColums() : array<string|int, mixed>
Return values
array<string|int, mixed>

getTableName()

Get table name

public getTableName() : string
Return values
string

getTrashDescription()

Get entity description

public getTrashDescription() : string
Return values
string

getWeight()

Get order weight

public getWeight() : float
Return values
float

getXml()

Get XML for entity and children entities

public getXml() : string
Tags
hostcms-event

shop_order.onBeforeRedeclaredGetXml

Return values
string

getXmlTagName()

Get tag name

public getXmlTagName() : string
Return values
string

getXmlTags()

Get external XML tags for entity.

public getXmlTags() : array<string|int, mixed>
Return values
array<string|int, mixed>

historyPushCanceled()

Push canceled history

public historyPushCanceled() : self
Return values
self

historyPushChangeStatus()

Push change status history

public historyPushChangeStatus() : self
Return values
self

historyPushChangeUser()

Push change status history

public historyPushChangeUser() : self
Return values
self

historyPushPaid()

Push paid history

public historyPushPaid() : self
Return values
self

historyPushPosted()

Push posted history

public historyPushPosted() : self
Return values
self

isCallable()

Verify that the contents of a variable can be called as a function

public isCallable(string $methodName) : bool
Parameters
$methodName : string

method name

Return values
bool

isEmptyPrimaryKey()

Check is primary key NULL

public isEmptyPrimaryKey() : bool
Return values
bool

notifyBotsChangeStatus()

Notify Bots

public notifyBotsChangeStatus() : self
Return values
self

order_items()

public order_items(mixed $oAdmin_Form_Field, mixed $oAdmin_Form_Controller) : mixed
Parameters
$oAdmin_Form_Field : mixed
$oAdmin_Form_Controller : mixed
Return values
mixed

order_itemsBadge()

Backend badge

public order_itemsBadge(Admin_Form_Field $oAdmin_Form_Field, Admin_Form_Controller $oAdmin_Form_Controller) : string
Parameters
$oAdmin_Form_Field : Admin_Form_Field
$oAdmin_Form_Controller : Admin_Form_Controller
Return values
string

orderPopover()

Get Popover Content

public orderPopover() : string
Tags
hostcms-event

shop_order.onBeforeOrderPopover

Return values
string

ordersCurrentMonth()

Get the number of orders for the current month

public ordersCurrentMonth() : int
Return values
int

ordersCurrentYear()

Get the number of orders for the current year

public ordersCurrentYear() : int
Return values
int

ordersToday()

Get the number of orders for today

public ordersToday() : int
Return values
int

paid()

Pay the order

public paid() : self
Tags
hostcms-event

shop_order.onBeforePaid

hostcms-event

shop_order.onAfterPaid

Return values
self

post()

Add entries

public post() : self
Tags
hostcms-event

shop_order.onBeforePost

hostcms-event

shop_order.onAfterPost

Return values
self

propertyValue()

Get property value for SEO-templates

public propertyValue(int $property_id[, strint $format = '%2$s' ][, string $separator = ', ' ]) : string
Parameters
$property_id : int

Property ID

$format : strint = '%2$s'

string format, e.g. '%s: %s'. %1$s - Property Name, %2$s - List of Values

$separator : string = ', '

separator

Return values
string

recalcDelivery()

Recalc delivery price by delivery conditions

public recalcDelivery() : bool
Tags
hostcms-event

shop_order.onBeforeRecalcDelivery

hostcms-event

shop_order.onAfterRecalcDelivery

Return values
bool

remove()

Remove related object. If main object does not save, it will save.

public remove(Core_ORM $model[, string $relation = NULL ]) : self
Parameters
$model : Core_ORM
$relation : string = NULL
Tags
hostcms-event

modelname.onBeforeRemove

hostcms-event

modelname.onAfterRemove

Return values
self

removeForbiddenTag()

Remove tag from forbidden tags list

public removeForbiddenTag(string $tag) : self
Parameters
$tag : string

tag

Return values
self

reserveItems()

Reserve items for order

public reserveItems() : self
Return values
self

rollbackRevision()

Rollback Revision

public rollbackRevision(int $revision_id) : self
Parameters
$revision_id : int

Revision ID

Return values
self

save()

Save object. Uses self::update() or self::create()

public save() : self
Tags
hostcms-event

modelname.onBeforeSave

hostcms-event

modelname.onAfterSave

Return values
self

sendMail()

Send order e-mails

public sendMail() : self
Return values
self

setCheck()

Set _check flag

public setCheck(bool $check) : self
Parameters
$check : bool

mode

Return values
self

setDatabaseDriver()

Set name of Database Driver

public static setDatabaseDriver(string $name) : mixed
Parameters
$name : string

driver's name

Return values
mixed

setMarksDeleted()

Set column name for marks deleted

public setMarksDeleted([mixed $marksDeleted = 'deleted' ]) : self
Parameters
$marksDeleted : mixed = 'deleted'
Return values
self

setRelations()

Set $this->_relations

public setRelations(array<string|int, mixed> $relations) : self
Parameters
$relations : array<string|int, mixed>

Array with new relations

Return values
self

setXmlTagName()

Set name of XML node

public setXmlTagName(string $tagName) : self
Parameters
$tagName : string

new tag name for node

Return values
self

shop_order_status_idBackend()

Backend callback method

public shop_order_status_idBackend(mixed $oAdmin_Form_Field, mixed $oAdmin_Form_Controller) : string
Parameters
$oAdmin_Form_Field : mixed
$oAdmin_Form_Controller : mixed
Return values
string

showXmlCountry()

Show country in XML

public showXmlCountry([bool $showXmlCountry = TRUE ]) : self
Parameters
$showXmlCountry : bool = TRUE
Return values
self

showXmlCurrency()

Show currency in XML

public showXmlCurrency([bool $showXmlCurrency = TRUE ]) : self
Parameters
$showXmlCurrency : bool = TRUE
Return values
self

showXmlDelivery()

Show delivery in XML

public showXmlDelivery([bool $showXmlDelivery = TRUE ]) : self
Parameters
$showXmlDelivery : bool = TRUE
Return values
self

showXmlItems()

Show items in XML

public showXmlItems([mixed $showXmlItems = TRUE ]) : self
Parameters
$showXmlItems : mixed = TRUE

TRUE|FALSE|'not canceled'

Return values
self

showXmlOrderStatus()

Show order's status in XML

public showXmlOrderStatus([bool $showXmlOrderStatus = TRUE ]) : self
Parameters
$showXmlOrderStatus : bool = TRUE
Return values
self

showXmlPaymentSystem()

Show payment system in XML

public showXmlPaymentSystem([bool $showXmlPaymentSystem = TRUE ]) : self
Parameters
$showXmlPaymentSystem : bool = TRUE
Return values
self

showXmlProperties()

Show properties in XML

public showXmlProperties([mixed $showXmlProperties = TRUE ][, mixed $xmlSortPropertiesValues = TRUE ]) : self
Parameters
$showXmlProperties : mixed = TRUE

array of allowed properties ID or boolean

$xmlSortPropertiesValues : mixed = TRUE
Return values
self

showXmlSiteuser()

Show siteuser in XML

public showXmlSiteuser([bool $showXmlSiteuser = TRUE ]) : self
Parameters
$showXmlSiteuser : bool = TRUE
Return values
self

smallAvatarBackend()

public smallAvatarBackend() : mixed
Return values
mixed

sum()

Get order sum with currency name

public sum() : string
Return values
string

toArray()

Convert Object to Array

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

uncancel()

Uncancel the order

public uncancel() : self
Tags
hostcms-event

shop_order.onBeforeUncancel

hostcms-event

shop_order.onAfterUncancel

Return values
self

undelete()

Turn off deleted status

public undelete() : self
Tags
hostcms-event

modelname.onBeforeUndelete

hostcms-event

modelname.onAfterUndelete

Return values
self

unpost()

Remove all shop warehouse entries by document

public unpost() : self
Return values
self

update()

Update object data into database

public update() : self
Tags
hostcms-event

modelname.onBeforeUpdate

hostcms-event

modelname.onAfterUpdate

Return values
self

weightBackend()

Backend callback method

public weightBackend() : string
Return values
string

_createNotification()

Create notification for subscribers

protected _createNotification() : self
Return values
self

_deleteDigitalItems()

Delete digital items

protected _deleteDigitalItems() : self
Return values
self

_getCopiedName()

Get the name of a new copied object

protected _getCopiedName() : mixed
Return values
mixed

_paidShopDiscountcard()

protected _paidShopDiscountcard() : mixed
Return values
mixed

_paidTransaction()

Списание или возврат товара на склад, начисление и стронирование операций по лицевому счету

protected _paidTransaction() : self
Tags
hostcms-event

shop_order.onAfterSaveSiteuserTransaction

Return values
self

_prepareData()

Prepare entity and children entities

protected _prepareData() : self
Return values
self

_preparePropertyValue()

Prepare Property Value

protected _preparePropertyValue(Property_Value_Model $oProperty_Value) : mixed
Parameters
$oProperty_Value : Property_Value_Model
Return values
mixed

Search results