/** * validate * * @param Varien_Object $object Quote * @return boolean */ public function validate(Varien_Object $object) { if (!$this->getConditions()) { return false; } $attr = $this->getAttribute(); $total = 0; foreach ($object->getAllItems() as $item) { if (parent::validate($item)) { $total += $item->getData($attr); } } return $this->validateAttribute($total); }