Example #1
0
 /**
  * Check if product can be purchased
  *
  * @return boolean
  */
 public function isOutOfStock()
 {
     $result = parent::isOutOfStock();
     if (!$result) {
         $membership = \XLite::getController() instanceof \XLite\Controller\ACustomer ? \XLite::getController()->getCart()->getProfile()->getMembership() : null;
         $result = $this->getAvailableAmount() < $this->getProduct()->getMinQuantity($membership);
     }
     return $result;
 }
Example #2
0
 /**
  * Alias: is product in stock or not
  *
  * @return boolean
  */
 public function isOutOfStock()
 {
     $result = false;
     if ($this->getProduct() && $this->getProduct()->hasManualPinCodes()) {
         $result = 0 >= $this->getProduct()->getRemainingPinCodesCount();
     } else {
         $result = parent::isOutOfStock();
     }
     return $result;
 }
 /**
  * {@inheritDoc}
  */
 public function isOutOfStock()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'isOutOfStock', array());
     return parent::isOutOfStock();
 }