Beispiel #1
0
 /**
  * Check if we need to register the record concerning the product inventory change
  *
  * @param \XLite\Model\Inventory $inventory
  * @param integer $delta
  *
  * @return boolean
  */
 protected function isAbleToReduceAmount(\XLite\Model\Inventory $inventory, $delta)
 {
     // Do record if the product is reserved and we have enough amount in stock for it
     return $inventory->getPublicAmount() > abs($delta);
 }
 /**
  * {@inheritDoc}
  */
 public function getPublicAmount()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPublicAmount', array());
     return parent::getPublicAmount();
 }