Skip to content

Commit 8979a7e

Browse files
Hwashiang YuStanislav Idolov
authored andcommitted
MC-3857: Products Content Type is broken on Dynamic Block page
- Added block creation on failed blocked retrieval in product list
1 parent 848e094 commit 8979a7e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

app/code/Magento/CatalogWidget/Block/Product/ProductsList.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,13 @@ public function getProductPriceHtml(
199199

200200
/** @var \Magento\Framework\Pricing\Render $priceRender */
201201
$priceRender = $this->getLayout()->getBlock('product.price.render.default');
202+
if (!$priceRender) {
203+
$priceRender = $this->getLayout()->createBlock(
204+
\Magento\Framework\Pricing\Render::class,
205+
'product.price.render.default',
206+
['data' => ['price_render_handle' => 'catalog_product_prices']]
207+
);
208+
}
202209

203210
$price = '';
204211
if ($priceRender) {

0 commit comments

Comments
 (0)