Class Mage_Bundle_Model_Product_Type

Description

Bundle Type Model

Located in /Bundle/Model/Product/Type.php (line 34)

Mage_Catalog_Model_Product_Type_Abstract
   |
   --Mage_Bundle_Model_Product_Type
Variable Summary
Method Summary
void beforeSave ([Mage_Catalog_Model_Product $product = null])
array getChildrenIds (int $parentId, [bool $required = true])
array getOptions ([Mage_Catalog_Model_Product $product = null])
array getOptionsIds ([Mage_Catalog_Model_Product $product = null])
array getOrderOptions ([Mage_Catalog_Model_Product $product = null])
array getParentIdsByChild (int|array $childId)
Varien_Object getRelationInfo ()
array getSearchableData ([Mage_Catalog_Model_Product $product = null])
string getSku ([Mage_Catalog_Model_Product $product = null])
decimal getWeight ([Mage_Catalog_Model_Product $product = null])
bool hasOptions ([Mage_Catalog_Model_Product $product = null])
bool isSalable ([Mage_Catalog_Model_Product $product = null])
bool isVirtual ([Mage_Catalog_Model_Product $product = null])
int prepareQuoteItemQty (mixed $qty, [Mage_Catalog_Model_Product $product = null])
array processBuyRequest (Mage_Catalog_Model_Product $product, Varien_Object $buyRequest)
void shakeSelections ( $a,  $b)
Mage_Bundle_Model_Product_Type updateQtyOption (array $options,  $option, mixed $value, [Mage_Catalog_Model_Product $product = null])
array|string _prepareProduct ( $buyRequest, Mage_Catalog_Model_Product $product, string $processMode)
Variables
bool $_canConfigure = true (line 90)

Product is configurable

  • access: protected

Redefinition of:
Mage_Catalog_Model_Product_Type_Abstract::$_canConfigure
Is a configurable product type
bool $_isComposite = true (line 41)

Product is composite

  • access: protected

Redefinition of:
Mage_Catalog_Model_Product_Type_Abstract::$_isComposite
Is a composite product type
string $_keyOptionsCollection = '_cache_instance_options_collection' (line 48)

Cache key for Options Collection

  • access: protected
string $_keySelectionsCollection = '_cache_instance_selections_collection' (line 55)

Cache key for Selections Collection

  • access: protected
string $_keyUsedOptions = '_cache_instance_used_options' (line 76)

Cache key for used options

  • access: protected
string $_keyUsedOptionsIds = '_cache_instance_used_options_ids' (line 83)

Cache key for used options ids

  • access: protected
string $_keyUsedSelections = '_cache_instance_used_selections' (line 62)

Cache key for used Selections

  • access: protected
string $_keyUsedSelectionsIds = '_cache_instance_used_selections_ids' (line 69)

Cache key for used selections ids

  • access: protected

Inherited Variables

Inherited from Mage_Catalog_Model_Product_Type_Abstract

Mage_Catalog_Model_Product_Type_Abstract::$_canUseQtyDecimals
Mage_Catalog_Model_Product_Type_Abstract::$_editableAttributes
Mage_Catalog_Model_Product_Type_Abstract::$_fileQueue
Mage_Catalog_Model_Product_Type_Abstract::$_product
Mage_Catalog_Model_Product_Type_Abstract::$_setAttributes
Mage_Catalog_Model_Product_Type_Abstract::$_storeFilter
Mage_Catalog_Model_Product_Type_Abstract::$_typeId
Methods
beforeSave (line 219)

Before save type related data

  • access: public
void beforeSave ([Mage_Catalog_Model_Product $product = null])

Redefinition of:
Mage_Catalog_Model_Product_Type_Abstract::beforeSave()
Before save type related data
checkProductBuyState (line 900)

Check if product can be bought

  • throws: Mage_Core_Exception
  • access: public
Mage_Bundle_Model_Product_Type checkProductBuyState ([Mage_Catalog_Model_Product $product = null])

Redefinition of:
Mage_Catalog_Model_Product_Type_Abstract::checkProductBuyState()
Check if product can be bought
getChildrenIds (line 116)

Retrieve Required children ids

Return grouped array, ex array( group => array(ids) )

  • access: public
array getChildrenIds (int $parentId, [bool $required = true])
  • int $parentId
  • bool $required

Redefinition of:
Mage_Catalog_Model_Product_Type_Abstract::getChildrenIds()
Retrieve Required children ids
getForceChildItemQtyChanges (line 867)

Allow for updates of chidren qty's

  • return: true
  • access: public
boolean getForceChildItemQtyChanges ([Mage_Catalog_Model_Product $product = null])

Redefinition of:
Mage_Catalog_Model_Product_Type_Abstract::getForceChildItemQtyChanges()
Allow for updates of chidren qty's (applicable for complicated product types. As default returns false)
getOptions (line 335)

Retrieve bundle options items

  • access: public
array getOptions ([Mage_Catalog_Model_Product $product = null])
getOptionsByIds (line 745)

Retrieve bundle options collection based on ids

  • access: public
