コード例 #1
0
 /**
  * Adds item to the basket
  *
  * @param WirecardCEE_Stdlib_Basket_Item $oItem
  * @param int $iQuantity
  *
  * @return WirecardCEE_Stdlib_Basket
  */
 public function addItem(WirecardCEE_Stdlib_Basket_Item $oItem, $iQuantity = 1)
 {
     $_mArticleNumber = $oItem->getArticleNumber();
     $_quantity = $this->_getItemQuantity($_mArticleNumber);
     if (!$_quantity) {
         $this->_items[md5($_mArticleNumber)] = array('instance' => $oItem, self::QUANTITY => $iQuantity);
     } else {
         $this->_increaseQuantity($_mArticleNumber, $iQuantity);
     }
     return $this;
 }