src/Entities/Cart.php
public function getItemsByMerchantID($merchantID)
    {
        return array_filter($this->getItems(), function(CartItem $item) use ($merchantID)
        {
            return $item->getProduct()->getOrganisation()->getId() == $merchantID;
        });
    }
public function getItemsByMerchantID($merchantID)
    {
        return array_filter($this->getItems(), function(CartItem $item) use ($merchantID)
        {
            return $item->getProduct()->getOrganisation()->getId() == $merchantID;
        });
    }
public function getItemsByMerchantID ( $ merchantID ) { return array_filter ( $ this -> getItems ( ) , function ( CartItem $ item ) use ( $ merchantID ) { return $ item -> getProduct ( ) -> getOrganisation ( ) -> getId ( ) == $ merchantID ; } ) ; }
@param int $merchantID

@return array
@param int $merchantID