source/Application/Component/BasketComponent.php
protected function _getItems(
        $sProductId = null,
        $dAmount = null,
        $aSel = null,
        $aPersParam = null,
        $blOverride = false
    ) {
        // collecting items to add
        $aProducts = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('aproducts');

        // collecting specified item
        $sProductId = $sProductId ? $sProductId : \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('aid');
        if ($sProductId) {
            // additionally fetching current product info
            $dAmount = isset($dAmount) ? $dAmount : \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('am');

            // select lists
            $aSel = isset($aSel) ? $aSel : \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('sel');

            // persistent parameters
            if (empty($aPersParam)) {
                $aPersParam = $this->getPersistedParameters();
            }

            $sBasketItemId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('bindex');

            $aProducts[$sProductId] = ['am'           => $dAmount,
                                            'sel'          => $aSel,
                                            'persparam'    => $aPersParam,
                                            'override'     => $blOverride,
                                            'basketitemid' => $sBasketItemId
            ];
        }

        if (is_array($aProducts) && count($aProducts)) {
            if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('removeBtn') !== null) {
                //setting amount to 0 if removing article from basket
                foreach ($aProducts as $sProductId => $aProduct) {
                    if (isset($aProduct['remove']) && $aProduct['remove']) {
                        $aProducts[$sProductId]['am'] = 0;
                    } else {
                        unset($aProducts[$sProductId]);
                    }
                }
            }

            return $aProducts;
        }

        return false;
    }
protected function _getItems(
        $sProductId = null,
        $dAmount = null,
        $aSel = null,
        $aPersParam = null,
        $blOverride = false
    ) {
        // collecting items to add
        $aProducts = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('aproducts');

        // collecting specified item
        $sProductId = $sProductId ? $sProductId : \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('aid');
        if ($sProductId) {
            // additionally fetching current product info
            $dAmount = isset($dAmount) ? $dAmount : \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('am');

            // select lists
            $aSel = isset($aSel) ? $aSel : \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('sel');

            // persistent parameters
            if (empty($aPersParam)) {
                $aPersParam = $this->getPersistedParameters();
            }

            $sBasketItemId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('bindex');

            $aProducts[$sProductId] = ['am'           => $dAmount,
                                            'sel'          => $aSel,
                                            'persparam'    => $aPersParam,
                                            'override'     => $blOverride,
                                            'basketitemid' => $sBasketItemId
            ];
        }

        if (is_array($aProducts) && count($aProducts)) {
            if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('removeBtn') !== null) {
                //setting amount to 0 if removing article from basket
                foreach ($aProducts as $sProductId => $aProduct) {
                    if (isset($aProduct['remove']) && $aProduct['remove']) {
                        $aProducts[$sProductId]['am'] = 0;
                    } else {
                        unset($aProducts[$sProductId]);
                    }
                }
            }

            return $aProducts;
        }

        return false;
    }
protected function _getItems ( $ sProductId = null , $ dAmount = null , $ aSel = null , $ aPersParam = null , $ blOverride = false ) { // collecting items to add $ aProducts = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'aproducts' ) ; // collecting specified item $ sProductId = $ sProductId ? $ sProductId : \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'aid' ) ; if ( $ sProductId ) { // additionally fetching current product info $ dAmount = isset ( $ dAmount ) ? $ dAmount : \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'am' ) ; // select lists $ aSel = isset ( $ aSel ) ? $ aSel : \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'sel' ) ; // persistent parameters if ( empty ( $ aPersParam ) ) { $ aPersParam = $ this -> getPersistedParameters ( ) ; } $ sBasketItemId = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'bindex' ) ; $ aProducts [ $ sProductId ] = [ 'am' => $ dAmount , 'sel' => $ aSel , 'persparam' => $ aPersParam , 'override' => $ blOverride , 'basketitemid' => $ sBasketItemId ] ; } if ( is_array ( $ aProducts ) && count ( $ aProducts ) ) { if ( \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'removeBtn' ) !== null ) { //setting amount to 0 if removing article from basket foreach ( $ aProducts as $ sProductId => $ aProduct ) { if ( isset ( $ aProduct [ 'remove' ] ) && $ aProduct [ 'remove' ] ) { $ aProducts [ $ sProductId ] [ 'am' ] = 0 ; } else { unset ( $ aProducts [ $ sProductId ] ) ; } } } return $ aProducts ; } return false ; }
Collects and returns array of items to add to basket. Product info is taken not only from
given parameters, but additionally from request 'aproducts' parameter

@param string $sProductId product ID
@param double $dAmount    product amount
@param array  $aSel       product select lists
@param array  $aPersParam product persistent parameters
@param bool   $blOverride amount override status

@return mixed
Collects and returns array of items to add to basket . Product info is taken not only from given parameters but additionally from request aproducts parameter