This repository was archived by the owner on Apr 29, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
app/code/Magento/CatalogWidget/Block/Product Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ public function getProductPriceHtml(
198198 ? $ arguments ['display_minimal_price ' ]
199199 : true ;
200200
201- /** @var \Magento\Framework\Pricing\Render $priceRender */
201+ /** @var \Magento\Framework\Pricing\Render $priceRender */
202202 $ priceRender = $ this ->getLayout ()->getBlock ('product.price.render.default ' );
203203 if (!$ priceRender ) {
204204 $ priceRender = $ this ->getLayout ()->createBlock (
@@ -347,7 +347,7 @@ public function getPagerHtml()
347347 if (!$ this ->pager ) {
348348 $ this ->pager = $ this ->getLayout ()->createBlock (
349349 \Magento \Catalog \Block \Product \Widget \Html \Pager::class,
350- ' widget.products.list.pager '
350+ $ this -> getWidgetPagerBlockName ()
351351 );
352352
353353 $ this ->pager ->setUseContainer (true )
@@ -408,4 +408,19 @@ private function getPriceCurrency()
408408 }
409409 return $ this ->priceCurrency ;
410410 }
411+
412+ /**
413+ * @return string
414+ */
415+ private function getWidgetPagerBlockName ()
416+ {
417+ $ pageName = $ this ->getData ('page_var_name ' );
418+ $ pagerBlockName = 'widget.products.list.pager ' ;
419+
420+ if (!$ pageName ) {
421+ return $ pagerBlockName ;
422+ }
423+
424+ return $ pagerBlockName . '. ' . $ pageName ;
425+ }
411426}
You can’t perform that action at this time.
0 commit comments