コード例 #1
0
ファイル: Quantity.php プロジェクト: kirkbauer2/kirkxc
 /**
  * Return maximum allowed quantity
  *
  * @return integer
  */
 protected function getMaxQuantity()
 {
     return $this->getProductVariant() && !$this->getProductVariant()->getDefaultAmount() ? $this->getProductVariant()->getAvailableAmount() : parent::getMaxQuantity();
 }
コード例 #2
0
 /**
  * Check if the product has wholesale price
  *
  * @return boolean
  */
 protected function hasWholesalePrice()
 {
     return $this->getProductVariant() && !$this->getProductVariant()->getDefaultPrice() ? \XLite\Core\Database::getRepo('XLite\\Module\\CDev\\Wholesale\\Model\\ProductVariantWholesalePrice')->hasWholesalePrice($this->getProductVariant()) : parent::hasWholesalePrice();
 }
コード例 #3
0
ファイル: Quantity.php プロジェクト: kirkbauer2/kirkxc
 /**
  * Define the CSS classes
  *
  * @return string
  */
 protected function getCSSClass()
 {
     return parent::getCSSClass() . ($this->hasWholesalePrice() ? ' wholesale-price-defined' : '');
 }