Documentation

Mage_Catalog_Model_Product extends Mage_Catalog_Model_Abstract
in package

Catalog product model

Table of Contents

Constants

CACHE_TAG  : mixed = 'catalog_product'
DEFAULT_STORE_ID  : mixed = 0
Identifier of default store used for loading default data for entity
ENTITY  : mixed = 'catalog_product'
Entity code.

Properties

$_cacheTag  : mixed
$_calculatePrice  : bool
Flag for get Price function
$_canAffectOptions  : mixed
$_customOptions  : array<string|int, mixed>
Product object customization (not stored in DB)
$_data  : array<string|int, mixed>|null
Object attributes
$_dataSaveAllowed  : bool
Flag which can stop data saving after before save Can be used for next sequence: we check data in _beforeSave, if data are not valid - we can set this flag to false value and save process will be stopped
$_defaultValues  : array<string|int, mixed>
Attribute default values
$_dirty  : array<string|int, mixed>
$_errors  : mixed
$_eventObject  : mixed
$_eventPrefix  : mixed
$_hasDataChanges  : bool
Data changes flag (true after setData|unsetData call)
$_idFieldName  : string
Name of object id field
$_isDeleteable  : bool
Is model deletable
$_isDeleted  : bool
Object delete flag
$_isDuplicable  : bool
Flag for available duplicate function
$_isObjectNew  : bool|null
Flag which allow detect object state: is it new object (without id) or existing one (with id)
$_isReadonly  : bool
Is model readonly
$_linkInstance  : Mage_Catalog_Model_Product_Link|null
Product link instance
$_lockedAttributes  : array<string|int, mixed>
Locked attributes
$_oldFieldsMap  : array<string|int, mixed>
Map short fields names to its full names
$_optionInstance  : mixed
$_options  : mixed
$_origData  : array<string|int, mixed>|null
Original data that was loaded
$_reservedAttributes  : mixed
Product reserved attribute codes
$_resource  : Mage_Core_Model_Resource_Db_Abstract
Resource model instance
$_resourceCollectionName  : string
Name of the resource collection model
$_resourceName  : string
Name of the resource model
$_reviewSummary  : array<string|int, Mage_Review_Model_Review_Summary>
$_stockItem  : Mage_CatalogInventory_Model_Stock_Item|null
$_storeValuesFlags  : array<string|int, mixed>
This array contains codes of attributes which have value in current store
$_syncFieldsMap  : mixed
Map of fields to sync to other fields upon changing their data
$_typeInstance  : Mage_Catalog_Model_Product_Type_Abstract|null|false
Product type instance
$_typeInstanceSingleton  : mixed
Product type instance as singleton
$_underscoreCache  : array<string|int, mixed>
Setter/Getter underscore transformation cache
$_url  : mixed
$_urlModel  : Mage_Catalog_Model_Product_Url|null
Product Url Instance
$_urlRewrite  : mixed

Methods