Mage_Bundle_Model_Mysql4_Option_Collection getOptionsByIds (array $optionIds, [Mage_Catalog_Model_Product $product = null])
getOptionsCollection (line 357)

Retrieve bundle option collection

  • access: public
getOptionsIds (line 346)

Retrieve bundle options ids

  • access: public
array getOptionsIds ([Mage_Catalog_Model_Product $product = null])
getOrderOptions (line 771)

Prepare additional options/information for order item which will be created from this product

  • access: public
array getOrderOptions ([Mage_Catalog_Model_Product $product = null])

Redefinition of:
Mage_Catalog_Model_Product_Type_Abstract::getOrderOptions()
Prepare additional options/information for order item which will be created from this product
getParentIdsByChild (line 128)

Retrieve parent ids array by requered child

  • access: public
array getParentIdsByChild (int|array $childId)
  • int|array $childId

Redefinition of:
Mage_Catalog_Model_Product_Type_Abstract::getParentIdsByChild()
Retrieve parent ids array by requered child
getProductsToPurchaseByReqGroups (line 946)

Retrieve products divided into groups required to purchase At least one product in each group has to be purchased

  • access: public
array getProductsToPurchaseByReqGroups ([Mage_Catalog_Model_Product $product = null])

Redefinition of:
Mage_Catalog_Model_Product_Type_Abstract::getProductsToPurchaseByReqGroups()
Retrieve products divided into groups required to purchase At least one product in each group has to be purchased
getRelationInfo (line 97)

Return relation info about used products

  • return: Object with information data
  • access: public
Varien_Object getRelationInfo ()

Redefinition of:
Mage_Catalog_Model_Product_Type_Abstract::getRelationInfo()
Return relation info about used products for specific type instance
getSearchableData (line 879)

Retrieve additional searchable data from type instance Using based on product id and store_id data

  • access: public
array getSearchableData ([Mage_Catalog_Model_Product $product = null])

Redefinition of:
Mage_Catalog_Model_Product_Type_Abstract::getSearchableData()
Retrieve additional searchable data from type instance Using based on product id and store_id data
getSelectionsByIds (line 710)

Retrieve bundle selections collection based on ids

  • access: public
Mage_Bundle_Model_Mysql4_Selection_Collection getSelectionsByIds (array $selectionIds, [Mage_Catalog_Model_Product $product = null])
getSelectionsCollection (line 382)

Retrive bundle selections collection based on used options

  • access: public
Mage_Bundle_Model_Mysql4_Selection_Collection getSelectionsCollection (array $optionIds, [Mage_Catalog_Model_Product $product = null])
getSku (line 140)

Return product sku based on sku_type attribute

  • access: public
string getSku ([Mage_Catalog_Model_Product $product = null])

Redefinition of:
Mage_Catalog_Model_Product_Type_Abstract::getSku()
Default action to get sku of product
getSpecifyOptionMessage (line 698)

Retrieve message for specify option(s)

  • access: public
string getSpecifyOptionMessage ()

Redefinition of:
Mage_Catalog_Model_Product_Type_Abstract::getSpecifyOptionMessage()
Retrieve message for specify option(s)
getWeight (line 170)

Return product weight based on weight_type attribute

  • access: public
decimal getWeight ([Mage_Catalog_Model_Product $product = null])

Redefinition of:
Mage_Catalog_Model_Product_Type_Abstract::getWeight()
Default action to get weight of product
hasOptions (line 847)

Return true if product has options

  • access: public
bool hasOptions ([Mage_Catalog_Model_Product $product = null])

Redefinition of:
Mage_Catalog_Model_Product_Type_Abstract::hasOptions()
Return true if product has options
isSalable (line 464)

Checking if we can sale this bundle

  • access: public
bool isSalable ([Mage_Catalog_Model_Product $product = null])

Redefinition of:
Mage_Catalog_Model_Product_Type_Abstract::isSalable()
Check is product available for sale
isVirtual (line 195)

Check is virtual product

  • access: public
bool isVirtual ([Mage_Catalog_Model_Product $product = null])

Redefinition of:
Mage_Catalog_Model_Product_Type_Abstract::isVirtual()
Check is virtual product
prepareQuoteItemQty (line 453)

Prepare Quote Item Quantity

  • access: public
int prepareQuoteItemQty (mixed $qty, [Mage_Catalog_Model_Product $product = null])

Redefinition of:
Mage_Catalog_Model_Product_Type_Abstract::prepareQuoteItemQty()
Prepare Quote Item Quantity
processBuyRequest (line 976)

Prepare selected options for bundle product

  • access: public
array processBuyRequest (Mage_Catalog_Model_Product $product, Varien_Object $buyRequest)

Redefinition of:
Mage_Catalog_Model_Product_Type_Abstract::processBuyRequest()
Prepare selected options for product
save (line 259)

Save type related data

  • access: public

Redefinition of:
Mage_Catalog_Model_Product_Type_Abstract::save()
Save type related data
shakeSelections (line 828)
  • access: public
