I created a preference for the block Magento\Catalog\Block\Product\ListProduct to add a specific product at the begining of the collection in getLoadedProductCollection(). Almost everything is well displayed except the price.

public function getLoadedProductCollection()
        $originalCollection= parent::getLoadedProductCollection();
        $featuredProduct = $this->productFactory->create()->load(18); //test productId
        if ($this->_request->getFullActionName() !== 'catalogsearch_result_index' || !$featuredProduct) {
            return $originalCollection;

        $newCollection = clone $originalCollection;

        try {
            if($featuredProduct->getId()) {
            foreach ($originalCollection as $item) {
                if ($item->getId() != $featuredProduct->getId()) {
        } catch (\Exception) {}
        return $newCollection;

I'm not sure why in list.phtml, $block->getProductPrice($_product) return an empty string only for this product. The rest of the catalog is working normally.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.