__call()  : mixed
Set/Get attribute wrapper
__construct()  : mixed
Constructor
__get()  : mixed
Attribute getter (deprecated)
__set()  : mixed
Attribute setter (deprecated)
__toArray()  : array<string|int, mixed>
Convert object attributes to array
_getResource()  : Mage_Catalog_Model_Resource_Product
Get resource instance
addAttributeUpdate()  : mixed
Save current attribute with code $code and assign new value
addCustomOption()  : $this
Add custom option information to product
addData()  : $this
Add data to the object.
addImageToMediaGallery()  : $this
Add image to media gallery
addOption()  : $this
Add option to array of product options
afterCommitCallback()  : $this
Callback function which called after transaction commit in resource model
afterLoad()  : $this
Object after load processing. Implemented as public interface for supporting objects after load in collections
canAffectOptions()  : bool
Check/set if options can be affected when saving product If value specified, it will be set.
canBeShowInCategory()  : string
Check availability display product in category
canConfigure()  : bool
Check if product can be configured
cleanCache()  : $this
Clear cache related with product id
cleanModelCache()  : Mage_Core_Model_Abstract
Remove model object related cache
clearInstance()  : $this
Clearing object for correct deleting by garbage collector
dataHasChangedFor()  : bool
Compare object data with original data
debug()  : string|array<string|int, mixed>
Present object data as string in debug mode
delete()  : $this
Delete product
duplicate()  : Mage_Catalog_Model_Product
Create duplicate
flagDirty()  : $this
formatUrlKey()  : string
Formats URL key
fromArray()  : $this
Same as setData(), but also initiates the stock item (if it is there)
getAllowedInRss()  : bool
getAllowedPriceInRss()  : bool
getAppliedRates()  : array<string|int, mixed>
getAttributeDefaultValue()  : array<string|int, mixed>|false
Retrieve default value for attribute code
getAttributes()  : array<string|int, mixed>
Retrieve product attributes if $groupId is null - retrieve all product attributes
getAttributesConfigurationReadonly()  : bool
getAttributeSetId()  : int
getAttributeText()  : string
Get attribute text by its code
getAvailableInCategories()  : array<string|int, mixed>
Retrieve category ids where product is available
getBaseRowTotal()  : float
getBillingAddress()  : Mage_Customer_Model_Address_Abstract
getBundleOptionsData()  : array<string|int, mixed>
getBundleSelectionsData()  : array<string|int, mixed>
getCacheIdTags()  : array<string|int, mixed>|false
Get cache tags associated with object id
getCacheIdTagsWithCategories()  : array<string|int, mixed>
Get cache tags associated with object id
getCacheTags()  : array<string|int, mixed>|false
Get list of cache tags applied to model object.
getCalculatedFinalPrice()  : float|null
Returns calculated final price
getCanSaveBundleSelections()  : bool
getCanSaveConfigurableAttributes()  : bool
getCanSaveCustomOptions()  : bool
getCanShowPrice()  : bool
getCategoriesReadonly()  : bool
getCategory()  : Mage_Catalog_Model_Category
Retrieve product category
getCategoryCollection()  : Mage_Catalog_Model_Resource_Category_Collection
Retrieve product categories
getCategoryId()  : int|false
Retrieve product category id
getCategoryIds()  : array<string|int, mixed>
Retrieve assigned category Ids
getChildAttributeLabelMapping()  : array<string|int, mixed>
getChildrenProducts()  : array<string|int, Mage_Catalog_Model_Product>
getCollection()  : Mage_Catalog_Model_Resource_Product_Collection
getCompositeReadonly()  : bool
getConfigurableAttributesData()  : array<string|int, mixed>
getConfigurableImagesFallbackArray()  : array<string|int, mixed>
getConfigurablePrice()  : float
getConfigurableProductsData()  : array<string|int, mixed>
getConfigureMode()  : bool
getCost()  : float
getCreatedAt()  : string
getCrossSellLinkCollection()  : Mage_Catalog_Model_Resource_Product_Link_Collection
Retrieve collection cross sell link
getCrossSellLinkData()  : array<string|int, mixed>
getCrossSellProductCollection()  : Mage_Catalog_Model_Resource_Product_Link_Product_Collection
Retrieve collection cross sell product
getCrossSellProductIds()  : array<string|int, mixed>
Retrieve cross sell products identifiers
getCrossSellProducts()  : array<string|int, mixed>
Retrieve array of cross sell products
getCustomDesignDate()  : array<string|int, mixed>
Returns array with dates for custom design
getCustomerGroupId()  : int
getCustomLayoutUpdate()  : string
getCustomOption()  : Mage_Sales_Model_Quote_Item_Option|null
Get product custom option info
getCustomOptions()  : array<string|int, mixed>
Get all custom options of the product
getData()  : mixed
Object data getter
getDataByKey()  : mixed
Get object data by particular key
getDataByPath()  : mixed
Get object data by path
getDataSetDefault()  : mixed
Fast get data or set default if value is not available
getDataUsingMethod()  : mixed
Get object data by key with calling getter method
getDefaultAttributeSetId()  : int
Retrieve default attribute set id
getDescription()  : string
getDisableAddToCart()  : bool
getDownloadableData()  : array<string|int, mixed>
getDownloadableLinks()  : array<string|int, Mage_Downloadable_Model_Link>
getDownloadableReadonly()  : bool
getDownloadableSamples()  : Mage_Downloadable_Model_Resource_Sample_Collection
getEntityId()  : int
getEntityTypeId()  : int
getEvent()  : bool
Checks event attribute for initialization as an event object
getExistsStoreValueFlag()  : bool
Check if object attribute has value in current store
getFinalPrice()  : float
Get product final price
getForceReindexRequired()  : bool
getFormatedPrice()  : array<string|int, mixed>|float
Get formatted by currency product price
getFormatedTierPrice()  : array<string|int, mixed>|float
Get formatted by currency tier price
getGiftMessageAvailable()  : int
Custom function for other modules
getGroupedLinkCollection()  : Mage_Catalog_Model_Resource_Product_Link_Collection
Retrieve collection grouped link
getGroupedLinkData()  : array<string|int, mixed>
getGroupPrice()  : float
Get product group price
getHasError()  : null|bool
getHasOptions()  : bool
getId()  : int|string|null
Retrieve model object identifier
getIdBySku()  : string
Retrieve product id by sku
getIdFieldName()  : string
Retrieve identifier field name for model
getImage()  : string
getInventoryReadonly()  : bool
getIsChangedCategories()  : bool
getIsChangedWebsites()  : bool
getIsCustomOptionChanged()  : bool
getIsDefault()  : bool
getIsDuplicate()  : bool
getIsMassupdate()  : bool
getIsRecurring()  : bool
getIsRelationsChanged()  : bool
getIsSalable()  : bool
Is product salable detecting by product type
getIsVirtual()  : bool
Retrieve is a virtual product
getLinkInstance()  : Mage_Catalog_Model_Product_Link
Retrieve link instance
getLinksPurchasedSeparately()  : bool
getLinksTitle()  : string
getListSwatchAttrValues()  : array<string|int, mixed>
getLockedAttributes()  : array<string|int, mixed>
Retrieve locked attributes
getMatchedRules()  : array<string|int, mixed>
getMediaAttributes()  : array<string|int, Mage_Catalog_Model_Resource_Eav_Attribute>
Retrieve attributes for media gallery
getMediaConfig()  : Mage_Catalog_Model_Product_Media_Config
Retrieve product media config
getMediaGallery()  : array<string|int, mixed>
getMediaGalleryImages()  : Collection
Retrieve media gallery images
getMessage()  : string
getMetaDescription()  : string
getMetaKeyword()  : string
getMetaTitle()  : string
getMinimalPrice()  : float
Returns minimal price
getMsrpDisplayActualPriceType()  : string
getMsrpEnabled()  : bool
getName()  : string|null
Get product name
getOption()  : Mage_Bundle_Model_Option
getOptionById()  : Mage_Catalog_Model_Product_Option|null
Get option from options array of product by given option id
getOptionId()  : int
getOptionInstance()  : Mage_Catalog_Model_Product_Option
Retrieve option instance
getOptions()  : array<string|int, Mage_Catalog_Model_Product_Option>
Get all options of product
getOptionsReadonly()  : bool
getOrigData()  : mixed
Get object loaded data (original data)
getOriginalId()  : int
getPageLayout()  : string
getParentId()  : bool
getParentProductId()  : int
getParentProductIds()  : array<string|int, mixed>
getPopularity()  : int
getPosition()  : string
getPreconfiguredValues()  : DataObject
Get preconfigured values from product
getPrice()  : float
Get product price through type instance
getPriceModel()  : Mage_Bundle_Model_Product_Price
Get product price model
getPriceType()  : int
getProductEntitiesInfo()  : array<string|int, mixed>
Retrieve product entities info as array
getProductId()  : int
getProductOptions()  : array<string|int, mixed>
getProductOptionsCollection()  : Mage_Catalog_Model_Resource_Product_Option_Collection
Retrieve options collection of product
getProductUrl()  : string
Retrieve Product URL
getQty()  : float
getRatingSummary()  : mixed
Returns rating summary
getRealPriceHtml()  : string
getRecurringProfile()  : array<string|int, mixed>
getRelatedLinkCollection()  : Mage_Catalog_Model_Resource_Product_Link_Collection
Retrieve collection related link
getRelatedLinkData()  : array<string|int, mixed>
getRelatedProductCollection()  : Mage_Catalog_Model_Resource_Product_Link_Product_Collection
Retrieve collection related product
getRelatedProductIds()  : array<string|int, mixed>
Retrieve related products identifiers
getRelatedProducts()  : array<string|int, Mage_Catalog_Model_Product>
Retrieve array of related roducts
getRelatedReadonly()  : bool
getRequestPath()  : string
Returns request path
getRequiredOptions()  : bool
getReservedAttributes()  : mixed
Returns system reserved attribute codes
getResource()  : Mage_Catalog_Model_Resource_Product
Retrieve model resource
getResourceCollection()  : Mage_Catalog_Model_Resource_Product_Collection
Get collection instance
getResourceName()  : string
Retrieve model resource name
getReviewId()  : string
getReviewSummary()  : Mage_Review_Model_Review_Summary
getSamplesTitle()  : string
getSelectionCanChangeQty()  : bool
getSelectionId()  : string
getSelectionPriceType()  : string
getSelectionPriceValue()  : float
getSelectionQty()  : float
getShipmentType()  : string
getShippingAddress()  : Mage_Customer_Model_Address_Abstract
getShortDescription()  : string
getSkipCheckRequiredOption()  : bool
getSku()  : string
Retrieve sku through type instance
getSmallImage()  : string
getSpecialFromDate()  : mixed
Returns starting date of the special price
getSpecialPrice()  : float|null
Returns special price with proper float casting DBAL returns DECIMAL as string, so we cast to float
getSpecialToDate()  : mixed
Returns end date of the special price
getStatus()  : int
Get product status
getStickWithinParent()  : bool
getStockData()  : array<string|int, mixed>
getStockItem()  : Mage_CatalogInventory_Model_Stock_Item
getStore()  : Mage_Core_Model_Store
Retrieve sore object
getStoreId()  : int
Retrieve Store Id
getStoreIds()  : array<string|int, mixed>
Get all sore ids where product is presented
getSwatchPrices()  : array<string|int, mixed>
getTaxClassId()  : int
getTaxPercent()  : float|null
getThumbnail()  : string
getTierPrice()  : float|array<string|int, mixed>
Get product tier price by qty
getTierPriceCount()  : int
Count how many tier prices we have for the product
getTypeHasOptions()  : bool
getTypeHasRequiredOptions()  : bool
getTypeId()  : string|null
Get product type identifier
getTypeInstance()  : Mage_Catalog_Model_Product_Type_Abstract
Retrieve type instance
getUpSellLinkCollection()  : Mage_Catalog_Model_Resource_Product_Link_Collection
Retrieve collection up sell link
getUpSellLinkData()  : array<string|int, mixed>
getUpSellProductCollection()  : Mage_Catalog_Model_Resource_Product_Link_Product_Collection
Retrieve collection up sell product
getUpSellProductIds()  : array<string|int, mixed>
Retrieve up sell products identifiers
getUpSellProducts()  : array<string|int, Mage_Catalog_Model_Product>
Retrieve array of up sell products
getUpsellReadonly()  : bool
getUrlDataObject()  : DataObject
getUrlInStore()  : string
Retrieve URL in current store
getUrlKey()  : string
getUrlModel()  : Mage_Catalog_Model_Product_Url
Get product url model
getUrlPath()  : string
Retrieve Product Url Path (include category)
getVisibility()  : int
getVisibleInCatalogStatuses()  : array<string|int, mixed>
Returns visible status IDs in catalog
getVisibleInSiteVisibilities()  : array<string|int, mixed>
Retrieve visible in site visibilities
getVisibleStatuses()  : array<string|int, mixed>
Retrieve visible statuses
getWebsiteIds()  : array<string|int, mixed>
Retrieve product websites identifiers
getWebsitesReadonly()  : bool
getWebsiteStoreIds()  : array<string|int, mixed>
Retrieve all store ids of object current website
getWeight()  : float
Retrieve weight through type instance
getWeightType()  : string
getWishlistItemId()  : int
getWishlistStoreId()  : int
hasCategoryIds()  : bool
hasChildrenProducts()  : bool
hasConfigurableImagesFallbackArray()  : bool
hasCrossSellProductIds()  : bool
hasCrossSellProducts()  : bool
hasCustomerGroupId()  : bool
hasCustomOptions()  : bool
Checks if there custom option for this product
hasData()  : bool
If $key is empty, checks whether there's any data in the object Otherwise checks if the specified attribute is set.
hasDataChanges()  : bool
Get data change status
hasErrors()  : bool
hasIsRecurring()  : bool
hasLockedAttributes()  : bool
Checks that model have locked attributes
hasMediaAttributes()  : bool
hasMsrpEnabled()  : $this
hasOptionsValidationFail()  : bool
hasPreconfiguredValues()  : bool
hasRelatedProductIds()  : bool
hasRelatedProducts()  : bool
hasStockItem()  : bool
hasStoreIds()  : bool
hasUpSellProductIds()  : bool
hasUpSellProducts()  : bool
hasUrlDataObject()  : bool
hasWebsiteIds()  : bool
hasWishlistStoreId()  : bool
isAvailable()  : bool
Check whether the product type or stock allows to purchase the product
isComposite()  : bool
Check is product composite
isConfigurable()  : bool
Check is product configurable
isDeleteable()  : bool
Checks model is deletable
isDeleted()  : bool
Set _isDeleted flag value (if $isDeleted param is defined) and return current flag value
isDirty()  : bool
isDisabled()  : bool
Checks whether product has disabled status
isDuplicable()  : bool
Checks product can be duplicated
isEmpty()  : bool
checks whether the object is empty
isGrouped()  : bool
Check is product grouped
isInStock()  : bool
Whether product available in stock
isLockedAttribute()  : bool
Retrieve locked attributes
isModuleEnabled()  : bool
isObjectNew()  : bool
Check object state (true - if it is object without id on object just created) This method can help detect if object just created in _afterSave method problem is what in after save object has id and we can't detect what object was created in this transaction
isProductsHasSku()  : bool|null
Check for empty SKU on each product
isReadonly()  : bool
Checks model is deletable
isRecurring()  : bool
Whether the product is a recurring payment
isReservedAttribute()  : bool
Check whether attribute reserved or not
isSalable()  : bool
Check is product available for sale
isSaleable()  : bool
Alias for isSalable()
isSuper()  : bool
Whether product configurable or grouped
isSuperConfig()  : bool
Alias for isConfigurable()
isSuperGroup()  : bool
Is product grouped
isVirtual()  : bool
Check is a virtual product Data helper wrapper
isVisibleInCatalog()  : bool
Check Product visilbe in catalog
isVisibleInSiteVisibility()  : bool
Check Product visible in site
jsonSerialize()  : array<string|int, mixed>
Implementation of JsonSerializable::jsonSerialize()
load()  : $this
Load object data
loadByAttribute()  : false|$this
Load entity by attribute
lockAttribute()  : $this
Lock attribute
offsetExists()  : bool
Implementation of ArrayAccess::offsetExists()
offsetGet()  : mixed
Implementation of ArrayAccess::offsetGet()
offsetSet()  : void
Implementation of ArrayAccess::offsetSet()
offsetUnset()  : void
Implementation of ArrayAccess::offsetUnset()
prepareCustomOptions()  : $this
Prepare product custom options.
processBuyRequest()  : DataObject
Parse buyRequest into options values used by product
reset()  : $this
Reset all model data
save()  : $this
Save object data
serialize()  : string
serialize object attributes
setAddToCartUrl()  : $this
setAffectedCategoryIds()  : $this
setAllowedInRss()  : $this
setAllowedPriceInRss()  : $this
setAppliedRates()  : $this
setAttribute()  : $this
setAttributeDefaultValue()  : $this
Adding attribute code and value to default value registry
setAttributeSetId()  : $this
setBundleOptionsData()  : $this
setBundleSelectionsData()  : $this
setCanSaveBundleSelections()  : $this
setCanSaveCustomOptions()  : $this
setCartQty()  : $this
setCategory()  : $this
setCategoryIds()  : $this
Set assigned category IDs array to product
setChildrenProducts()  : $this
setConfigurableImagesFallbackArray()  : $this
setConfigurablePrice()  : $this
setConfigureMode()  : $this
setCreatedAt()  : $this
setCrossSellLinkData()  : $this
setCrossSellProductIds()  : $this
setCrossSellProducts()  : $this
setCustomerGroupId()  : $this
setCustomOptions()  : mixed
Sets custom options for the product
setData()  : $this
Overwrite data in the object.
setDataChanges()  : $this
Clears data changes status
setDataUsingMethod()  : $this
Set object data with calling setter method
setDisableAddToCart()  : $this
setDownloadableData()  : $this
setDownloadableLinks()  : $this
setDownloadableSamples()  : $this
setExcludeUrlRewrite()  : $this
setExistsStoreValueFlag()  : $this
Set attribute code flag if attribute has value in current store and does not use value of default store as value
setFinalPrice()  : $this
Sets final price of product
setGroupedLinkData()  : $this
setHasError()  : $this
setHasOptions()  : $this
setId()  : $this
Declare model object identifier value
setIdFieldName()  : $this
set name of object id field
setIsChangedCategories()  : $this
setIsChangedWebsites()  : $this
setIsCustomOptionChanged()  : $this
setIsDeleteable()  : $this
Set is deletable flag
setIsDuplicable()  : $this
Set is duplicable flag
setIsDuplicate()  : $this
setIsInStock()  : $this
setIsMassupdate()  : $this
setIsQtyDecimal()  : $this
setIsReadonly()  : $this
Set is deletable flag
setIsRelationsChanged()  : $this
setIsSalable()  : $this
setIsSuperMode()  : $this
setLinksExist()  : $this
setLinksPurchasedSeparately()  : $this
setMediaAttributes()  : $this
setMediaGallery()  : $this
setNeedStoreForReindex()  : $this
setOption()  : $this
setOptionsValidationFail()  : $this
setOrigData()  : DataObject
Set original loaded data if needed
setOriginalId()  : $this
setParentId()  : $this
setParentProductIds()  : $this
setPrice()  : $this
setPriceCalculation()  : $this
Set Price calculation flag
setProductOptions()  : $this
setProductTags()  : $this
setProductUrl()  : $this
setQty()  : $this
setQuoteItemPrice()  : $this
setQuoteItemQty()  : $this
setQuoteItemRowTotal()  : $this
setQuoteQty()  : $this
setRatingSummary()  : $this
setRatingVotes()  : $this
setRealPriceHtml()  : $this
setRelatedLinkData()  : $this
setRelatedProductIds()  : $this
setRelatedProducts()  : $this
setRequiredOptions()  : $this
setShortDescription()  : $this
setSkipCheckRequiredOption()  : $this
setSku()  : $this
setStatus()  : $this
setStockData()  : $this
setStockItem()  : $this
setStore()  : $this
setStoreId()  : $this
setStoreIds()  : $this
setTaxPercent()  : $this
setTypeHasOptions()  : $this
setTypeHasRequiredOptions()  : $this
setTypeId()  : $this
setTypeInstance()  : $this
Set type instance for external
setUpdatedAt()  : $this
setUpSellLinkData()  : $this
setUpSellProductIds()  : $this
setUpSellProducts()  : $this
setUrlDataObject()  : $this
setUrlKey()  : $this
setUrlPath()  : $this
setVisibility()  : $this
setWebsiteId()  : $this
setWebsiteIds()  : $this
setWishlistStoreId()  : $this
toArray()  : array<string|int, mixed>
Renders the object to array
toJson()  : string
Public wrapper for __toJson
toString()  : string
Public wrapper for __toString
toXml()  : string
Public wrapper for __toXml
unlockAttribute()  : $this
Unlock attribute
unlockAttributes()  : $this
Unlock all attributes
unsetData()  : $this
Unset data from the object.
unsetOldData()  : $this
Unset old fields data from the object.
unsRecurringProfile()  : $this
unsSkipCheckRequiredOption()  : $this
validate()  : $this
Validate Product Data
__toJson()  : string
Convert object attributes to JSON
__toXml()  : string
Convert object attributes to XML
_addFullNames()  : mixed
_afterDelete()  : $this
Processing object after delete data
_afterDeleteCommit()  : $this
Init indexing process after product delete commit
_afterLoad()  : $this
Load product options if they exists
_afterSave()  : $this
Saving product type related data and init index
_beforeDelete()  : $this
Clear cache related with product and protect delete from not admin Register indexing event before delete product
_beforeLoad()  : $this
Processing object before load data
_beforeSave()  : $this
Check product options and type options and save them, too
_camelize()  : string
_clearData()  : $this
Clearing product's data
_clearOptionReferences()  : $this
Clearing references to product from product's options
_clearReferences()  : $this
Clearing references on product
_construct()  : void
Initialize resources
_getData()  : mixed
Get value from _data array without parse key
_getEventData()  : array<string|int, mixed>
Get array of objects transferred to default events processing
_getImageHelper()  : Mage_Catalog_Helper_Image
Return Catalog Product Image helper instance
_hasModelChanged()  : bool
Check whether model has changed data.
_init()  : mixed
Standard model initialization
_initOldFieldsMap()  : DataObject
Init mapping array of short fields to its full names
_prepareArray()  : array<string|int, mixed>
Set required array elements
_prepareSyncFieldsMap()  : $this
Called after old fields are inited. Forms synchronization map to sync old fields and new fields between each other.
_protectFromNonAdmin()  : mixed
Safeguard func that will check, if we are in admin area
_setResourceModel()  : mixed
Set resource names
_underscore()  : string
Converts field names for setters and getters