void shakeSelections ( $a,  $b)
  • $a
  • $b
updateQtyOption (line 420)

Method is needed for specific actions to change given quote options values according current product type logic Example: the cataloginventory validation of decimal qty can change qty to int, so need to change quote item qty option value too.

  • access: public
Mage_Bundle_Model_Product_Type updateQtyOption (array $options,  $option, mixed $value, [Mage_Catalog_Model_Product $product = null])

Redefinition of:
Mage_Catalog_Model_Product_Type_Abstract::updateQtyOption()
Method is needed for specific actions to change given configuration options values according current product type logic Example: the cataloginventory validation of decimal qty can change qty to int, so need to change configuration item qty option value too.
_prepareProduct (line 511)

Prepare product and its configuration to be added to some products list.

Perform standard preparation process and then prepare of bundle selections options.

  • access: protected
array|string _prepareProduct ( $buyRequest, Mage_Catalog_Model_Product $product, string $processMode)

Redefinition of:
Mage_Catalog_Model_Product_Type_Abstract::_prepareProduct()
Prepare product and its configuration to be added to some products list.

Inherited Methods

Inherited From Mage_Catalog_Model_Product_Type_Abstract

Mage_Catalog_Model_Product_Type_Abstract::addFileQueue()
Mage_Catalog_Model_Product_Type_Abstract::assignProductToOption()
Mage_Catalog_Model_Product_Type_Abstract::attributesCompare()
Mage_Catalog_Model_Product_Type_Abstract::beforeSave()
Mage_Catalog_Model_Product_Type_Abstract::canConfigure()
Mage_Catalog_Model_Product_Type_Abstract::canUseQtyDecimals()
Mage_Catalog_Model_Product_Type_Abstract::checkProductBuyState()
Mage_Catalog_Model_Product_Type_Abstract::checkProductConfiguration()
Mage_Catalog_Model_Product_Type_Abstract::getAttributeById()
Mage_Catalog_Model_Product_Type_Abstract::getChildrenIds()
Mage_Catalog_Model_Product_Type_Abstract::getEditableAttributes()
Mage_Catalog_Model_Product_Type_Abstract::getForceChildItemQtyChanges()
Mage_Catalog_Model_Product_Type_Abstract::getOptionSku()
Mage_Catalog_Model_Product_Type_Abstract::getOrderOptions()
Mage_Catalog_Model_Product_Type_Abstract::getParentIdsByChild()
Mage_Catalog_Model_Product_Type_Abstract::getProduct()
Mage_Catalog_Model_Product_Type_Abstract::getProductsToPurchaseByReqGroups()
Mage_Catalog_Model_Product_Type_Abstract::getRelationInfo()
Mage_Catalog_Model_Product_Type_Abstract::getSearchableData()
Mage_Catalog_Model_Product_Type_Abstract::getSetAttributes()
Mage_Catalog_Model_Product_Type_Abstract::getSku()
Mage_Catalog_Model_Product_Type_Abstract::getSpecifyOptionMessage()
Mage_Catalog_Model_Product_Type_Abstract::getStoreFilter()
Mage_Catalog_Model_Product_Type_Abstract::getWeight()
Mage_Catalog_Model_Product_Type_Abstract::hasOptions()
Mage_Catalog_Model_Product_Type_Abstract::hasRequiredOptions()
Mage_Catalog_Model_Product_Type_Abstract::isComposite()
Mage_Catalog_Model_Product_Type_Abstract::isSalable()
Mage_Catalog_Model_Product_Type_Abstract::isVirtual()
Mage_Catalog_Model_Product_Type_Abstract::prepareForCart()
Mage_Catalog_Model_Product_Type_Abstract::prepareForCartAdvanced()
Mage_Catalog_Model_Product_Type_Abstract::prepareQuoteItemQty()
Mage_Catalog_Model_Product_Type_Abstract::processBuyRequest()
Mage_Catalog_Model_Product_Type_Abstract::processConfiguration()
Mage_Catalog_Model_Product_Type_Abstract::processFileQueue()
Mage_Catalog_Model_Product_Type_Abstract::save()
Mage_Catalog_Model_Product_Type_Abstract::setConfig()
Mage_Catalog_Model_Product_Type_Abstract::setProduct()
Mage_Catalog_Model_Product_Type_Abstract::setStoreFilter()
Mage_Catalog_Model_Product_Type_Abstract::setTypeId()
Mage_Catalog_Model_Product_Type_Abstract::updateQtyOption()
Mage_Catalog_Model_Product_Type_Abstract::_isStrictProcessMode()
Mage_Catalog_Model_Product_Type_Abstract::_prepareOptions()
Mage_Catalog_Model_Product_Type_Abstract::_prepareOptionsForCart()
Mage_Catalog_Model_Product_Type_Abstract::_prepareProduct()
Mage_Catalog_Model_Product_Type_Abstract::_removeNotApplicableAttributes()
Class Constants

Documentation generated on Fri, 11 Feb 2011 17:15:19 +0200 by phpDocumentor 1.4.3