Block/Feefo.php
public function getProductsReview($check = true)
    {
        $reviews = [];
        $logon = $this->helper->getFeefoLogon();
        $limit = $this->helper->getFeefoReviewsPerProduct();
        $products = $this->getQuoteProducts();

        foreach ($products as $sku => $name) {
            $url = 'http://www.feefo.com/feefo/xmlfeed.jsp?logon=' . $logon
                . '&limit=' . $limit . '&vendorref=' . $sku
                . '&mode=productonly';
            $doc = $this->domDocument;
            $xsl = $this->processor;
            if ($check) {
                $pathToTemplate = $this->getFeefoTemplate('feedback.xsl');
                $doc->load($pathToTemplate);
            } else {
                $pathToTemplate = $this->getFeefoTemplate('feedback-no-th.xsl');
                $doc->load($pathToTemplate);
            }
            $xsl->importStyleSheet($doc);
            $doc->loadXML(file_get_contents($url));
            $productReview = $xsl->transformToXML($doc);
            if (strpos($productReview, '<td') !== false) {
                $reviews[$name] = $xsl->transformToXML($doc);
            }
            $check = false;
        }

        return $reviews;
    }
public function getProductsReview($check = true)
    {
        $reviews = [];
        $logon = $this->helper->getFeefoLogon();
        $limit = $this->helper->getFeefoReviewsPerProduct();
        $products = $this->getQuoteProducts();

        foreach ($products as $sku => $name) {
            $url = 'http://www.feefo.com/feefo/xmlfeed.jsp?logon=' . $logon
                . '&limit=' . $limit . '&vendorref=' . $sku
                . '&mode=productonly';
            $doc = $this->domDocument;
            $xsl = $this->processor;
            if ($check) {
                $pathToTemplate = $this->getFeefoTemplate('feedback.xsl');
                $doc->load($pathToTemplate);
            } else {
                $pathToTemplate = $this->getFeefoTemplate('feedback-no-th.xsl');
                $doc->load($pathToTemplate);
            }
            $xsl->importStyleSheet($doc);
            $doc->loadXML(file_get_contents($url));
            $productReview = $xsl->transformToXML($doc);
            if (strpos($productReview, '<td') !== false) {
                $reviews[$name] = $xsl->transformToXML($doc);
            }
            $check = false;
        }

        return $reviews;
    }
public function getProductsReview ( $ check = true ) { $ reviews = [ ] ; $ logon = $ this -> helper -> getFeefoLogon ( ) ; $ limit = $ this -> helper -> getFeefoReviewsPerProduct ( ) ; $ products = $ this -> getQuoteProducts ( ) ; foreach ( $ products as $ sku => $ name ) { $ url = 'http://www.feefo.com/feefo/xmlfeed.jsp?logon=' . $ logon . '&limit=' . $ limit . '&vendorref=' . $ sku . '&mode=productonly' ; $ doc = $ this -> domDocument ; $ xsl = $ this -> processor ; if ( $ check ) { $ pathToTemplate = $ this -> getFeefoTemplate ( 'feedback.xsl' ) ; $ doc -> load ( $ pathToTemplate ) ; } else { $ pathToTemplate = $ this -> getFeefoTemplate ( 'feedback-no-th.xsl' ) ; $ doc -> load ( $ pathToTemplate ) ; } $ xsl -> importStyleSheet ( $ doc ) ; $ doc -> loadXML ( file_get_contents ( $ url ) ) ; $ productReview = $ xsl -> transformToXML ( $ doc ) ; if ( strpos ( $ productReview , '<td' ) !== false ) { $ reviews [ $ name ] = $ xsl -> transformToXML ( $ doc ) ; } $ check = false ; } return $ reviews ; }
Get product reviews from feefo.

@param bool $check

@return array
Get product reviews from feefo .