Constants

CACHE_TAG

public mixed CACHE_TAG = 'catalog_product'

DEFAULT_STORE_ID

Identifier of default store used for loading default data for entity

public mixed DEFAULT_STORE_ID = 0

ENTITY

Entity code.

public mixed ENTITY = 'catalog_product'

Can be used as part of method name for entity processing

Properties

$_cacheTag

protected mixed $_cacheTag = 'catalog_product'

$_calculatePrice

Flag for get Price function

protected bool $_calculatePrice = \true

$_canAffectOptions

protected mixed $_canAffectOptions = \false

$_customOptions

Product object customization (not stored in DB)

protected array<string|int, mixed> $_customOptions = []

$_data

Object attributes

protected array<string|int, mixed>|null $_data = []

$_dataSaveAllowed

Flag which can stop data saving after before save Can be used for next sequence: we check data in _beforeSave, if data are not valid - we can set this flag to false value and save process will be stopped

protected bool $_dataSaveAllowed = \true

$_defaultValues

Attribute default values

protected array<string|int, mixed> $_defaultValues = []

This array contain default values for attributes which was redefine value for store

$_dirty

protected array<string|int, mixed> $_dirty

$_errors

protected mixed $_errors = []

$_eventObject

protected mixed $_eventObject = 'product'

$_eventPrefix

protected mixed $_eventPrefix = 'catalog_product'

$_hasDataChanges

Data changes flag (true after setData|unsetData call)

protected bool $_hasDataChanges = false

$_idFieldName

Name of object id field

protected string $_idFieldName = null

$_isDeleteable

Is model deletable

protected bool $_isDeleteable = \true

$_isDeleted

Object delete flag

