Example #1
0
 /**
  * validate
  *
  * @param Varien_Object $object Quote
  * @return boolean
  */
 public function validate(Varien_Object $object)
 {
     if (!$this->getConditions()) {
         return false;
     }
     $attr = $this->getAttribute();
     $total = 0;
     if ($object->getItemsToValidateRestrictions()) {
         foreach ($object->getItemsToValidateRestrictions() as $item) {
             //can't use parent here
             if (Mage_SalesRule_Model_Rule_Condition_Product_Combine::validate($item)) {
                 $total += $item->getData($attr);
             }
         }
     }
     return $this->validateAttribute($total);
 }