src/ShopBundle/objects/TShopBasket/TShopBasketArticleCoreList.class.php
private function validateBasketContentBuyable(TShopBasketArticle $oBasketArticle, $sMessageManager)
    {
        $bValid = true;
        if (false === $oBasketArticle->IsBuyable()) {
            $oMessage = TCMSMessageManager::GetInstance();
            $aErrorCodes = $oBasketArticle->GetSQLWithTablePrefix();
            $oMessage->AddMessage($sMessageManager, 'ERROR-ADD-TO-BASKET-ARTICLE-NOT-BUYABLE', $aErrorCodes);
            if ($this->IsInList($oBasketArticle)) {
                $this->RemoveArticle($oBasketArticle);
            }
            $bValid = false;
        }

        return $bValid;
    }
private function validateBasketContentBuyable(TShopBasketArticle $oBasketArticle, $sMessageManager)
    {
        $bValid = true;
        if (false === $oBasketArticle->IsBuyable()) {
            $oMessage = TCMSMessageManager::GetInstance();
            $aErrorCodes = $oBasketArticle->GetSQLWithTablePrefix();
            $oMessage->AddMessage($sMessageManager, 'ERROR-ADD-TO-BASKET-ARTICLE-NOT-BUYABLE', $aErrorCodes);
            if ($this->IsInList($oBasketArticle)) {
                $this->RemoveArticle($oBasketArticle);
            }
            $bValid = false;
        }

        return $bValid;
    }
private function validateBasketContentBuyable ( TShopBasketArticle $ oBasketArticle , $ sMessageManager ) { $ bValid = true ; if ( false === $ oBasketArticle -> IsBuyable ( ) ) { $ oMessage = TCMSMessageManager :: GetInstance ( ) ; $ aErrorCodes = $ oBasketArticle -> GetSQLWithTablePrefix ( ) ; $ oMessage -> AddMessage ( $ sMessageManager , 'ERROR-ADD-TO-BASKET-ARTICLE-NOT-BUYABLE' , $ aErrorCodes ) ; if ( $ this -> IsInList ( $ oBasketArticle ) ) { $ this -> RemoveArticle ( $ oBasketArticle ) ; } $ bValid = false ; } return $ bValid ; }
Checks if given basket article is buyable. If not remove it from basket with message.

@param TShopBasketArticle $oBasketArticle
@param string             $sMessageManager

@return bool
Checks if given basket article is buyable . If not remove it from basket with message .