source/Application/Component/UtilsComponent.php
protected function _toList($sListType, $sProductId, $dAmount, $aSel)
    {
        // only if user is logged in
        if ($oUser = $this->getUser()) {
            $sProductId = ($sProductId) ? $sProductId : \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('itmid');
            $sProductId = ($sProductId) ? $sProductId : \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('aid');
            $dAmount = isset($dAmount) ? $dAmount : \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('am');
            $aSel = $aSel ? $aSel : \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('sel');

            // processing amounts
            $dAmount = str_replace(',', '.', $dAmount);
            if (!\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('blAllowUnevenAmounts')) {
                $dAmount = round(( string ) $dAmount);
            }

            $oBasket = $oUser->getBasket($sListType);
            $oBasket->addItemToBasket($sProductId, abs($dAmount), $aSel, ($dAmount == 0));

            // recalculate basket count
            $oBasket->getItemCount(true);
        }
    }
protected function _toList($sListType, $sProductId, $dAmount, $aSel)
    {
        // only if user is logged in
        if ($oUser = $this->getUser()) {
            $sProductId = ($sProductId) ? $sProductId : \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('itmid');
            $sProductId = ($sProductId) ? $sProductId : \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('aid');
            $dAmount = isset($dAmount) ? $dAmount : \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('am');
            $aSel = $aSel ? $aSel : \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('sel');

            // processing amounts
            $dAmount = str_replace(',', '.', $dAmount);
            if (!\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('blAllowUnevenAmounts')) {
                $dAmount = round(( string ) $dAmount);
            }

            $oBasket = $oUser->getBasket($sListType);
            $oBasket->addItemToBasket($sProductId, abs($dAmount), $aSel, ($dAmount == 0));

            // recalculate basket count
            $oBasket->getItemCount(true);
        }
    }
protected function _toList ( $ sListType , $ sProductId , $ dAmount , $ aSel ) { // only if user is logged in if ( $ oUser = $ this -> getUser ( ) ) { $ sProductId = ( $ sProductId ) ? $ sProductId : \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'itmid' ) ; $ sProductId = ( $ sProductId ) ? $ sProductId : \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'aid' ) ; $ dAmount = isset ( $ dAmount ) ? $ dAmount : \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'am' ) ; $ aSel = $ aSel ? $ aSel : \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'sel' ) ; // processing amounts $ dAmount = str_replace ( ',' , '.' , $ dAmount ) ; if ( ! \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getConfigParam ( 'blAllowUnevenAmounts' ) ) { $ dAmount = round ( ( string ) $ dAmount ) ; } $ oBasket = $ oUser -> getBasket ( $ sListType ) ; $ oBasket -> addItemToBasket ( $ sProductId , abs ( $ dAmount ) , $ aSel , ( $ dAmount == 0 ) ) ; // recalculate basket count $ oBasket -> getItemCount ( true ) ; } }
Adds chosen product to defined user list. if amount is 0, item is removed from the list

@param string $sListType  user product list type
@param string $sProductId product id
@param double $dAmount    product amount
@param array  $aSel       product selection list
Adds chosen product to defined user list . if amount is 0 item is removed from the list