protected bool $_isDeleted = false

$_isDuplicable

Flag for available duplicate function

protected bool $_isDuplicable = \true

$_isObjectNew

Flag which allow detect object state: is it new object (without id) or existing one (with id)

protected bool|null $_isObjectNew = \null

$_isReadonly

Is model readonly

protected bool $_isReadonly = \false

$_lockedAttributes

Locked attributes

protected array<string|int, mixed> $_lockedAttributes = []

$_oldFieldsMap

Map short fields names to its full names

protected array<string|int, mixed> $_oldFieldsMap = []

$_optionInstance

protected mixed $_optionInstance

$_options

protected mixed $_options = []

$_origData

Original data that was loaded

protected array<string|int, mixed>|null $_origData

$_reservedAttributes

Product reserved attribute codes

protected mixed $_reservedAttributes

$_resourceCollectionName

Name of the resource collection model

protected string $_resourceCollectionName

$_resourceName

Name of the resource model

protected string $_resourceName

$_storeValuesFlags

This array contains codes of attributes which have value in current store

protected array<string|int, mixed> $_storeValuesFlags = []

$_syncFieldsMap

Map of fields to sync to other fields upon changing their data

protected mixed $_syncFieldsMap = []

$_typeInstanceSingleton

Product type instance as singleton

protected mixed $_typeInstanceSingleton = \null

$_underscoreCache

Setter/Getter underscore transformation cache

protected static array<string|int, mixed> $_underscoreCache = []

$_urlRewrite

protected static mixed $_urlRewrite

Methods

__call()

Set/Get attribute wrapper

public __call(string $method, array<string|int, mixed> $args) : mixed
Parameters
$method : string
$args : array<string|int, mixed>

__construct()

Constructor

public __construct() : mixed

By default, is looking for first argument as array and assigns it as object attributes This behaviour may change in child classes

__get()

Attribute getter (deprecated)

public __get(string $var) : mixed
Parameters
$var : string

__set()

Attribute setter (deprecated)

public __set(string $var, mixed $value) : mixed
Parameters
$var : string
$value : mixed

__toArray()

Convert object attributes to array

public __toArray([array<string|int, mixed> $arrAttributes = [] ]) : array<string|int, mixed>
Parameters
$arrAttributes : array<string|int, mixed> = []

array of required attributes

Return values
array<string|int, mixed>

addAttributeUpdate()

Save current attribute with code $code and assign new value

public addAttributeUpdate(string $code, mixed $value, int $store) : mixed
Parameters
$code : string

Attribute code

$value : mixed

New attribute value

$store : int

Store ID

addCustomOption()

Add custom option information to product

public addCustomOption(string $code, mixed $value[, int $product = null ]) : $this
Parameters
$code : string

Option code

$value : mixed

Value of the option

$product : int = null

Product ID

Return values
$this

addData()

Add data to the object.

public addData(array<string|int, mixed> $arr) : $this

Retains previous data in the object.

Parameters
$arr : array<string|int, mixed>
Return values
$this

addImageToMediaGallery()

Add image to media gallery

public addImageToMediaGallery(string $file[, string|array<string|int, mixed> $mediaAttribute = null ][, bool $move = false ][, bool $exclude = true ]) : $this
Parameters
$file : string

file path of image in file system

$mediaAttribute : string|array<string|int, mixed> = null

code of attribute with type 'media_image', leave blank if image should be only in gallery

$move : bool = false

if true, it will move source file

$exclude : bool = true

mark image as disabled in product page view

Return values
$this

afterCommitCallback()

Callback function which called after transaction commit in resource model

public afterCommitCallback() : $this
Attributes
#[Override]
Return values
$this

afterLoad()

Object after load processing. Implemented as public interface for supporting objects after load in collections

public afterLoad() : $this
Return values
$this

canAffectOptions()

Check/set if options can be affected when saving product If value specified, it will be set.

public canAffectOptions([bool $value = null ]) : bool
Parameters
$value : bool = null
Return values
bool

canBeShowInCategory()

Check availability display product in category

public canBeShowInCategory(int $categoryId) : string
Parameters
$categoryId : int
Return values
string

canConfigure()

Check if product can be configured

public canConfigure() : bool
Return values
bool

cleanCache()

Clear cache related with product id

public cleanCache() : $this
Return values
$this

clearInstance()

Clearing object for correct deleting by garbage collector

public final clearInstance() : $this
Return values
$this

dataHasChangedFor()

Compare object data with original data

public dataHasChangedFor(string $field) : bool
Parameters
$field : string
Return values
bool

debug()

Present object data as string in debug mode

public debug([mixed $data = null ][, array<string|int, mixed> &$objects = [] ]) : string|array<string|int, mixed>
Parameters
$data : mixed = null
$objects : array<string|int, mixed> = []
Return values
string|array<string|int, mixed>

delete()

Delete product

public delete() : $this
Attributes
#[Override]
Return values
$this

flagDirty()

public flagDirty(string $field[, bool $flag = true ]) : $this
Parameters
$field : string
$flag : bool = true
Return values
$this

formatUrlKey()

Formats URL key

public formatUrlKey(string $str[, null|string $locale = null ]) : string
Parameters
$str : string
$locale : null|string = null
Return values
string

fromArray()

Same as setData(), but also initiates the stock item (if it is there)

public fromArray(array<string|int, mixed> $data) : $this
Parameters
$data : array<string|int, mixed>

Array to form the object from

Return values
$this

getAllowedInRss()

public getAllowedInRss() : bool
Return values
bool

getAllowedPriceInRss()

public getAllowedPriceInRss() : bool
Return values
bool

getAppliedRates()

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

getAttributeDefaultValue()

Retrieve default value for attribute code

public getAttributeDefaultValue(string $attributeCode) : array<string|int, mixed>|false
Parameters
$attributeCode : string
Return values
array<string|int, mixed>|false

getAttributes()

Retrieve product attributes if $groupId is null - retrieve all product attributes

public getAttributes([int $groupId = null ][, bool $skipSuper = false ]) : array<string|int, mixed>
Parameters
$groupId : int = null

Retrieve attributes of the specified group

$skipSuper : bool = false

Not used

Return values
array<string|int, mixed>

getAttributesConfigurationReadonly()

public getAttributesConfigurationReadonly() : bool
Return values
bool

getAttributeSetId()

public getAttributeSetId() : int
Return values
int

getAttributeText()

Get attribute text by its code

public getAttributeText(string $attributeCode) : string
Parameters
$attributeCode : string

of the attribute

Return values
string

getAvailableInCategories()

Retrieve category ids where product is available

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

getBaseRowTotal()

public getBaseRowTotal() : float
Return values
float

getBundleOptionsData()

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

getBundleSelectionsData()

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

getCacheIdTags()

Get cache tags associated with object id

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

getCacheIdTagsWithCategories()

Get cache tags associated with object id

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

getCacheTags()

Get list of cache tags applied to model object.

public getCacheTags() : array<string|int, mixed>|false

Return false if cache tags are not supported by model

Return values
array<string|int, mixed>|false

getCalculatedFinalPrice()

Returns calculated final price

public getCalculatedFinalPrice() : float|null
Return values
float|null

getCanSaveBundleSelections()

public getCanSaveBundleSelections() : bool
Return values
bool

getCanSaveConfigurableAttributes()

public getCanSaveConfigurableAttributes() : bool
Return values
bool

getCanSaveCustomOptions()

public getCanSaveCustomOptions() : bool
Return values
bool

getCanShowPrice()

public getCanShowPrice() : bool
Return values
bool

getCategoriesReadonly()

public getCategoriesReadonly() : bool
Return values
bool

getCategoryId()

Retrieve product category id

public getCategoryId() : int|false
Return values
int|false

getCategoryIds()

Retrieve assigned category Ids

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

getChildAttributeLabelMapping()

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

getCompositeReadonly()

public getCompositeReadonly() : bool
Return values
bool

getConfigurableAttributesData()

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

getConfigurableImagesFallbackArray()

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

getConfigurablePrice()

public getConfigurablePrice() : float
Return values
float

getConfigurableProductsData()

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

getConfigureMode()

public getConfigureMode() : bool
Return values
bool

getCost()

public getCost() : float
Return values
float

getCreatedAt()

public getCreatedAt() : string
Return values
string

getCrossSellLinkData()

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

getCrossSellProductIds()

Retrieve cross sell products identifiers

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

getCrossSellProducts()

Retrieve array of cross sell products

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

getCustomDesignDate()

Returns array with dates for custom design

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

getCustomerGroupId()

public getCustomerGroupId() : int
Return values
int

getCustomLayoutUpdate()

public getCustomLayoutUpdate() : string
Return values
string

getCustomOptions()

Get all custom options of the product

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

getData()

Object data getter

public getData([string $key = '' ][, string|int $index = null ]) : mixed

If $key is not defined will return all the data as an array. Otherwise, it will return value of the element specified by $key. It is possible to use keys like a/b/c for access nested array data

If $index is specified it will assume that attribute data is an array and retrieve corresponding member. If data is the string - it will be explode by new line character and converted to array.

Parameters
$key : string = ''
$index : string|int = null

getDataByKey()

Get object data by particular key

public getDataByKey(string $key) : mixed
Parameters
$key : string

