Beispiel #1
0
 /**
  * Check order item and return true if this is valid
  *
  * @param \XLite\Model\OrderItem $entity Order item entity
  *
  * @return boolean
  */
 protected function isValidEntity($entity)
 {
     $result = 0 < $entity->getAmount();
     if ($result && ($entity->hasAttributeValues() || $entity->getProduct()->hasEditableAttributes())) {
         $result = array_keys($entity->getAttributeValuesIds()) == $entity->getProduct()->getEditableAttributesIds();
     }
     return $result;
 }
 /**
  * {@inheritDoc}
  */
 public function hasAttributeValues()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'hasAttributeValues', array());
     return parent::hasAttributeValues();
 }