Block/Feefo.php
private function getQuoteProducts()
    {
        $products = [];
        $params = $this->_request->getParams();

        if (! isset($params['quote_id']) || ! isset($params['code']) || ! $this->helper->isCodeValid($params['code'])) {
            $this->helper->log('Feefo no quote id or code is set');

            return $products;
        }

        $quoteId = (int) $params['quote_id'];

        $quoteModel = $this->quoteFactory->create();
        $this->quoteResource->load($quoteModel, $quoteId);

        if (! $quoteModel->getId()) {
            return $products;
        }

        $productCollection = $this->review->getProductCollection($quoteModel);

        foreach ($productCollection as $product) {
                $products[$product->getSku()] = $product->getName();
        }
        return $products;
    }
private function getQuoteProducts()
    {
        $products = [];
        $params = $this->_request->getParams();

        if (! isset($params['quote_id']) || ! isset($params['code']) || ! $this->helper->isCodeValid($params['code'])) {
            $this->helper->log('Feefo no quote id or code is set');

            return $products;
        }

        $quoteId = (int) $params['quote_id'];

        $quoteModel = $this->quoteFactory->create();
        $this->quoteResource->load($quoteModel, $quoteId);

        if (! $quoteModel->getId()) {
            return $products;
        }

        $productCollection = $this->review->getProductCollection($quoteModel);

        foreach ($productCollection as $product) {
                $products[$product->getSku()] = $product->getName();
        }
        return $products;
    }
private function getQuoteProducts ( ) { $ products = [ ] ; $ params = $ this -> _request -> getParams ( ) ; if ( ! isset ( $ params [ 'quote_id' ] ) || ! isset ( $ params [ 'code' ] ) || ! $ this -> helper -> isCodeValid ( $ params [ 'code' ] ) ) { $ this -> helper -> log ( 'Feefo no quote id or code is set' ) ; return $ products ; } $ quoteId = ( int ) $ params [ 'quote_id' ] ; $ quoteModel = $ this -> quoteFactory -> create ( ) ; $ this -> quoteResource -> load ( $ quoteModel , $ quoteId ) ; if ( ! $ quoteModel -> getId ( ) ) { return $ products ; } $ productCollection = $ this -> review -> getProductCollection ( $ quoteModel ) ; foreach ( $ productCollection as $ product ) { $ products [ $ product -> getSku ( ) ] = $ product -> getName ( ) ; } return $ products ; }
Get quote products to show feefo reviews.

@return array
Get quote products to show feefo reviews .