getDataByPath()

Get object data by path

public getDataByPath(string $path) : mixed

Method consider the path as chain of keys: a/b/c => ['a']['b']['c']

Parameters
$path : string

getDataSetDefault()

Fast get data or set default if value is not available

public getDataSetDefault(string $key, mixed $default) : mixed
Parameters
$key : string
$default : mixed

getDataUsingMethod()

Get object data by key with calling getter method

public getDataUsingMethod(string $key[, mixed $args = null ]) : mixed
Parameters
$key : string
$args : mixed = null

getDefaultAttributeSetId()

Retrieve default attribute set id

public getDefaultAttributeSetId() : int
Return values
int

getDescription()

public getDescription() : string
Return values
string

getDisableAddToCart()

public getDisableAddToCart() : bool
Return values
bool

getDownloadableData()

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

getDownloadableReadonly()

public getDownloadableReadonly() : bool
Return values
bool

getEntityId()

public getEntityId() : int
Return values
int

getEntityTypeId()

public getEntityTypeId() : int
Return values
int

getEvent()

Checks event attribute for initialization as an event object

public getEvent() : bool
Return values
bool

getExistsStoreValueFlag()

Check if object attribute has value in current store

public getExistsStoreValueFlag(string $attributeCode) : bool
Parameters
$attributeCode : string
Return values
bool

getFinalPrice()

Get product final price

public getFinalPrice([float $qty = null ]) : float
Parameters
$qty : float = null
Return values
float

getForceReindexRequired()

public getForceReindexRequired() : bool
Return values
bool

getFormatedPrice()

Get formatted by currency product price

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

getFormatedTierPrice()

Get formatted by currency tier price

public getFormatedTierPrice([float $qty = null ]) : array<string|int, mixed>|float
Parameters
$qty : float = null
Return values
array<string|int, mixed>|float

getGiftMessageAvailable()

Custom function for other modules

public getGiftMessageAvailable() : int
Return values
int

getGroupedLinkData()

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

getGroupPrice()

Get product group price

public getGroupPrice() : float
Return values
float

getHasError()

public getHasError() : null|bool
Return values
null|bool

getHasOptions()

public getHasOptions() : bool
Return values
bool

getId()

Retrieve model object identifier

public getId() : int|string|null
Attributes
#[Override]
Return values
int|string|null

getIdBySku()

Retrieve product id by sku

public getIdBySku(string $sku) : string
Parameters
$sku : string
Return values
string

getIdFieldName()

Retrieve identifier field name for model

public getIdFieldName() : string
Attributes
#[Override]
Return values
string

getImage()

public getImage() : string
Return values
string

getInventoryReadonly()

public getInventoryReadonly() : bool
Return values
bool

getIsChangedCategories()

public getIsChangedCategories() : bool
Return values
bool

getIsChangedWebsites()

public getIsChangedWebsites() : bool
Return values
bool

getIsCustomOptionChanged()

public getIsCustomOptionChanged() : bool
Return values
bool

getIsDefault()

public getIsDefault() : bool
Return values
bool

getIsDuplicate()

public getIsDuplicate() : bool
Return values
bool

getIsMassupdate()

public getIsMassupdate() : bool
Return values
bool

getIsRecurring()

public getIsRecurring() : bool
Return values
bool

getIsRelationsChanged()

public getIsRelationsChanged() : bool
Return values
bool

getIsSalable()

Is product salable detecting by product type

public getIsSalable() : bool
Return values
bool

getIsVirtual()

Retrieve is a virtual product

public getIsVirtual() : bool
Return values
bool

getLinksPurchasedSeparately()

public getLinksPurchasedSeparately() : bool
Return values
bool

getLinksTitle()

public getLinksTitle() : string
Return values
string

getListSwatchAttrValues()

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

getLockedAttributes()

Retrieve locked attributes

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

getMatchedRules()

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

getMediaGallery()

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

getMessage()

public getMessage() : string
Return values
string

getMetaDescription()

public getMetaDescription() : string
Return values
string

getMetaKeyword()

public getMetaKeyword() : string
Return values
string

getMetaTitle()

public getMetaTitle() : string
Return values
string

getMinimalPrice()

Returns minimal price

public getMinimalPrice() : float
Return values
float

getMsrpDisplayActualPriceType()

public getMsrpDisplayActualPriceType() : string
Return values
string

getMsrpEnabled()

public getMsrpEnabled() : bool
Return values
bool

getName()

Get product name

public getName() : string|null
Return values
string|null

getOptionId()

public getOptionId() : int
Return values
int

getOptionsReadonly()

public getOptionsReadonly() : bool
Return values
bool

getOrigData()

Get object loaded data (original data)

public getOrigData([string $key = null ]) : mixed
Parameters
$key : string = null

getOriginalId()

public getOriginalId() : int
Return values
int

getPageLayout()

public getPageLayout() : string
Return values
string

getParentId()

public getParentId() : bool
Return values
bool

getParentProductId()

public getParentProductId() : int
Return values
int

getParentProductIds()

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

getPopularity()

public getPopularity() : int
Return values
int

getPosition()

public getPosition() : string
Return values
string

getPrice()

Get product price through type instance

public getPrice() : float
Return values
float

getPriceType()

public getPriceType() : int
Return values
int

getProductEntitiesInfo()

Retrieve product entities info as array

public getProductEntitiesInfo([string|array<string|int, mixed> $columns = null ]) : array<string|int, mixed>
Parameters
$columns : string|array<string|int, mixed> = null

One or several columns

Return values
array<string|int, mixed>

getProductId()

public getProductId() : int
Return values
int

getProductOptions()

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

getProductUrl()

Retrieve Product URL

public getProductUrl([bool $useSid = null ]) : string
Parameters
$useSid : bool = null
Return values
string

getQty()

public getQty() : float
Return values
float

getRatingSummary()

Returns rating summary

public getRatingSummary() : mixed

getRealPriceHtml()

public getRealPriceHtml() : string
Return values
string

getRecurringProfile()

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

getRelatedLinkData()

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

getRelatedProductIds()

Retrieve related products identifiers

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

getRelatedReadonly()

public getRelatedReadonly() : bool
Return values
bool

getRequestPath()

Returns request path

public getRequestPath() : string
Return values
string

getRequiredOptions()

public getRequiredOptions() : bool
Return values
bool

getReservedAttributes()

Returns system reserved attribute codes

public getReservedAttributes() : mixed

@return array Reserved attribute names

getResourceName()

Retrieve model resource name

public getResourceName() : string
Return values
string

getReviewId()

public getReviewId() : string
Return values
string

getSamplesTitle()

public getSamplesTitle() : string
Return values
string

getSelectionCanChangeQty()

public getSelectionCanChangeQty() : bool
Return values
bool

getSelectionId()

public getSelectionId() : string
Return values
string

getSelectionPriceType()

public getSelectionPriceType() : string
Return values
string

getSelectionPriceValue()

public getSelectionPriceValue() : float
Return values
float

getSelectionQty()

public getSelectionQty() : float
Return values
float

getShipmentType()

public getShipmentType() : string
Return values
string

getShortDescription()

public getShortDescription() : string
Return values
string

getSkipCheckRequiredOption()

public getSkipCheckRequiredOption() : bool
Return values
bool

getSku()

Retrieve sku through type instance

public getSku() : string
Return values
string

getSmallImage()

public getSmallImage() : string
Return values
string

getSpecialFromDate()

Returns starting date of the special price

public getSpecialFromDate() : mixed

getSpecialPrice()

Returns special price with proper float casting DBAL returns DECIMAL as string, so we cast to float

public getSpecialPrice() : float|null
Return values
float|null

getSpecialToDate()

Returns end date of the special price

public getSpecialToDate() : mixed

getStatus()

Get product status

public getStatus() : int
Return values
int

getStickWithinParent()

public getStickWithinParent() : bool
Return values
bool

getStockData()

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

getStoreId()

Retrieve Store Id

public getStoreId() : int
Return values
int

getStoreIds()

Get all sore ids where product is presented

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

getSwatchPrices()

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

getTaxClassId()

public getTaxClassId() : int
Return values
int

getTaxPercent()

public getTaxPercent() : float|null
Return values
float|null

getThumbnail()

public getThumbnail() : string
Return values
string

getTierPrice()

Get product tier price by qty

public getTierPrice([float $qty = null ]) : float|array<string|int, mixed>
Parameters
$qty : float = null
Return values
float|array<string|int, mixed>

getTierPriceCount()

Count how many tier prices we have for the product

public getTierPriceCount() : int
Return values
int

getTypeHasOptions()

public getTypeHasOptions() : bool
Return values
bool

getTypeHasRequiredOptions()

public getTypeHasRequiredOptions() : bool
Return values
bool

getTypeId()

Get product type identifier

public getTypeId() : string|null
Return values
string|null

getUpSellLinkData()

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

getUpSellProductIds()

Retrieve up sell products identifiers

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

getUpsellReadonly()

public getUpsellReadonly() : bool
Return values
bool

getUrlInStore()

Retrieve URL in current store

public getUrlInStore([array<string|int, mixed> $params = [] ]) : string
Parameters
$params : array<string|int, mixed> = []

the route params

