Example #1
0
 /**
  * Creates, calculates and returns oxPrice object for basket product.
  *
  * @param float  $dAmount  Amount
  * @param string $aSelList Selection list
  * @param object $oBasket  User shopping basket object
  *
  * @return oxPrice
  */
 public function getBasketPrice($dAmount, $aSelList, $oBasket)
 {
     $oUser = $oBasket->getBasketUser();
     $this->setArticleUser($oUser);
     $oBasketPrice = $this->_getPriceObject($oBasket->isCalculationModeNetto());
     // get base price
     $dBasePrice = $this->getBasePrice($dAmount);
     $dBasePrice = $this->_modifySelectListPrice($dBasePrice, $aSelList);
     $dBasePrice = $this->_preparePrice($dBasePrice, $this->getArticleVat(), $oBasket->isCalculationModeNetto());
     // applying select list price
     // setting price
     $oBasketPrice->setPrice($dBasePrice);
     $dVat = oxRegistry::get("oxVatSelector")->getBasketItemVat($this, $oBasket);
     $this->_calculatePrice($oBasketPrice, $dVat);
     // returning final price object
     return $oBasketPrice;
 }
 /**
  * Creates, calculates and returns oxprice object for basket product.
  *
  * @param double $dAmount  Amount
  * @param string $aSelList Selection list
  * @param object $oBasket  User shopping basket object
  *
  * @return oxPrice
  */
 public function getBasketPrice($dAmount, $aSelList, $oBasket)
 {
     $oUser = $oBasket->getBasketUser();
     $this->setArticleUser($oUser);
     $oBasketPrice = oxNew('oxPrice');
     // get base price
     $dBasePrice = $this->getBasePrice($dAmount);
     // applying select list price
     $dBasePrice = $this->_modifySelectListPrice($dBasePrice, $aSelList);
     // setting price
     $oBasketPrice->setPrice($dBasePrice);
     $dVat = oxVatSelector::getInstance()->getBasketItemVat($this, $oBasket);
     $this->_calculatePrice($oBasketPrice, $dVat);
     // returning final price object
     return $oBasketPrice;
 }