public function getPriceInfo(OnlineShop_Framework_ProductInterfaces_ICheckoutable $abstractProduct, $quantityScale = 1, $products = null) { $pId = $abstractProduct->getId(); if (!is_array($this->priceInfos[$pId])) { $this->priceInfos[$pId] = array(); } if (!$this->priceInfos[$pId][$quantityScale]) { $priceInfo = $this->initPriceInfoInstance($quantityScale, $abstractProduct, $products); $this->priceInfos[$pId][$quantityScale] = $priceInfo; } return $this->priceInfos[$pId][$quantityScale]; }
/** * @param OnlineShop_Framework_ProductInterfaces_ICheckoutable $product * @param int $count * @param null $itemKey * @param bool $replace * @param array $params * @param array $subProducts * @param null $comment * * @return string */ public function addGiftItem(OnlineShop_Framework_ProductInterfaces_ICheckoutable $product, $count, $itemKey = null, $replace = false, $params = array(), $subProducts = array(), $comment = null) { $this->checkCartIsReadOnly(); if (empty($itemKey)) { $itemKey = $product->getId(); if (!empty($subProducts)) { $itemKey = $itemKey . "_" . uniqid(); } } return $this->updateGiftItem($itemKey, $product, $count, $replace, $params, $subProducts, $comment); }
public function setProduct(OnlineShop_Framework_ProductInterfaces_ICheckoutable $product) { $this->product = $product; $this->productId = $product->getId(); }