Public Member Functions | |
validate (Varien_Object $object) | |
Protected Member Functions | |
_addSpecialAttributes (array &$attributes) |
Definition at line 28 of file Product.php.
_addSpecialAttributes | ( | array &$ | attributes | ) | [protected] |
Add special attributes
array | $attributes |
Reimplemented from Mage_CatalogRule_Model_Rule_Condition_Product.
Definition at line 31 of file Product.php.
00032 { 00033 parent::_addSpecialAttributes($attributes); 00034 $attributes['quote_item_qty'] = Mage::helper('salesrule')->__('Quantity in cart'); 00035 $attributes['quote_item_price'] = Mage::helper('salesrule')->__('Price in cart'); 00036 $attributes['quote_item_row_total'] = Mage::helper('salesrule')->__('Row total in cart'); 00037 }
validate | ( | Varien_Object $ | object | ) |
Validate Product Rule Condition
Varien_Object | $object |
Reimplemented from Mage_CatalogRule_Model_Rule_Condition_Product.
Definition at line 45 of file Product.php.
00046 { 00047 $product = Mage::getModel('catalog/product') 00048 ->load($object->getProductId()) 00049 ->setQuoteItemQty($object->getQty()) 00050 ->setQuoteItemPrice($object->getPrice()) 00051 ->setQuoteItemRowTotal($object->getRowTotal()); 00052 00053 return parent::validate($product); 00054 }