/** * Check if item has a wrong amount * * @return boolean */ public function hasWrongAmount() { return $this->getVariant() && !$this->getVariant()->getDefaultAmount() ? $this->getVariant()->getAmount() < $this->getVariant()->getLockedAmount() : parent::hasWrongAmount(); }
/** * Check if item has a wrong amount * * @return boolean */ public function hasWrongAmount() { $minQuantity = \XLite\Core\Database::getRepo('XLite\\Module\\CDev\\Wholesale\\Model\\MinQuantity')->getMinQuantity($this->getProduct(), $this->getOrder()->getProfile() ? $this->getOrder()->getProfile()->getMembership() : null); $minimumQuantity = $minQuantity ? $minQuantity->getQuantity() : 1; return parent::hasWrongAmount() || $minimumQuantity > $this->getAmount(); }
/** * {@inheritDoc} */ public function hasWrongAmount() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'hasWrongAmount', array()); return parent::hasWrongAmount(); }