Return values
string

getUrlKey()

public getUrlKey() : string
Return values
string

getVisibility()

public getVisibility() : int
Return values
int

getVisibleInCatalogStatuses()

Returns visible status IDs in catalog

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

getVisibleInSiteVisibilities()

Retrieve visible in site visibilities

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

getVisibleStatuses()

Retrieve visible statuses

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

getWebsiteIds()

Retrieve product websites identifiers

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

getWebsitesReadonly()

public getWebsitesReadonly() : bool
Return values
bool

getWebsiteStoreIds()

Retrieve all store ids of object current website

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

getWeight()

Retrieve weight through type instance

public getWeight() : float
Return values
float

getWeightType()

public getWeightType() : string
Return values
string

getWishlistItemId()

public getWishlistItemId() : int
Return values
int

getWishlistStoreId()

public getWishlistStoreId() : int
Return values
int

hasCategoryIds()

public hasCategoryIds() : bool
Return values
bool

hasChildrenProducts()

public hasChildrenProducts() : bool
Return values
bool

hasConfigurableImagesFallbackArray()

public hasConfigurableImagesFallbackArray() : bool
Return values
bool

hasCrossSellProductIds()

public hasCrossSellProductIds() : bool
Return values
bool

hasCrossSellProducts()

public hasCrossSellProducts() : bool
Return values
bool

hasCustomerGroupId()

public hasCustomerGroupId() : bool
Return values
bool

hasCustomOptions()

Checks if there custom option for this product

public hasCustomOptions() : bool
Return values
bool

hasData()

If $key is empty, checks whether there's any data in the object Otherwise checks if the specified attribute is set.

public hasData([string $key = '' ]) : bool
Parameters
$key : string = ''
Return values
bool

hasDataChanges()

Get data change status

public hasDataChanges() : bool
Return values
bool

hasErrors()

public hasErrors() : bool
Return values
bool

hasIsRecurring()

public hasIsRecurring() : bool
Return values
bool

hasLockedAttributes()

Checks that model have locked attributes

public hasLockedAttributes() : bool
Return values
bool

hasMediaAttributes()

public hasMediaAttributes() : bool
Return values
bool

hasMsrpEnabled()

public hasMsrpEnabled() : $this
Return values
$this

hasOptionsValidationFail()

public hasOptionsValidationFail() : bool
Return values
bool

hasPreconfiguredValues()

public hasPreconfiguredValues() : bool
Return values
bool

hasRelatedProductIds()

public hasRelatedProductIds() : bool
Return values
bool

hasRelatedProducts()

public hasRelatedProducts() : bool
Return values
bool

hasStockItem()

public hasStockItem() : bool
Return values
bool

hasStoreIds()

public hasStoreIds() : bool
Return values
bool

hasUpSellProductIds()

public hasUpSellProductIds() : bool
Return values
bool

hasUpSellProducts()

public hasUpSellProducts() : bool
Return values
bool

hasUrlDataObject()

public hasUrlDataObject() : bool
Return values
bool

hasWebsiteIds()

public hasWebsiteIds() : bool
Return values
bool

hasWishlistStoreId()

public hasWishlistStoreId() : bool
Return values
bool

isAvailable()

Check whether the product type or stock allows to purchase the product

public isAvailable() : bool
Return values
bool

isComposite()

Check is product composite

public isComposite() : bool
Return values
bool

isConfigurable()

Check is product configurable

public isConfigurable() : bool
Return values
bool

isDeleteable()

Checks model is deletable

public isDeleteable() : bool
Return values
bool

isDeleted()

Set _isDeleted flag value (if $isDeleted param is defined) and return current flag value

public isDeleted([bool $isDeleted = null ]) : bool
Parameters
$isDeleted : bool = null
Return values
bool

isDirty()

public isDirty([string $field = null ]) : bool
Parameters
$field : string = null
Return values
bool

isDisabled()

Checks whether product has disabled status

public isDisabled() : bool
Return values
bool

isDuplicable()

Checks product can be duplicated

public isDuplicable() : bool
Return values
bool

isEmpty()

checks whether the object is empty

public isEmpty() : bool
Return values
bool

isGrouped()

Check is product grouped

public isGrouped() : bool
Return values
bool

isInStock()

Whether product available in stock

public isInStock() : bool
Return values
bool

isLockedAttribute()

Retrieve locked attributes

public isLockedAttribute(string $attributeCode) : bool
Parameters
$attributeCode : string
Return values
bool

isModuleEnabled()

public isModuleEnabled(string $moduleName[, string $helperAlias = 'core' ]) : bool
Parameters
$moduleName : string
$helperAlias : string = 'core'
Return values
bool

isObjectNew()

Check object state (true - if it is object without id on object just created) This method can help detect if object just created in _afterSave method problem is what in after save object has id and we can't detect what object was created in this transaction

public isObjectNew([bool $flag = null ]) : bool
Parameters
$flag : bool = null
Return values
bool

isProductsHasSku()

Check for empty SKU on each product

public isProductsHasSku(array<string|int, mixed> $productIds) : bool|null
Parameters
$productIds : array<string|int, mixed>
Return values
bool|null

isReadonly()

Checks model is deletable

public isReadonly() : bool
Return values
bool

isRecurring()

Whether the product is a recurring payment

public isRecurring() : bool
Return values
bool

isReservedAttribute()

Check whether attribute reserved or not

public isReservedAttribute(mixed $attribute) : bool

@param Mage_Catalog_Model_Entity_Attribute $attribute Attribute model object

Parameters
$attribute : mixed
Return values
bool

isSalable()

Check is product available for sale

public isSalable() : bool
Return values
bool

isSaleable()

Alias for isSalable()

public isSaleable() : bool
Return values
bool

isSuper()

Whether product configurable or grouped

public isSuper() : bool
Return values
bool

isSuperConfig()

Alias for isConfigurable()

public isSuperConfig() : bool
Return values
bool

isSuperGroup()

Is product grouped

public isSuperGroup() : bool
Return values
bool

isVirtual()

Check is a virtual product Data helper wrapper

public isVirtual() : bool
Return values
bool

isVisibleInCatalog()

Check Product visilbe in catalog

public isVisibleInCatalog() : bool
Return values
bool

isVisibleInSiteVisibility()

Check Product visible in site

public isVisibleInSiteVisibility() : bool
Return values
bool

jsonSerialize()

Implementation of JsonSerializable::jsonSerialize()

public jsonSerialize() : array<string|int, mixed>

Prepares the object data for JSON serialization. Returns all object data as an array, with special handling for nested DataObject instances:

  • If a nested DataObject has a custom jsonSerialize() implementation, it's preserved as-is
  • If a nested DataObject has a custom toJson() method, it's converted to JSON string
  • If a nested DataObject uses only the base implementations, it's excluded from output

This prevents infinite recursion and circular references when serializing object hierarchies.

Attributes
#[Override]
Return values
array<string|int, mixed>

load()

Load object data

public load(string|null|int $id[, string|null $field = null ]) : $this
Parameters
$id : string|null|int
$field : string|null = null
Return values
$this

loadByAttribute()

Load entity by attribute

public loadByAttribute(Mage_Eav_Model_Entity_Attribute_Interface|int|string|array<string|int, mixed> $attribute, null|string|array<string|int, mixed> $value[, string $additionalAttributes = '*' ]) : false|$this
Parameters
$attribute : Mage_Eav_Model_Entity_Attribute_Interface|int|string|array<string|int, mixed>
$value : null|string|array<string|int, mixed>
$additionalAttributes : string = '*'
Return values
false|$this

lockAttribute()

Lock attribute

public lockAttribute(string $attributeCode) : $this
Parameters
$attributeCode : string
Return values
$this

prepareCustomOptions()

Prepare product custom options.

public prepareCustomOptions() : $this

To be sure that all product custom options does not has ID and has product instance

Return values
$this

reset()

Reset all model data

public reset() : $this
Return values
$this

save()

Save object data

public save() : $this
Tags
throws
Throwable
Return values
$this

serialize()

serialize object attributes

public serialize([array<string|int, mixed> $attributes = [] ][, string $valueSeparator = '=' ][, string $fieldSeparator = ' ' ][, string $quote = '"' ]) : string
Parameters
$attributes : array<string|int, mixed> = []
$valueSeparator : string = '='
$fieldSeparator : string = ' '
$quote : string = '"'
Return values
string

setAddToCartUrl()

public setAddToCartUrl(string $value) : $this
Parameters
$value : string
Return values
$this

setAffectedCategoryIds()

public setAffectedCategoryIds(array<string|int, mixed> $value) : $this
Parameters
$value : array<string|int, mixed>
Return values
$this

setAllowedInRss()

public setAllowedInRss(bool $value) : $this
Parameters
$value : bool
Return values
$this

setAllowedPriceInRss()

public setAllowedPriceInRss(bool $value) : $this
Parameters
$value : bool
Return values
$this

setAppliedRates()

public setAppliedRates(array<string|int, mixed> $value) : $this
Parameters
$value : array<string|int, mixed>
Return values
$this

setAttributeDefaultValue()

Adding attribute code and value to default value registry

public setAttributeDefaultValue(string $attributeCode, string $value) : $this

Default value existing is flag for using store value in data

