예제 #1
0
파일: Cart.php 프로젝트: kirkbauer2/kirkxc
 /**
  * Check if the requested amount is available for the product
  *
  * @param \XLite\Model\OrderItem $item   Order item to add
  * @param integer                $amount Amount to check OPTIONAL
  *
  * @return integer
  */
 protected function checkAmount(\XLite\Model\OrderItem $item, $amount = null)
 {
     return $item->getVariant() && !$item->getVariant()->getDefaultAmount() ? ($amount ?: 0) < $item->getVariant()->getAvailableAmount() : parent::checkAmount($item, $amount);
 }