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
$_linkInstance
Product link instance
protected
Mage_Catalog_Model_Product_Link|null
$_linkInstance
$_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
$_resource
Resource model instance
protected
Mage_Core_Model_Resource_Db_Abstract
$_resource
$_resourceCollectionName
Name of the resource collection model
protected
string
$_resourceCollectionName
$_resourceName
Name of the resource model
protected
string
$_resourceName
$_reviewSummary
protected
array<string|int, Mage_Review_Model_Review_Summary>
$_reviewSummary
= []
$_stockItem
protected
Mage_CatalogInventory_Model_Stock_Item|null
$_stockItem
$_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
= []
$_typeInstance
Product type instance
protected
Mage_Catalog_Model_Product_Type_Abstract|null|false
$_typeInstance
= \null
$_typeInstanceSingleton
Product type instance as singleton
protected
mixed
$_typeInstanceSingleton
= \null
$_underscoreCache
Setter/Getter underscore transformation cache
protected
static array<string|int, mixed>
$_underscoreCache
= []
$_url
protected
static mixed
$_url
$_urlModel
Product Url Instance
protected
Mage_Catalog_Model_Product_Url|null
$_urlModel
= \null
$_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>_getResource()
Get resource instance
public
_getResource() : Mage_Catalog_Model_Resource_Product
Return values
Mage_Catalog_Model_Resource_ProductaddAttributeUpdate()
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
$thisaddData()
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
$thisaddImageToMediaGallery()
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
$thisaddOption()
Add option to array of product options
public
addOption(Mage_Catalog_Model_Product_Option $option) : $this
Parameters
- $option : Mage_Catalog_Model_Product_Option
Return values
$thisafterCommitCallback()
Callback function which called after transaction commit in resource model
public
afterCommitCallback() : $this
Attributes
- #[Override]
Return values
$thisafterLoad()
Object after load processing. Implemented as public interface for supporting objects after load in collections
public
afterLoad() : $this
Return values
$thiscanAffectOptions()
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
boolcanBeShowInCategory()
Check availability display product in category
public
canBeShowInCategory(int $categoryId) : string
Parameters
- $categoryId : int
Return values
stringcanConfigure()
Check if product can be configured
public
canConfigure() : bool
Return values
boolcleanCache()
Clear cache related with product id
public
cleanCache() : $this
Return values
$thiscleanModelCache()
Remove model object related cache
public
cleanModelCache() : Mage_Core_Model_Abstract
Attributes
- #[Override]
Return values
Mage_Core_Model_AbstractclearInstance()
Clearing object for correct deleting by garbage collector
public
final clearInstance() : $this
Return values
$thisdataHasChangedFor()
Compare object data with original data
public
dataHasChangedFor(string $field) : bool
Parameters
- $field : string
Return values
booldebug()
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
$thisduplicate()
Create duplicate
public
duplicate([bool $duplicateImages = true ]) : Mage_Catalog_Model_Product
Parameters
- $duplicateImages : bool = true
Return values
Mage_Catalog_Model_ProductflagDirty()
public
flagDirty(string $field[, bool $flag = true ]) : $this
Parameters
- $field : string
- $flag : bool = true
Return values
$thisformatUrlKey()
Formats URL key
public
formatUrlKey(string $str[, null|string $locale = null ]) : string
Parameters
- $str : string
- $locale : null|string = null
Return values
stringfromArray()
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
$thisgetAllowedInRss()
public
getAllowedInRss() : bool
Return values
boolgetAllowedPriceInRss()
public
getAllowedPriceInRss() : bool
Return values
boolgetAppliedRates()
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>|falsegetAttributes()
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
boolgetAttributeSetId()
public
getAttributeSetId() : int
Return values
intgetAttributeText()
Get attribute text by its code
public
getAttributeText(string $attributeCode) : string
Parameters
- $attributeCode : string
-
of the attribute
Return values
stringgetAvailableInCategories()
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
floatgetBillingAddress()
public
getBillingAddress() : Mage_Customer_Model_Address_Abstract
Return values
Mage_Customer_Model_Address_AbstractgetBundleOptionsData()
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>|falsegetCacheIdTagsWithCategories()
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>|falsegetCalculatedFinalPrice()
Returns calculated final price
public
getCalculatedFinalPrice() : float|null
Return values
float|nullgetCanSaveBundleSelections()
public
getCanSaveBundleSelections() : bool
Return values
boolgetCanSaveConfigurableAttributes()
public
getCanSaveConfigurableAttributes() : bool
Return values
boolgetCanSaveCustomOptions()
public
getCanSaveCustomOptions() : bool
Return values
boolgetCanShowPrice()
public
getCanShowPrice() : bool
Return values
boolgetCategoriesReadonly()
public
getCategoriesReadonly() : bool
Return values
boolgetCategory()
Retrieve product category
public
getCategory() : Mage_Catalog_Model_Category
Return values
Mage_Catalog_Model_CategorygetCategoryCollection()
Retrieve product categories
public
getCategoryCollection() : Mage_Catalog_Model_Resource_Category_Collection
Return values
Mage_Catalog_Model_Resource_Category_CollectiongetCategoryId()
Retrieve product category id
public
getCategoryId() : int|false
Return values
int|falsegetCategoryIds()
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>getChildrenProducts()
public
getChildrenProducts() : array<string|int, Mage_Catalog_Model_Product>
Return values
array<string|int, Mage_Catalog_Model_Product>getCollection()
public
getCollection() : Mage_Catalog_Model_Resource_Product_Collection
Return values
Mage_Catalog_Model_Resource_Product_CollectiongetCompositeReadonly()
public
getCompositeReadonly() : bool
Return values
boolgetConfigurableAttributesData()
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
floatgetConfigurableProductsData()
public
getConfigurableProductsData() : array<string|int, mixed>
Return values
array<string|int, mixed>getConfigureMode()
public
getConfigureMode() : bool
Return values
boolgetCost()
public
getCost() : float
Return values
floatgetCreatedAt()
public
getCreatedAt() : string
Return values
stringgetCrossSellLinkCollection()
Retrieve collection cross sell link
public
getCrossSellLinkCollection() : Mage_Catalog_Model_Resource_Product_Link_Collection
Return values
Mage_Catalog_Model_Resource_Product_Link_CollectiongetCrossSellLinkData()
public
getCrossSellLinkData() : array<string|int, mixed>
Return values
array<string|int, mixed>getCrossSellProductCollection()
Retrieve collection cross sell product
public
getCrossSellProductCollection() : Mage_Catalog_Model_Resource_Product_Link_Product_Collection
Return values
Mage_Catalog_Model_Resource_Product_Link_Product_CollectiongetCrossSellProductIds()
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
intgetCustomLayoutUpdate()
public
getCustomLayoutUpdate() : string
Return values
stringgetCustomOption()
Get product custom option info
public
getCustomOption(string $code) : Mage_Sales_Model_Quote_Item_Option|null
Parameters
- $code : string
Return values
Mage_Sales_Model_Quote_Item_Option|nullgetCustomOptions()
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
intgetDescription()
public
getDescription() : string
Return values
stringgetDisableAddToCart()
public
getDisableAddToCart() : bool
Return values
boolgetDownloadableData()
public
getDownloadableData() : array<string|int, mixed>
Return values
array<string|int, mixed>getDownloadableLinks()
public
getDownloadableLinks() : array<string|int, Mage_Downloadable_Model_Link>
Return values
array<string|int, Mage_Downloadable_Model_Link>getDownloadableReadonly()
public
getDownloadableReadonly() : bool
Return values
boolgetDownloadableSamples()
public
getDownloadableSamples() : Mage_Downloadable_Model_Resource_Sample_Collection
Return values
Mage_Downloadable_Model_Resource_Sample_CollectiongetEntityId()
public
getEntityId() : int
Return values
intgetEntityTypeId()
public
getEntityTypeId() : int
Return values
intgetEvent()
Checks event attribute for initialization as an event object
public
getEvent() : bool
Return values
boolgetExistsStoreValueFlag()
Check if object attribute has value in current store
public
getExistsStoreValueFlag(string $attributeCode) : bool
Parameters
- $attributeCode : string
Return values
boolgetFinalPrice()
Get product final price
public
getFinalPrice([float $qty = null ]) : float
Parameters
- $qty : float = null
Return values
floatgetForceReindexRequired()
public
getForceReindexRequired() : bool
Return values
boolgetFormatedPrice()
Get formatted by currency product price
public
getFormatedPrice() : array<string|int, mixed>|float
Return values
array<string|int, mixed>|floatgetFormatedTierPrice()
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>|floatgetGiftMessageAvailable()
Custom function for other modules
public
getGiftMessageAvailable() : int
Return values
intgetGroupedLinkCollection()
Retrieve collection grouped link
public
getGroupedLinkCollection() : Mage_Catalog_Model_Resource_Product_Link_Collection
Return values
Mage_Catalog_Model_Resource_Product_Link_CollectiongetGroupedLinkData()
public
getGroupedLinkData() : array<string|int, mixed>
Return values
array<string|int, mixed>getGroupPrice()
Get product group price
public
getGroupPrice() : float
Return values
floatgetHasError()
public
getHasError() : null|bool
Return values
null|boolgetHasOptions()
public
getHasOptions() : bool
Return values
boolgetId()
Retrieve model object identifier
public
getId() : int|string|null
Attributes
- #[Override]
Return values
int|string|nullgetIdBySku()
Retrieve product id by sku
public
getIdBySku(string $sku) : string
Parameters
- $sku : string
Return values
stringgetIdFieldName()
Retrieve identifier field name for model
public
getIdFieldName() : string
Attributes
- #[Override]
Return values
stringgetImage()
public
getImage() : string
Return values
stringgetInventoryReadonly()
public
getInventoryReadonly() : bool
Return values
boolgetIsChangedCategories()
public
getIsChangedCategories() : bool
Return values
boolgetIsChangedWebsites()
public
getIsChangedWebsites() : bool
Return values
boolgetIsCustomOptionChanged()
public
getIsCustomOptionChanged() : bool
Return values
boolgetIsDefault()
public
getIsDefault() : bool
Return values
boolgetIsDuplicate()
public
getIsDuplicate() : bool
Return values
boolgetIsMassupdate()
public
getIsMassupdate() : bool
Return values
boolgetIsRecurring()
public
getIsRecurring() : bool
Return values
boolgetIsRelationsChanged()
public
getIsRelationsChanged() : bool
Return values
boolgetIsSalable()
Is product salable detecting by product type
public
getIsSalable() : bool
Return values
boolgetIsVirtual()
Retrieve is a virtual product
public
getIsVirtual() : bool
Return values
boolgetLinkInstance()
Retrieve link instance
public
getLinkInstance() : Mage_Catalog_Model_Product_Link
Return values
Mage_Catalog_Model_Product_LinkgetLinksPurchasedSeparately()
public
getLinksPurchasedSeparately() : bool
Return values
boolgetLinksTitle()
public
getLinksTitle() : string
Return values
stringgetListSwatchAttrValues()
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>getMediaAttributes()
Retrieve attributes for media gallery
public
getMediaAttributes() : array<string|int, Mage_Catalog_Model_Resource_Eav_Attribute>
Return values
array<string|int, Mage_Catalog_Model_Resource_Eav_Attribute>getMediaConfig()
Retrieve product media config
public
getMediaConfig() : Mage_Catalog_Model_Product_Media_Config
Return values
Mage_Catalog_Model_Product_Media_ConfiggetMediaGallery()
public
getMediaGallery() : array<string|int, mixed>
Return values
array<string|int, mixed>getMediaGalleryImages()
Retrieve media gallery images
public
getMediaGalleryImages() : Collection
Return values
CollectiongetMessage()
public
getMessage() : string
Return values
stringgetMetaDescription()
public
getMetaDescription() : string
Return values
stringgetMetaKeyword()
public
getMetaKeyword() : string
Return values
stringgetMetaTitle()
public
getMetaTitle() : string
Return values
stringgetMinimalPrice()
Returns minimal price
public
getMinimalPrice() : float
Return values
floatgetMsrpDisplayActualPriceType()
public
getMsrpDisplayActualPriceType() : string
Return values
stringgetMsrpEnabled()
public
getMsrpEnabled() : bool
Return values
boolgetName()
Get product name
public
getName() : string|null
Return values
string|nullgetOption()
public
getOption() : Mage_Bundle_Model_Option
Return values
Mage_Bundle_Model_OptiongetOptionById()
Get option from options array of product by given option id
public
getOptionById(string $optionId) : Mage_Catalog_Model_Product_Option|null
Parameters
- $optionId : string
Return values
Mage_Catalog_Model_Product_Option|nullgetOptionId()
public
getOptionId() : int
Return values
intgetOptionInstance()
Retrieve option instance
public
getOptionInstance() : Mage_Catalog_Model_Product_Option
Return values
Mage_Catalog_Model_Product_OptiongetOptions()
Get all options of product
public
getOptions() : array<string|int, Mage_Catalog_Model_Product_Option>
Return values
array<string|int, Mage_Catalog_Model_Product_Option>getOptionsReadonly()
public
getOptionsReadonly() : bool
Return values
boolgetOrigData()
Get object loaded data (original data)
public
getOrigData([string $key = null ]) : mixed
Parameters
- $key : string = null
getOriginalId()
public
getOriginalId() : int
Return values
intgetPageLayout()
public
getPageLayout() : string
Return values
stringgetParentId()
public
getParentId() : bool
Return values
boolgetParentProductId()
public
getParentProductId() : int
Return values
intgetParentProductIds()
public
getParentProductIds() : array<string|int, mixed>
Return values
array<string|int, mixed>getPopularity()
public
getPopularity() : int
Return values
intgetPosition()
public
getPosition() : string
Return values
stringgetPreconfiguredValues()
Get preconfigured values from product
public
getPreconfiguredValues() : DataObject
Return values
DataObjectgetPrice()
Get product price through type instance
public
getPrice() : float
Return values
floatgetPriceModel()
Get product price model
public
getPriceModel() : Mage_Bundle_Model_Product_Price
Return values
Mage_Bundle_Model_Product_PricegetPriceType()
public
getPriceType() : int
Return values
intgetProductEntitiesInfo()
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
intgetProductOptions()
public
getProductOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>getProductOptionsCollection()
Retrieve options collection of product
public
getProductOptionsCollection() : Mage_Catalog_Model_Resource_Product_Option_Collection
Return values
Mage_Catalog_Model_Resource_Product_Option_CollectiongetProductUrl()
Retrieve Product URL
public
getProductUrl([bool $useSid = null ]) : string
Parameters
- $useSid : bool = null
Return values
stringgetQty()
public
getQty() : float
Return values
floatgetRatingSummary()
Returns rating summary
public
getRatingSummary() : mixed
getRealPriceHtml()
public
getRealPriceHtml() : string
Return values
stringgetRecurringProfile()
public
getRecurringProfile() : array<string|int, mixed>
Return values
array<string|int, mixed>getRelatedLinkCollection()
Retrieve collection related link
public
getRelatedLinkCollection() : Mage_Catalog_Model_Resource_Product_Link_Collection
Return values
Mage_Catalog_Model_Resource_Product_Link_CollectiongetRelatedLinkData()
public
getRelatedLinkData() : array<string|int, mixed>
Return values
array<string|int, mixed>getRelatedProductCollection()
Retrieve collection related product
public
getRelatedProductCollection() : Mage_Catalog_Model_Resource_Product_Link_Product_Collection
Return values
Mage_Catalog_Model_Resource_Product_Link_Product_CollectiongetRelatedProductIds()
Retrieve related products identifiers
public
getRelatedProductIds() : array<string|int, mixed>
Return values
array<string|int, mixed>getRelatedProducts()
Retrieve array of related roducts
public
getRelatedProducts() : array<string|int, Mage_Catalog_Model_Product>
Return values
array<string|int, Mage_Catalog_Model_Product>getRelatedReadonly()
public
getRelatedReadonly() : bool
Return values
boolgetRequestPath()
Returns request path
public
getRequestPath() : string
Return values
stringgetRequiredOptions()
public
getRequiredOptions() : bool
Return values
boolgetReservedAttributes()
Returns system reserved attribute codes
public
getReservedAttributes() : mixed
@return array Reserved attribute names
getResource()
Retrieve model resource
public
getResource() : Mage_Catalog_Model_Resource_Product
Return values
Mage_Catalog_Model_Resource_ProductgetResourceCollection()
Get collection instance
public
getResourceCollection() : Mage_Catalog_Model_Resource_Product_Collection
Attributes
- #[Override]
Return values
Mage_Catalog_Model_Resource_Product_CollectiongetResourceName()
Retrieve model resource name
public
getResourceName() : string
Return values
stringgetReviewId()
public
getReviewId() : string
Return values
stringgetReviewSummary()
public
getReviewSummary([int $storeId = null ]) : Mage_Review_Model_Review_Summary
Parameters
- $storeId : int = null
Return values
Mage_Review_Model_Review_SummarygetSamplesTitle()
public
getSamplesTitle() : string
Return values
stringgetSelectionCanChangeQty()
public
getSelectionCanChangeQty() : bool
Return values
boolgetSelectionId()
public
getSelectionId() : string
Return values
stringgetSelectionPriceType()
public
getSelectionPriceType() : string
Return values
stringgetSelectionPriceValue()
public
getSelectionPriceValue() : float
Return values
floatgetSelectionQty()
public
getSelectionQty() : float
Return values
floatgetShipmentType()
public
getShipmentType() : string
Return values
stringgetShippingAddress()
public
getShippingAddress() : Mage_Customer_Model_Address_Abstract
Return values
Mage_Customer_Model_Address_AbstractgetShortDescription()
public
getShortDescription() : string
Return values
stringgetSkipCheckRequiredOption()
public
getSkipCheckRequiredOption() : bool
Return values
boolgetSku()
Retrieve sku through type instance
public
getSku() : string
Return values
stringgetSmallImage()
public
getSmallImage() : string
Return values
stringgetSpecialFromDate()
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|nullgetSpecialToDate()
Returns end date of the special price
public
getSpecialToDate() : mixed
getStatus()
Get product status
public
getStatus() : int
Return values
intgetStickWithinParent()
public
getStickWithinParent() : bool
Return values
boolgetStockData()
public
getStockData() : array<string|int, mixed>
Return values
array<string|int, mixed>getStockItem()
public
getStockItem() : Mage_CatalogInventory_Model_Stock_Item
Return values
Mage_CatalogInventory_Model_Stock_ItemgetStore()
Retrieve sore object
public
getStore() : Mage_Core_Model_Store
Return values
Mage_Core_Model_StoregetStoreId()
Retrieve Store Id
public
getStoreId() : int
Return values
intgetStoreIds()
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
intgetTaxPercent()
public
getTaxPercent() : float|null
Return values
float|nullgetThumbnail()
public
getThumbnail() : string
Return values
stringgetTierPrice()
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
intgetTypeHasOptions()
public
getTypeHasOptions() : bool
Return values
boolgetTypeHasRequiredOptions()
public
getTypeHasRequiredOptions() : bool
Return values
boolgetTypeId()
Get product type identifier
public
getTypeId() : string|null
Return values
string|nullgetTypeInstance()
Retrieve type instance
public
getTypeInstance([bool $singleton = false ]) : Mage_Catalog_Model_Product_Type_Abstract
Type instance implement type depended logic
Parameters
- $singleton : bool = false
Return values
Mage_Catalog_Model_Product_Type_AbstractgetUpSellLinkCollection()
Retrieve collection up sell link
public
getUpSellLinkCollection() : Mage_Catalog_Model_Resource_Product_Link_Collection
Return values
Mage_Catalog_Model_Resource_Product_Link_CollectiongetUpSellLinkData()
public
getUpSellLinkData() : array<string|int, mixed>
Return values
array<string|int, mixed>getUpSellProductCollection()
Retrieve collection up sell product
public
getUpSellProductCollection() : Mage_Catalog_Model_Resource_Product_Link_Product_Collection
Return values
Mage_Catalog_Model_Resource_Product_Link_Product_CollectiongetUpSellProductIds()
Retrieve up sell products identifiers
public
getUpSellProductIds() : array<string|int, mixed>
Return values
array<string|int, mixed>getUpSellProducts()
Retrieve array of up sell products
public
getUpSellProducts() : array<string|int, Mage_Catalog_Model_Product>
Return values
array<string|int, Mage_Catalog_Model_Product>getUpsellReadonly()
public
getUpsellReadonly() : bool
Return values
boolgetUrlDataObject()
public
getUrlDataObject() : DataObject
Return values
DataObjectgetUrlInStore()
Retrieve URL in current store
public
getUrlInStore([array<string|int, mixed> $params = [] ]) : string
Parameters
- $params : array<string|int, mixed> = []
-
the route params
Return values
stringgetUrlKey()
public
getUrlKey() : string
Return values
stringgetUrlModel()
Get product url model
public
getUrlModel() : Mage_Catalog_Model_Product_Url
Return values
Mage_Catalog_Model_Product_UrlgetUrlPath()
Retrieve Product Url Path (include category)
public
getUrlPath([Mage_Catalog_Model_Category $category = null ]) : string
Parameters
- $category : Mage_Catalog_Model_Category = null
Return values
stringgetVisibility()
public
getVisibility() : int
Return values
intgetVisibleInCatalogStatuses()
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
boolgetWebsiteStoreIds()
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
floatgetWeightType()
public
getWeightType() : string
Return values
stringgetWishlistItemId()
public
getWishlistItemId() : int
Return values
intgetWishlistStoreId()
public
getWishlistStoreId() : int
Return values
inthasCategoryIds()
public
hasCategoryIds() : bool
Return values
boolhasChildrenProducts()
public
hasChildrenProducts() : bool
Return values
boolhasConfigurableImagesFallbackArray()
public
hasConfigurableImagesFallbackArray() : bool
Return values
boolhasCrossSellProductIds()
public
hasCrossSellProductIds() : bool
Return values
boolhasCrossSellProducts()
public
hasCrossSellProducts() : bool
Return values
boolhasCustomerGroupId()
public
hasCustomerGroupId() : bool
Return values
boolhasCustomOptions()
Checks if there custom option for this product
public
hasCustomOptions() : bool
Return values
boolhasData()
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
boolhasDataChanges()
Get data change status
public
hasDataChanges() : bool
Return values
boolhasErrors()
public
hasErrors() : bool
Return values
boolhasIsRecurring()
public
hasIsRecurring() : bool
Return values
boolhasLockedAttributes()
Checks that model have locked attributes
public
hasLockedAttributes() : bool
Return values
boolhasMediaAttributes()
public
hasMediaAttributes() : bool
Return values
boolhasMsrpEnabled()
public
hasMsrpEnabled() : $this
Return values
$thishasOptionsValidationFail()
public
hasOptionsValidationFail() : bool
Return values
boolhasPreconfiguredValues()
public
hasPreconfiguredValues() : bool
Return values
boolhasRelatedProductIds()
public
hasRelatedProductIds() : bool
Return values
boolhasRelatedProducts()
public
hasRelatedProducts() : bool
Return values
boolhasStockItem()
public
hasStockItem() : bool
Return values
boolhasStoreIds()
public
hasStoreIds() : bool
Return values
boolhasUpSellProductIds()
public
hasUpSellProductIds() : bool
Return values
boolhasUpSellProducts()
public
hasUpSellProducts() : bool
Return values
boolhasUrlDataObject()
public
hasUrlDataObject() : bool
Return values
boolhasWebsiteIds()
public
hasWebsiteIds() : bool
Return values
boolhasWishlistStoreId()
public
hasWishlistStoreId() : bool
Return values
boolisAvailable()
Check whether the product type or stock allows to purchase the product
public
isAvailable() : bool
Return values
boolisComposite()
Check is product composite
public
isComposite() : bool
Return values
boolisConfigurable()
Check is product configurable
public
isConfigurable() : bool
Return values
boolisDeleteable()
Checks model is deletable
public
isDeleteable() : bool
Return values
boolisDeleted()
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
boolisDirty()
public
isDirty([string $field = null ]) : bool
Parameters
- $field : string = null
Return values
boolisDisabled()
Checks whether product has disabled status
public
isDisabled() : bool
Return values
boolisDuplicable()
Checks product can be duplicated
public
isDuplicable() : bool
Return values
boolisEmpty()
checks whether the object is empty
public
isEmpty() : bool
Return values
boolisGrouped()
Check is product grouped
public
isGrouped() : bool
Return values
boolisInStock()
Whether product available in stock
public
isInStock() : bool
Return values
boolisLockedAttribute()
Retrieve locked attributes
public
isLockedAttribute(string $attributeCode) : bool
Parameters
- $attributeCode : string
Return values
boolisModuleEnabled()
public
isModuleEnabled(string $moduleName[, string $helperAlias = 'core' ]) : bool
Parameters
- $moduleName : string
- $helperAlias : string = 'core'
Return values
boolisObjectNew()
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
boolisProductsHasSku()
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|nullisReadonly()
Checks model is deletable
public
isReadonly() : bool
Return values
boolisRecurring()
Whether the product is a recurring payment
public
isRecurring() : bool
Return values
boolisReservedAttribute()
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
boolisSalable()
Check is product available for sale
public
isSalable() : bool
Return values
boolisSaleable()
Alias for isSalable()
public
isSaleable() : bool
Return values
boolisSuper()
Whether product configurable or grouped
public
isSuper() : bool
Return values
boolisSuperConfig()
Alias for isConfigurable()
public
isSuperConfig() : bool
Return values
boolisSuperGroup()
Is product grouped
public
isSuperGroup() : bool
Return values
boolisVirtual()
Check is a virtual product Data helper wrapper
public
isVirtual() : bool
Return values
boolisVisibleInCatalog()
Check Product visilbe in catalog
public
isVisibleInCatalog() : bool
Return values
boolisVisibleInSiteVisibility()
Check Product visible in site
public
isVisibleInSiteVisibility() : bool
Return values
booljsonSerialize()
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
$thisloadByAttribute()
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|$thislockAttribute()
Lock attribute
public
lockAttribute(string $attributeCode) : $this
Parameters
- $attributeCode : string
Return values
$thisoffsetExists()
Implementation of ArrayAccess::offsetExists()
public
offsetExists(string $offset) : bool
Parameters
- $offset : string
Tags
Attributes
- #[Override]
Return values
booloffsetGet()
Implementation of ArrayAccess::offsetGet()
public
offsetGet(string $offset) : mixed
Parameters
- $offset : string
Tags
Attributes
- #[Override]
- #[ReturnTypeWillChange]
offsetSet()
Implementation of ArrayAccess::offsetSet()
public
offsetSet(string $offset, mixed $value) : void
Parameters
- $offset : string
- $value : mixed
Tags
Attributes
- #[Override]
offsetUnset()
Implementation of ArrayAccess::offsetUnset()
public
offsetUnset(string $offset) : void
Parameters
- $offset : string
Tags
Attributes
- #[Override]
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
$thisprocessBuyRequest()
Parse buyRequest into options values used by product
public
processBuyRequest(DataObject $buyRequest) : DataObject
Parameters
- $buyRequest : DataObject
Return values
DataObjectreset()
Reset all model data
public
reset() : $this
Return values
$thissave()
Save object data
public
save() : $this
Tags
Return values
$thisserialize()
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
stringsetAddToCartUrl()
public
setAddToCartUrl(string $value) : $this
Parameters
- $value : string
Return values
$thissetAffectedCategoryIds()
public
setAffectedCategoryIds(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetAllowedInRss()
public
setAllowedInRss(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetAllowedPriceInRss()
public
setAllowedPriceInRss(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetAppliedRates()
public
setAppliedRates(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetAttribute()
public
setAttribute(Mage_Eav_Model_Entity_Attribute_Abstract $value) : $this
Parameters
Return values
$thissetAttributeDefaultValue()
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
$thissetAttributeSetId()
public
setAttributeSetId(int $value) : $this
Parameters
- $value : int
Return values
$thissetBundleOptionsData()
public
setBundleOptionsData(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetBundleSelectionsData()
public
setBundleSelectionsData(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetCanSaveBundleSelections()
public
setCanSaveBundleSelections(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetCanSaveCustomOptions()
public
setCanSaveCustomOptions(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetCartQty()
public
setCartQty(float $value) : $this
Parameters
- $value : float
Return values
$thissetCategory()
public
setCategory(Mage_Catalog_Model_Category $value) : $this
Parameters
- $value : Mage_Catalog_Model_Category
Return values
$thissetCategoryIds()
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
$thissetChildrenProducts()
public
setChildrenProducts(array<string|int, Mage_Catalog_Model_Product> $value) : $this
Parameters
- $value : array<string|int, Mage_Catalog_Model_Product>
Return values
$thissetConfigurableImagesFallbackArray()
public
setConfigurableImagesFallbackArray(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetConfigurablePrice()
public
setConfigurablePrice(float $value) : $this
Parameters
- $value : float
Return values
$thissetConfigureMode()
public
setConfigureMode(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetCreatedAt()
public
setCreatedAt(string $currentTime) : $this
Parameters
- $currentTime : string
Return values
$thissetCrossSellLinkData()
public
setCrossSellLinkData(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetCrossSellProductIds()
public
setCrossSellProductIds(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetCrossSellProducts()
public
setCrossSellProducts(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetCustomerGroupId()
public
setCustomerGroupId(int $value) : $this
Parameters
- $value : int
Return values
$thissetCustomOptions()
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
$thissetDataChanges()
Clears data changes status
public
setDataChanges(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetDataUsingMethod()
Set object data with calling setter method
public
setDataUsingMethod(string $key[, mixed $args = [] ]) : $this
Parameters
- $key : string
- $args : mixed = []
Return values
$thissetDisableAddToCart()
public
setDisableAddToCart(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetDownloadableData()
public
setDownloadableData(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetDownloadableLinks()
public
setDownloadableLinks(array<string|int, Mage_Downloadable_Model_Link> $value) : $this
Parameters
- $value : array<string|int, Mage_Downloadable_Model_Link>
Return values
$thissetDownloadableSamples()
public
setDownloadableSamples(Mage_Downloadable_Model_Resource_Sample_Collection $value) : $this
Parameters
Return values
$thissetExcludeUrlRewrite()
public
setExcludeUrlRewrite(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetExistsStoreValueFlag()
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
$thissetFinalPrice()
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
$thissetGroupedLinkData()
public
setGroupedLinkData(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetHasError()
public
setHasError(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetHasOptions()
public
setHasOptions(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetId()
Declare model object identifier value
public
setId(mixed $id) : $this
Parameters
- $id : mixed
Attributes
- #[Override]
Return values
$thissetIdFieldName()
set name of object id field
public
setIdFieldName(string $name) : $this
Parameters
- $name : string
Return values
$thissetIsChangedCategories()
public
setIsChangedCategories(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetIsChangedWebsites()
public
setIsChangedWebsites(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetIsCustomOptionChanged()
public
setIsCustomOptionChanged(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetIsDeleteable()
Set is deletable flag
public
setIsDeleteable(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetIsDuplicable()
Set is duplicable flag
public
setIsDuplicable(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetIsDuplicate()
public
setIsDuplicate(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetIsInStock()
public
setIsInStock(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetIsMassupdate()
public
setIsMassupdate(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetIsQtyDecimal()
public
setIsQtyDecimal(int $value) : $this
Parameters
- $value : int
Return values
$thissetIsReadonly()
Set is deletable flag
public
setIsReadonly(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetIsRelationsChanged()
public
setIsRelationsChanged(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetIsSalable()
public
setIsSalable(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetIsSuperMode()
public
setIsSuperMode(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetLinksExist()
public
setLinksExist(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetLinksPurchasedSeparately()
public
setLinksPurchasedSeparately(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetMediaAttributes()
public
setMediaAttributes(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetMediaGallery()
public
setMediaGallery(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetNeedStoreForReindex()
public
setNeedStoreForReindex(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetOption()
public
setOption(Mage_Bundle_Model_Option $value) : $this
Parameters
- $value : Mage_Bundle_Model_Option
Return values
$thissetOptionsValidationFail()
public
setOptionsValidationFail(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetOrigData()
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
DataObjectsetOriginalId()
public
setOriginalId(int $value) : $this
Parameters
- $value : int
Return values
$thissetParentId()
public
setParentId(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetParentProductIds()
public
setParentProductIds(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetPrice()
public
setPrice(float $value) : $this
Parameters
- $value : float
Return values
$thissetPriceCalculation()
Set Price calculation flag
public
setPriceCalculation([bool $calculate = true ]) : $this
Parameters
- $calculate : bool = true
Return values
$thissetProductOptions()
public
setProductOptions(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetProductTags()
public
setProductTags(Mage_Tag_Model_Resource_Tag_Collection $value) : $this
Parameters
Return values
$thissetProductUrl()
public
setProductUrl(string $value) : $this
Parameters
- $value : string
Return values
$thissetQty()
public
setQty(float $value) : $this
Parameters
- $value : float
Return values
$thissetQuoteItemPrice()
public
setQuoteItemPrice(float $value) : $this
Parameters
- $value : float
Return values
$thissetQuoteItemQty()
public
setQuoteItemQty(int $value) : $this
Parameters
- $value : int
Return values
$thissetQuoteItemRowTotal()
public
setQuoteItemRowTotal(float $value) : $this
Parameters
- $value : float
Return values
$thissetQuoteQty()
public
setQuoteQty(float $value) : $this
Parameters
- $value : float
Return values
$thissetRatingSummary()
public
setRatingSummary(DataObject $summary) : $this
Parameters
- $summary : DataObject
Return values
$thissetRatingVotes()
public
setRatingVotes(Mage_Rating_Model_Resource_Rating_Option_Vote_Collection $value) : $this
Parameters
Return values
$thissetRealPriceHtml()
public
setRealPriceHtml(string $value) : $this
Parameters
- $value : string
Return values
$thissetRelatedLinkData()
public
setRelatedLinkData(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetRelatedProductIds()
public
setRelatedProductIds(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetRelatedProducts()
public
setRelatedProducts(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetRequiredOptions()
public
setRequiredOptions(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetShortDescription()
public
setShortDescription(string $value) : $this
Parameters
- $value : string
Return values
$thissetSkipCheckRequiredOption()
public
setSkipCheckRequiredOption(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetSku()
public
setSku(string $value) : $this
Parameters
- $value : string
Return values
$thissetStatus()
public
setStatus(int $store) : $this
Parameters
- $store : int
Return values
$thissetStockData()
public
setStockData(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetStockItem()
public
setStockItem(Mage_CatalogInventory_Model_Stock_Item $stockItem) : $this
Parameters
- $stockItem : Mage_CatalogInventory_Model_Stock_Item
Return values
$thissetStore()
public
setStore(int $store) : $this
Parameters
- $store : int
Return values
$thissetStoreId()
public
setStoreId(int $store) : $this
Parameters
- $store : int
Return values
$thissetStoreIds()
public
setStoreIds(array<string|int, mixed> $storeIds) : $this
Parameters
- $storeIds : array<string|int, mixed>
Return values
$thissetTaxPercent()
public
setTaxPercent(float|null $value) : $this
Parameters
- $value : float|null
Return values
$thissetTypeHasOptions()
public
setTypeHasOptions(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetTypeHasRequiredOptions()
public
setTypeHasRequiredOptions(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetTypeId()
public
setTypeId(string $value) : $this
Parameters
- $value : string
Return values
$thissetTypeInstance()
Set type instance for external
public
setTypeInstance(Mage_Catalog_Model_Product_Type_Abstract $instance[, bool $singleton = false ]) : $this
Parameters
- $instance : Mage_Catalog_Model_Product_Type_Abstract
-
Product type instance
- $singleton : bool = false
-
Whether instance is singleton
Return values
$thissetUpdatedAt()
public
setUpdatedAt(string $currentTime) : $this
Parameters
- $currentTime : string
Return values
$thissetUpSellLinkData()
public
setUpSellLinkData(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetUpSellProductIds()
public
setUpSellProductIds(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetUpSellProducts()
public
setUpSellProducts(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetUrlDataObject()
public
setUrlDataObject(DataObject $value) : $this
Parameters
- $value : DataObject
Return values
$thissetUrlKey()
public
setUrlKey(string $value) : $this
Parameters
- $value : string
Return values
$thissetUrlPath()
public
setUrlPath(string $value) : $this
Parameters
- $value : string
Return values
$thissetVisibility()
public
setVisibility(int $value) : $this
Parameters
- $value : int
Return values
$thissetWebsiteId()
public
setWebsiteId(int $getWebsiteId) : $this
Parameters
- $getWebsiteId : int
Return values
$thissetWebsiteIds()
public
setWebsiteIds(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetWishlistStoreId()
public
setWishlistStoreId(int $value) : $this
Parameters
- $value : int
Return values
$thistoArray()
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
stringtoString()
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
stringtoXml()
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
stringunlockAttribute()
Unlock attribute
public
unlockAttribute(string $attributeCode) : $this
Parameters
- $attributeCode : string
Return values
$thisunlockAttributes()
Unlock all attributes
public
unlockAttributes() : $this
Return values
$thisunsetData()
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
$thisunsetOldData()
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
$thisunsRecurringProfile()
public
unsRecurringProfile() : $this
Return values
$thisunsSkipCheckRequiredOption()
public
unsSkipCheckRequiredOption() : $this
Return values
$thisvalidate()
Validate Product Data
public
validate() : $this
Tags
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
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>_getImageHelper()
Return Catalog Product Image helper instance
protected
_getImageHelper() : Mage_Catalog_Helper_Image
Return values
Mage_Catalog_Helper_Image_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
_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