Parameters
$attributeCode : string
$value : string
Return values
$this

setAttributeSetId()

public setAttributeSetId(int $value) : $this
Parameters
$value : int
Return values
$this

setBundleOptionsData()

public setBundleOptionsData(array<string|int, mixed> $value) : $this
Parameters
$value : array<string|int, mixed>
Return values
$this

setBundleSelectionsData()

public setBundleSelectionsData(array<string|int, mixed> $value) : $this
Parameters
$value : array<string|int, mixed>
Return values
$this

setCanSaveBundleSelections()

public setCanSaveBundleSelections(bool $value) : $this
Parameters
$value : bool
Return values
$this

setCanSaveCustomOptions()

public setCanSaveCustomOptions(bool $value) : $this
Parameters
$value : bool
Return values
$this

setCartQty()

public setCartQty(float $value) : $this
Parameters
$value : float
Return values
$this

setCategoryIds()

Set assigned category IDs array to product

public setCategoryIds(array<string|int, mixed>|int|string $ids) : $this
Parameters
$ids : array<string|int, mixed>|int|string

the ID(s) as int, comma-separated string or array of ints

Return values
$this

setConfigurableImagesFallbackArray()

public setConfigurableImagesFallbackArray(array<string|int, mixed> $value) : $this
Parameters
$value : array<string|int, mixed>
Return values
$this

setConfigurablePrice()

public setConfigurablePrice(float $value) : $this
Parameters
$value : float
Return values
$this

setConfigureMode()

public setConfigureMode(bool $value) : $this
Parameters
$value : bool
Return values
$this

setCreatedAt()

public setCreatedAt(string $currentTime) : $this
Parameters
$currentTime : string
Return values
$this

setCrossSellLinkData()

public setCrossSellLinkData(array<string|int, mixed> $value) : $this
Parameters
$value : array<string|int, mixed>
Return values
$this

setCrossSellProductIds()

public setCrossSellProductIds(array<string|int, mixed> $value) : $this
Parameters
$value : array<string|int, mixed>
Return values
$this

setCrossSellProducts()

public setCrossSellProducts(array<string|int, mixed> $value) : $this
Parameters
$value : array<string|int, mixed>
Return values
$this

setCustomerGroupId()

public setCustomerGroupId(int $value) : $this
Parameters
$value : int
Return values
$this

setCustomOptions()

Sets custom options for the product

public setCustomOptions(array<string|int, mixed> $options) : mixed
Parameters
$options : array<string|int, mixed>

Array of options

setData()

Overwrite data in the object.

public setData(mixed $key[, mixed $value = null ]) : $this

$key can be string or array. If $key is string, the attribute value will be overwritten by $value

If $key is an array, it will overwrite all the data in the object.

$isChanged will specify if the object needs to be saved after an update.

Parameters
$key : mixed
$value : mixed = null
Attributes
#[Override]
Return values
$this

setDataChanges()

Clears data changes status

public setDataChanges(bool $value) : $this
Parameters
$value : bool
Return values
$this

setDataUsingMethod()

Set object data with calling setter method

public setDataUsingMethod(string $key[, mixed $args = [] ]) : $this
Parameters
$key : string
$args : mixed = []
Return values
$this

setDisableAddToCart()

public setDisableAddToCart(bool $value) : $this
Parameters
$value : bool
Return values
$this

setDownloadableData()

public setDownloadableData(array<string|int, mixed> $value) : $this
Parameters
$value : array<string|int, mixed>
Return values
$this

setExcludeUrlRewrite()

public setExcludeUrlRewrite(bool $value) : $this
Parameters
$value : bool
Return values
$this

setExistsStoreValueFlag()

Set attribute code flag if attribute has value in current store and does not use value of default store as value

public setExistsStoreValueFlag(string $attributeCode) : $this
Parameters
$attributeCode : string
Return values
$this

setFinalPrice()

Sets final price of product

public setFinalPrice(float|null $price) : $this

This func is equal to magic 'setFinalPrice()', but added as a separate func, because in cart with bundle products it's called very often in Item->getProduct(). So removing chain of magic with more cpu consuming algorithms gives nice optimization boost.

Parameters
$price : float|null

Price amount

Return values
$this

setGroupedLinkData()

public setGroupedLinkData(array<string|int, mixed> $value) : $this
Parameters
$value : array<string|int, mixed>
Return values
$this

setHasError()

public setHasError(bool $value) : $this
Parameters
$value : bool
Return values
$this

setHasOptions()

public setHasOptions(bool $value) : $this
Parameters
$value : bool
Return values
$this

setId()

Declare model object identifier value

public setId(mixed $id) : $this
Parameters
$id : mixed
Attributes
#[Override]
Return values
$this

setIdFieldName()

set name of object id field

public setIdFieldName(string $name) : $this
Parameters
$name : string
Return values
$this

setIsChangedCategories()

public setIsChangedCategories(bool $value) : $this
Parameters
$value : bool
Return values
$this

setIsChangedWebsites()

public setIsChangedWebsites(bool $value) : $this
Parameters
$value : bool
Return values
$this

setIsCustomOptionChanged()

public setIsCustomOptionChanged(bool $value) : $this
Parameters
$value : bool
Return values
$this

setIsDeleteable()

Set is deletable flag

public setIsDeleteable(bool $value) : $this
Parameters
$value : bool
Return values
$this

setIsDuplicable()

Set is duplicable flag

public setIsDuplicable(bool $value) : $this
Parameters
$value : bool
Return values
$this

setIsDuplicate()

public setIsDuplicate(bool $value) : $this
Parameters
$value : bool
Return values
$this

setIsInStock()

public setIsInStock(bool $value) : $this
Parameters
$value : bool
Return values
$this

setIsMassupdate()

public setIsMassupdate(bool $value) : $this
Parameters
$value : bool
Return values
$this

setIsQtyDecimal()

public setIsQtyDecimal(int $value) : $this
Parameters
$value : int
Return values
$this

setIsReadonly()

Set is deletable flag

public setIsReadonly(bool $value) : $this
Parameters
$value : bool
Return values
$this

setIsRelationsChanged()

public setIsRelationsChanged(bool $value) : $this
Parameters
$value : bool
Return values
$this

setIsSalable()

public setIsSalable(bool $value) : $this
Parameters
$value : bool
Return values
$this

setIsSuperMode()

public setIsSuperMode(bool $value) : $this
Parameters
$value : bool
Return values
$this

setLinksExist()

public setLinksExist(bool $value) : $this
Parameters
$value : bool
Return values
$this

setLinksPurchasedSeparately()

public setLinksPurchasedSeparately(bool $value) : $this
Parameters
$value : bool
Return values
$this

setMediaAttributes()

public setMediaAttributes(array<string|int, mixed> $value) : $this
Parameters
$value : array<string|int, mixed>
Return values
$this

setMediaGallery()

public setMediaGallery(array<string|int, mixed> $value) : $this
Parameters
$value : array<string|int, mixed>
Return values
$this

setNeedStoreForReindex()

public setNeedStoreForReindex(bool $value) : $this
Parameters
$value : bool
Return values
$this

setOptionsValidationFail()

public setOptionsValidationFail(bool $value) : $this
Parameters
$value : bool
Return values
$this

setOrigData()

Set original loaded data if needed

public setOrigData([string $key = null ][, mixed $data = null ]) : DataObject
Parameters
$key : string = null
$data : mixed = null
Attributes
#[Override]
Return values
DataObject

setOriginalId()

public setOriginalId(int $value) : $this
Parameters
$value : int
Return values
$this

setParentId()

public setParentId(bool $value) : $this
Parameters
$value : bool
Return values
$this

setParentProductIds()

public setParentProductIds(array<string|int, mixed> $value) : $this
Parameters
$value : array<string|int, mixed>
Return values
$this

setPrice()

public setPrice(float $value) : $this
Parameters
$value : float
Return values
$this

setPriceCalculation()

Set Price calculation flag

public setPriceCalculation([bool $calculate = true ]) : $this
Parameters
$calculate : bool = true
Return values
$this

setProductOptions()

public setProductOptions(array<string|int, mixed> $value) : $this
Parameters
$value : array<string|int, mixed>
Return values
$this

setProductUrl()

public setProductUrl(string $value) : $this
Parameters
$value : string
Return values
$this

setQty()

public setQty(float $value) : $this
Parameters
$value : float
Return values
$this

setQuoteItemPrice()

public setQuoteItemPrice(float $value) : $this
Parameters
$value : float
Return values
$this

setQuoteItemQty()

public setQuoteItemQty(int $value) : $this
Parameters
$value : int
Return values
$this

setQuoteItemRowTotal()

public setQuoteItemRowTotal(float $value) : $this
Parameters
$value : float
Return values
$this

setQuoteQty()

public setQuoteQty(float $value) : $this
Parameters
$value : float
Return values
$this

setRealPriceHtml()

public setRealPriceHtml(string $value) : $this
Parameters
$value : string
Return values
$this

setRelatedLinkData()

public setRelatedLinkData(array<string|int, mixed> $value) : $this
Parameters
$value : array<string|int, mixed>
Return values
$this

setRelatedProductIds()

public setRelatedProductIds(array<string|int, mixed> $value) : $this
Parameters
$value : array<string|int, mixed>
Return values
$this

