Public Member Functions | |
__construct () | |
getNewChildSelectOptions () | |
collectValidatedAttributes ($productCollection) |
Definition at line 28 of file Combine.php.
__construct | ( | ) |
Constructor
By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes
Reimplemented from Mage_Rule_Model_Condition_Combine.
Definition at line 30 of file Combine.php.
00031 { 00032 parent::__construct(); 00033 $this->setType('catalogrule/rule_condition_combine'); 00034 }
collectValidatedAttributes | ( | $ | productCollection | ) |
Definition at line 52 of file Combine.php.
00053 { 00054 foreach ($this->getConditions() as $condition) { 00055 $condition->collectValidatedAttributes($productCollection); 00056 } 00057 return $this; 00058 }
getNewChildSelectOptions | ( | ) |
Reimplemented from Mage_Rule_Model_Condition_Abstract.
Definition at line 36 of file Combine.php.
00037 { 00038 $productCondition = Mage::getModel('catalogrule/rule_condition_product'); 00039 $productAttributes = $productCondition->loadAttributeOptions()->getAttributeOption(); 00040 $attributes = array(); 00041 foreach ($productAttributes as $code=>$label) { 00042 $attributes[] = array('value'=>'catalogrule/rule_condition_product|'.$code, 'label'=>$label); 00043 } 00044 $conditions = parent::getNewChildSelectOptions(); 00045 $conditions = array_merge_recursive($conditions, array( 00046 array('value'=>'catalogrule/rule_condition_combine', 'label'=>Mage::helper('catalogrule')->__('Conditions Combination')), 00047 array('label'=>Mage::helper('catalogrule')->__('Product Attribute'), 'value'=>$attributes), 00048 )); 00049 return $conditions; 00050 }