
Public Member Functions | |
| isQty ($productTypeId) | |
| getIsQtyTypeIds ($filter=null) | |
| getConfigItemOptions () | |
Static Protected Attributes | |
| static | $_isQtyTypeIds |
Definition at line 30 of file Data.php.
| getConfigItemOptions | ( | ) |
| getIsQtyTypeIds | ( | $ | filter = null |
) |
Get all registered product type ids and if quantity is defined for them
| bool | $filter |
Definition at line 60 of file Data.php.
00061 { 00062 if (null === self::$_isQtyTypeIds) { 00063 self::$_isQtyTypeIds = array(); 00064 $productTypesXml = Mage::getConfig()->getNode('global/catalog/product/type'); 00065 foreach ($productTypesXml->children() as $typeId => $configXml) { 00066 self::$_isQtyTypeIds[$typeId] = (bool)$configXml->is_qty; 00067 } 00068 } 00069 if (null === $filter) { 00070 return self::$_isQtyTypeIds; 00071 } 00072 $result = self::$_isQtyTypeIds; 00073 foreach ($result as $key => $value) { 00074 if ($value !== $filter) { 00075 unset($result[$key]); 00076 } 00077 } 00078 return $result; 00079 }
| isQty | ( | $ | productTypeId | ) |
Check if quantity defined for specified product type
| string | $productTypeId |
Definition at line 45 of file Data.php.
00046 { 00047 $this->getIsQtyTypeIds(); 00048 if (!isset(self::$_isQtyTypeIds[$productTypeId])) { 00049 return false; 00050 } 00051 return self::$_isQtyTypeIds[$productTypeId]; 00052 }
1.5.8