setRelatedProducts()

public setRelatedProducts(array<string|int, mixed> $value) : $this
Parameters
$value : array<string|int, mixed>
Return values
$this

setRequiredOptions()

public setRequiredOptions(bool $value) : $this
Parameters
$value : bool
Return values
$this

setShortDescription()

public setShortDescription(string $value) : $this
Parameters
$value : string
Return values
$this

setSkipCheckRequiredOption()

public setSkipCheckRequiredOption(bool $value) : $this
Parameters
$value : bool
Return values
$this

setSku()

public setSku(string $value) : $this
Parameters
$value : string
Return values
$this

setStatus()

public setStatus(int $store) : $this
Parameters
$store : int
Return values
$this

setStockData()

public setStockData(array<string|int, mixed> $value) : $this
Parameters
$value : array<string|int, mixed>
Return values
$this

setStore()

public setStore(int $store) : $this
Parameters
$store : int
Return values
$this

setStoreId()

public setStoreId(int $store) : $this
Parameters
$store : int
Return values
$this

setStoreIds()

public setStoreIds(array<string|int, mixed> $storeIds) : $this
Parameters
$storeIds : array<string|int, mixed>
Return values
$this

setTaxPercent()

public setTaxPercent(float|null $value) : $this
Parameters
$value : float|null
Return values
$this

setTypeHasOptions()

public setTypeHasOptions(bool $value) : $this
Parameters
$value : bool
Return values
$this

setTypeHasRequiredOptions()

public setTypeHasRequiredOptions(bool $value) : $this
Parameters
$value : bool
Return values
$this

setTypeId()

public setTypeId(string $value) : $this
Parameters
$value : string
Return values
$this

setUpdatedAt()

public setUpdatedAt(string $currentTime) : $this
Parameters
$currentTime : string
Return values
$this

setUpSellLinkData()

public setUpSellLinkData(array<string|int, mixed> $value) : $this
Parameters
$value : array<string|int, mixed>
Return values
$this

setUpSellProductIds()

public setUpSellProductIds(array<string|int, mixed> $value) : $this
Parameters
$value : array<string|int, mixed>
Return values
$this

setUpSellProducts()

public setUpSellProducts(array<string|int, mixed> $value) : $this
Parameters
$value : array<string|int, mixed>
Return values
$this

setUrlKey()

public setUrlKey(string $value) : $this
Parameters
$value : string
Return values
$this

setUrlPath()

public setUrlPath(string $value) : $this
Parameters
$value : string
Return values
$this

setVisibility()

public setVisibility(int $value) : $this
Parameters
$value : int
Return values
$this

setWebsiteId()

public setWebsiteId(int $getWebsiteId) : $this
Parameters
$getWebsiteId : int
Return values
$this

setWebsiteIds()

public setWebsiteIds(array<string|int, mixed> $value) : $this
Parameters
$value : array<string|int, mixed>
Return values
$this

setWishlistStoreId()

public setWishlistStoreId(int $value) : $this
Parameters
$value : int
Return values
$this

toArray()

Renders the object to array

public toArray([array<string|int, mixed> $arrAttributes = [] ]) : array<string|int, mixed>
Parameters
$arrAttributes : array<string|int, mixed> = []

Attribute array

Attributes
#[Override]
Return values
array<string|int, mixed>

toJson()

Public wrapper for __toJson

public toJson([array<string|int, mixed> $arrAttributes = [] ]) : string
Parameters
$arrAttributes : array<string|int, mixed> = []
Return values
string

toString()

Public wrapper for __toString

public toString([string $format = '' ]) : string

Will use $format as an template and substitute {{key}} for attributes

Parameters
$format : string = ''
Return values
string

toXml()

Public wrapper for __toXml

public toXml([array<string|int, mixed> $arrAttributes = [] ][, string $rootName = 'item' ][, bool $addOpenTag = false ][, bool $addCdata = true ]) : string
Parameters
$arrAttributes : array<string|int, mixed> = []
$rootName : string = 'item'
$addOpenTag : bool = false
$addCdata : bool = true
Return values
string

unlockAttribute()

Unlock attribute

public unlockAttribute(string $attributeCode) : $this
Parameters
$attributeCode : string
Return values
$this

unlockAttributes()

Unlock all attributes

public unlockAttributes() : $this
Return values
$this

unsetData()

Unset data from the object.

public unsetData([mixed $key = null ]) : $this

$key can be a string only. Array will be ignored.

$isChanged will specify if the object needs to be saved after an update.

Parameters
$key : mixed = null
Attributes
#[Override]
Return values
$this

unsetOldData()

Unset old fields data from the object.

public unsetOldData([string $key = null ]) : $this

$key can be a string only. Array will be ignored.

Parameters
$key : string = null
Return values
$this

unsRecurringProfile()

public unsRecurringProfile() : $this
Return values
$this

unsSkipCheckRequiredOption()

public unsSkipCheckRequiredOption() : $this
Return values
$this

validate()

Validate Product Data

public validate() : $this
Tags
todo

implement full validation process with errors returning which are ignoring now

Return values
$this

__toJson()

Convert object attributes to JSON

protected __toJson([array<string|int, mixed> $arrAttributes = [] ]) : string
Parameters
$arrAttributes : array<string|int, mixed> = []

array of required attributes

Return values
string

__toXml()

Convert object attributes to XML

protected __toXml([array<string|int, mixed> $arrAttributes = [] ][, string $rootName = 'item' ][, bool $addOpenTag = false ][, bool $addCdata = true ]) : string
Parameters
$arrAttributes : array<string|int, mixed> = []

array of required attributes

$rootName : string = 'item'

name of the root element

$addOpenTag : bool = false
$addCdata : bool = true
Return values
string

_addFullNames()

protected _addFullNames() : mixed

_afterDelete()

Processing object after delete data

protected _afterDelete() : $this
Return values
$this

_afterDeleteCommit()

Init indexing process after product delete commit

protected _afterDeleteCommit() : $this
Attributes
#[Override]
Return values
$this

_afterLoad()

Load product options if they exists

protected _afterLoad() : $this
Attributes
#[Override]
Return values
$this

_afterSave()

Saving product type related data and init index

protected _afterSave() : $this
Attributes
#[Override]
Return values
$this

_beforeDelete()

Clear cache related with product and protect delete from not admin Register indexing event before delete product

protected _beforeDelete() : $this
Attributes
#[Override]
Return values
$this

_beforeLoad()

Processing object before load data

protected _beforeLoad(int $id[, string|null $field = null ]) : $this
Parameters
$id : int
$field : string|null = null
Return values
$this

_beforeSave()

Check product options and type options and save them, too

protected _beforeSave() : $this
Tags
throws
Mage_Core_Exception
Attributes
#[Override]
Return values
$this

_camelize()

protected _camelize(string $name) : string
Parameters
$name : string
Return values
string

_clearData()

Clearing product's data

protected _clearData() : $this
Attributes
#[Override]
Return values
$this

_clearOptionReferences()

Clearing references to product from product's options

protected _clearOptionReferences() : $this
Return values
$this

_clearReferences()

Clearing references on product

protected _clearReferences() : $this
Attributes
#[Override]
Return values
$this

_construct()

Initialize resources

protected _construct() : void
Attributes
#[Override]

_getData()

Get value from _data array without parse key

protected _getData(string $key) : mixed
Parameters
$key : string

_getEventData()

Get array of objects transferred to default events processing

protected _getEventData() : array<string|int, mixed>
Return values
array<string|int, mixed>

_hasModelChanged()

Check whether model has changed data.

protected _hasModelChanged() : bool

Can be overloaded in child classes to perform advanced check whether model needs to be saved e.g. using resourceModel->hasDataChanged() or any other technique

Return values
bool

_init()

Standard model initialization

protected _init(string $resourceModel) : mixed
Parameters
$resourceModel : string

_initOldFieldsMap()

Init mapping array of short fields to its full names

protected _initOldFieldsMap() : DataObject
Attributes
#[Override]
Return values
DataObject

_prepareArray()

Set required array elements

protected _prepareArray(array<string|int, mixed> &$arr[, array<string|int, mixed> $elements = [] ]) : array<string|int, mixed>
Parameters
$arr : array<string|int, mixed>
$elements : array<string|int, mixed> = []
Return values
array<string|int, mixed>

_prepareSyncFieldsMap()

Called after old fields are inited. Forms synchronization map to sync old fields and new fields between each other.

protected _prepareSyncFieldsMap() : $this
Return values
$this

_protectFromNonAdmin()

Safeguard func that will check, if we are in admin area

protected _protectFromNonAdmin() : mixed
Tags
throws
Mage_Core_Exception

_setResourceModel()

Set resource names

protected _setResourceModel(string $resourceName[, string|null $resourceCollectionName = null ]) : mixed

If collection name is omitted, resource name will be used with _collection appended

Parameters
$resourceName : string
$resourceCollectionName : string|null = null

_underscore()

Converts field names for setters and getters

protected _underscore(string $name) : string

$this->setMyField($value) === $this->setData('my_field', $value) Uses cache to eliminate unnecessary preg_replace

Parameters
$name : string
Return values
string
On this page

Search results