コード例 #1
0
ファイル: OrderItem.php プロジェクト: kirkbauer2/kirkxc
 /**
  * Check - can change item's amount or not
  *
  * @return boolean
  */
 public function canChangeAmount()
 {
     $product = $this->getProduct();
     if ($product && $product->getInventory()->getEnabled() && $this->getVariant() && !$this->getVariant()->getDefaultAmount()) {
         $result = 0 < $this->getVariant()->getAmount();
     } else {
         $result = parent::canChangeAmount();
     }
     return $result;
 }
コード例 #2
0
 /**
  * {@inheritDoc}
  */
 public function canChangeAmount()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'canChangeAmount', array());
     return parent::canChangeAmount();
 }