Product
extends JobProtoctedCacheModel
in package
uses
TraitProduct
Table of Contents
Constants
- ALLOWED_PRODUCT_STATUSES = [self::PRODUCT_STATUS_UNKNOWN, self::PRODUCT_STATUS_INCOMPLETE, self::PRODUCT_STATUS_INACTIVE, self::PRODUCT_STATUS_ACTIVE]
- bindType = ['user_id' => \Phalcon\Db\Column::BIND_PARAM_INT, 'offset' => \Phalcon\Db\Column::BIND_PARAM_INT, 'limit' => \Phalcon\Db\Column::BIND_PARAM_INT]
- DEFAULTCURRENCRY = 978
- defaultOrder = ['asin' => 'asc']
- fieldIndex = ['_ap.asin', '_ap.sku', '_ap.item_name', '_p.vat_type_id', '_p.val', '_p.weight', '_p.comm_code']
- filterAlias = ['id' => '_p.id= :id:', 'asin' => '_ap.asin LIKE :asin:', 'sku' => '_ap.sku LIKE :sku:', 'item_name' => '_ap.item_name LIKE :item_name:', 'vat_type_id' => '_p.vat_type_id = :vat_type_id:']
- JOB_PROTECTED_FIELD_LIST = []
- JOB_PROTECTED_MAIN_ACTION = \Vatjar\Jobs\Model\Job::MAIN_ACTION_MODEL_Product
- MINIMUMVALUE = 0.1
- pageSize = 300
- PRODUCT_STATUS_ACTIVE = 1
- PRODUCT_STATUS_INACTIVE = 0
- PRODUCT_STATUS_INCOMPLETE = -1
- PRODUCT_STATUS_UNKNOWN = -2
Properties
- $comm_code : mixed
- $create_time : mixed
- $currency_id : mixed
- $hellotax_id : mixed
- $id : mixed
- $item_name : mixed
- $module : mixed
- $product_id : mixed
- $status : mixed
- $update_time : mixed
- $user_id : mixed
- $user_module_id : mixed
- $val : mixed
- $variant_id : mixed
- $vat_type_id : mixed
- $weight : mixed
- $_existsModel : bool
- $jobList : mixed
- $jobMergedData : mixed
- $jobProtectedCreate : mixed
- $jobProtectedDelete : mixed
- $jobProtectedModel : mixed
Methods
- afterFetch() : mixed
- afterSave() : mixed
- assignJobMergedData() : static
- assignJobMergedDataFor() : static
- beforeSave() : mixed
- delete() : bool
- {@inheritDoc}
- exists() : bool
- fetchAsArray() : mixed
- fetchAsAssocArray() : mixed
- fetchAsMultiAssocArray() : mixed
- find() : false|array<string|int, static>
- findFirst() : static|false
- fixParameters() : mixed
- fromArray() : mixed
- getChangedFields() : array<string|int, mixed>
- Add Phalcon < 3.2 condition for compatibility {@inheritDoc}
- getCommCode() : mixed
- getCreateTime() : mixed
- getCurrencyId() : mixed
- getHellotaxId() : mixed
- Get the value of hellotax_id
- getId() : mixed
- getJobInitObject() : mixed
- getJobList() : array<string|int, Job>
- getJobMergedBackdate() : array<string|int, mixed>
- getJobMergedData() : array<string|int, mixed>
- getModule() : mixed
- getProductAndAsin() : mixed
- getProductCountryVatTypes() : mixed
- getProductVariants() : mixed
- getStatus() : mixed
- getThe() : mixed
- getUpdateTime() : mixed
- getUserId() : mixed
- getVal() : mixed
- getVatTypeId() : mixed
- getWeight() : mixed
- hasError() : bool
- initialize() : mixed
- loadJobList() : array<string|int, Job>
- loadJobListFor() : array<string|int, Job>
- loadMergedDataFor() : mixed
- loadMergedDataFromJob() : mixed
- mapper() : mixed
- save() : bool
- set() : mixed
- setCommCode() : Product
- setCreateTime() : $this
- If $createTime is null, default value now.
- setCurrencyId() : Product
- setStatus() : Product
- setUpdateTime() : $this
- If $updateTime is null, default value now.
- setVal() : Product
- setVatTypeId() : Product
- setWeight() : Product
- writeAttributeIfNeeded() : mixed
- _createKey() : mixed
- _isExistsModel() : mixed
- _loadExistsModel() : bool
- getJobparameters() : mixed
- getJobSecondaryId() : mixed
- getJobUserId() : mixed
- saveJobProtectedData() : mixed
- getHaving() : mixed
- getOrder() : mixed
- getWhere() : mixed
Constants
ALLOWED_PRODUCT_STATUSES
public
mixed
ALLOWED_PRODUCT_STATUSES
= [self::PRODUCT_STATUS_UNKNOWN, self::PRODUCT_STATUS_INCOMPLETE, self::PRODUCT_STATUS_INACTIVE, self::PRODUCT_STATUS_ACTIVE]
bindType
public
mixed
bindType
= ['user_id' => \Phalcon\Db\Column::BIND_PARAM_INT, 'offset' => \Phalcon\Db\Column::BIND_PARAM_INT, 'limit' => \Phalcon\Db\Column::BIND_PARAM_INT]
DEFAULTCURRENCRY
public
mixed
DEFAULTCURRENCRY
= 978
defaultOrder
public
mixed
defaultOrder
= ['asin' => 'asc']
fieldIndex
public
mixed
fieldIndex
= ['_ap.asin', '_ap.sku', '_ap.item_name', '_p.vat_type_id', '_p.val', '_p.weight', '_p.comm_code']
filterAlias
public
mixed
filterAlias
= ['id' => '_p.id= :id:', 'asin' => '_ap.asin LIKE :asin:', 'sku' => '_ap.sku LIKE :sku:', 'item_name' => '_ap.item_name LIKE :item_name:', 'vat_type_id' => '_p.vat_type_id = :vat_type_id:']
JOB_PROTECTED_FIELD_LIST
public
mixed
JOB_PROTECTED_FIELD_LIST
= []
JOB_PROTECTED_MAIN_ACTION
public
mixed
JOB_PROTECTED_MAIN_ACTION
= \Vatjar\Jobs\Model\Job::MAIN_ACTION_MODEL_Product
MINIMUMVALUE
public
mixed
MINIMUMVALUE
= 0.1
pageSize
public
mixed
pageSize
= 300
PRODUCT_STATUS_ACTIVE
public
mixed
PRODUCT_STATUS_ACTIVE
= 1
PRODUCT_STATUS_INACTIVE
public
mixed
PRODUCT_STATUS_INACTIVE
= 0
PRODUCT_STATUS_INCOMPLETE
public
mixed
PRODUCT_STATUS_INCOMPLETE
= -1
PRODUCT_STATUS_UNKNOWN
public
mixed
PRODUCT_STATUS_UNKNOWN
= -2
Properties
$comm_code
public
mixed
$comm_code
$create_time
public
mixed
$create_time
$currency_id
public
mixed
$currency_id
$hellotax_id
public
mixed
$hellotax_id
$id
public
mixed
$id
$item_name
public
mixed
$item_name
$module
public
mixed
$module
$product_id
public
mixed
$product_id
$status
public
mixed
$status
$update_time
public
mixed
$update_time
$user_id
public
mixed
$user_id
$user_module_id
public
mixed
$user_module_id
$val
public
mixed
$val
$variant_id
public
mixed
$variant_id
$vat_type_id
public
mixed
$vat_type_id
$weight
public
mixed
$weight
$_existsModel
protected
bool
$_existsModel
$jobList
protected
mixed
$jobList
$jobMergedData
protected
mixed
$jobMergedData
$jobProtectedCreate
protected
mixed
$jobProtectedCreate
= false
$jobProtectedDelete
protected
mixed
$jobProtectedDelete
= false
$jobProtectedModel
protected
mixed
$jobProtectedModel
= \Vatjar\Jobs\Model\Job::class
Methods
afterFetch()
public
afterFetch() : mixed
afterSave()
public
afterSave() : mixed
assignJobMergedData()
public
assignJobMergedData([array<string|int, mixed> $opt = [] ]) : static
Parameters
- $opt : array<string|int, mixed> = []
Return values
staticassignJobMergedDataFor()
public
assignJobMergedDataFor(JobProtoctedCacheModel &$model[, array<string|int, mixed> $opt = [] ]) : static
Parameters
- $model : JobProtoctedCacheModel
- $opt : array<string|int, mixed> = []
Return values
staticbeforeSave()
public
beforeSave() : mixed
delete()
{@inheritDoc}
public
delete() : bool
Tags
Return values
boolexists()
public
exists() : bool
Return values
boolfetchAsArray()
public
static fetchAsArray([mixed $parameter = null ]) : mixed
Parameters
- $parameter : mixed = null
fetchAsAssocArray()
public
static fetchAsAssocArray([mixed $parameter = null ][, mixed $key = 'id' ][, mixed $cols = null ]) : mixed
Parameters
- $parameter : mixed = null
- $key : mixed = 'id'
- $cols : mixed = null
fetchAsMultiAssocArray()
public
static fetchAsMultiAssocArray([mixed $parameter = null ][, mixed $keyname = ['id'] ][, mixed $cols = null ]) : mixed
Parameters
- $parameter : mixed = null
- $keyname : mixed = ['id']
- $cols : mixed = null
find()
public
static find([array<string|int, mixed>|null|int $parameters = null ]) : false|array<string|int, static>
Parameters
- $parameters : array<string|int, mixed>|null|int = null
Return values
false|array<string|int, static>findFirst()
public
static findFirst([array<string|int, mixed>|null|int $parameters = null ]) : static|false
Parameters
- $parameters : array<string|int, mixed>|null|int = null
Return values
static|falsefixParameters()
public
static fixParameters([mixed $parameters = null ]) : mixed
Parameters
- $parameters : mixed = null
fromArray()
public
static fromArray(mixed $array) : mixed
Parameters
- $array : mixed
getChangedFields()
Add Phalcon < 3.2 condition for compatibility {@inheritDoc}
public
getChangedFields() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getCommCode()
public
getCommCode() : mixed
getCreateTime()
public
getCreateTime() : mixed
getCurrencyId()
public
getCurrencyId() : mixed
getHellotaxId()
Get the value of hellotax_id
public
getHellotaxId() : mixed
getId()
public
getId() : mixed
getJobInitObject()
public
static getJobInitObject(mixed $userId, mixed $secondary[, array<string|int, mixed> $data = [] ]) : mixed
Parameters
- $userId : mixed
- $secondary : mixed
- $data : array<string|int, mixed> = []
getJobList()
public
getJobList([array<string|int, mixed> $opt = [] ]) : array<string|int, Job>
Parameters
- $opt : array<string|int, mixed> = []
Return values
array<string|int, Job>getJobMergedBackdate()
public
getJobMergedBackdate() : array<string|int, mixed>
Return values
array<string|int, mixed>getJobMergedData()
public
getJobMergedData([array<string|int, mixed> $opt = [] ]) : array<string|int, mixed>
Parameters
- $opt : array<string|int, mixed> = []
Return values
array<string|int, mixed>getModule()
public
getModule() : mixed
getProductAndAsin()
public
static getProductAndAsin(mixed $user_id[, mixed $asinList = [] ]) : mixed
Parameters
- $user_id : mixed
- $asinList : mixed = []
getProductCountryVatTypes()
public
static getProductCountryVatTypes(array<string|int, mixed> $filter) : mixed
Parameters
- $filter : array<string|int, mixed>
getProductVariants()
public
static getProductVariants(mixed $userId, mixed $productId) : mixed
Parameters
- $userId : mixed
- $productId : mixed
getStatus()
public
getStatus() : mixed
getThe()
public
static getThe(mixed $paramater) : mixed
Parameters
- $paramater : mixed
getUpdateTime()
public
getUpdateTime() : mixed
getUserId()
public
getUserId() : mixed
getVal()
public
getVal() : mixed
getVatTypeId()
public
getVatTypeId() : mixed
getWeight()
public
getWeight() : mixed
hasError()
public
hasError() : bool
Return values
boolinitialize()
public
initialize() : mixed
loadJobList()
public
loadJobList([array<string|int, mixed> $opt = [] ]) : array<string|int, Job>
Parameters
- $opt : array<string|int, mixed> = []
Return values
array<string|int, Job>loadJobListFor()
public
static loadJobListFor(JobProtoctedCacheModel $model[, array<string|int, mixed> $opt = [] ]) : array<string|int, Job>
Parameters
- $model : JobProtoctedCacheModel
- $opt : array<string|int, mixed> = []
Return values
array<string|int, Job>loadMergedDataFor()
public
static loadMergedDataFor(JobProtoctedCacheModel &$model[, array<string|int, mixed> $opt = [] ]) : mixed
Parameters
- $model : JobProtoctedCacheModel
- $opt : array<string|int, mixed> = []
loadMergedDataFromJob()
public
static loadMergedDataFromJob(Job $job[, array<string|int, mixed> $opt = [] ]) : mixed
Parameters
- $job : Job
- $opt : array<string|int, mixed> = []
mapper()
public
static mapper(array<string|int, mixed> $map, array<string|int, mixed> $original[, bool $reverse = true ]) : mixed
Parameters
- $map : array<string|int, mixed>
- $original : array<string|int, mixed>
- $reverse : bool = true
save()
public
save([mixed $data = null ][, mixed $whiteList = null ][, mixed $force = false ]) : bool
Parameters
- $data : mixed = null
- $whiteList : mixed = null
- $force : mixed = false
Return values
boolset()
public
set(mixed $property, mixed $value) : mixed
Parameters
- $property : mixed
- $value : mixed
setCommCode()
public
setCommCode(mixed $comm_code) : Product
Parameters
- $comm_code : mixed
Return values
ProductsetCreateTime()
If $createTime is null, default value now.
public
setCreateTime([mixed $createTime = null ]) : $this
Parameters
- $createTime : mixed = null
Return values
$thissetCurrencyId()
public
setCurrencyId(mixed $currency_id) : Product
Parameters
- $currency_id : mixed
Return values
ProductsetStatus()
public
setStatus(mixed $status) : Product
Parameters
- $status : mixed
Return values
ProductsetUpdateTime()
If $updateTime is null, default value now.
public
setUpdateTime([mixed $updateTime = null ]) : $this
Parameters
- $updateTime : mixed = null
Return values
$thissetVal()
public
setVal(mixed $val) : Product
Parameters
- $val : mixed
Return values
ProductsetVatTypeId()
public
setVatTypeId(mixed $vat_type_id) : Product
Parameters
- $vat_type_id : mixed
Return values
ProductsetWeight()
public
setWeight(mixed $weight) : Product
Parameters
- $weight : mixed
Return values
ProductwriteAttributeIfNeeded()
public
writeAttributeIfNeeded(mixed $attribute, mixed $value) : mixed
Parameters
- $attribute : mixed
- $value : mixed
_createKey()
protected
static _createKey(mixed $parameters) : mixed
Parameters
- $parameters : mixed
_isExistsModel()
protected
_isExistsModel() : mixed
_loadExistsModel()
protected
_loadExistsModel() : bool
Return values
boolgetJobparameters()
protected
getJobparameters(mixed $dalayedSave) : mixed
Parameters
- $dalayedSave : mixed
getJobSecondaryId()
protected
getJobSecondaryId() : mixed
getJobUserId()
protected
getJobUserId() : mixed
saveJobProtectedData()
protected
saveJobProtectedData(mixed $subAction, array<string|int, mixed> $data) : mixed
Parameters
- $subAction : mixed
- $data : array<string|int, mixed>
getHaving()
private
static getHaving(array<string|int, mixed> $params) : mixed
Parameters
- $params : array<string|int, mixed>
getOrder()
private
static getOrder([mixed $order = null ]) : mixed
Parameters
- $order : mixed = null
getWhere()
private
static getWhere(array<string|int, mixed> $params) : mixed
Parameters
- $params : array<string|int, mixed>