We need to show many types of icon or badge in product grid or list area.
public function install()
{
return (parent::install() &&
$this->registerHook('displayProductPriceBlock'));
}
public function renderWidget($hookName, array $params)
{
if ( $hookName == 'displayProductPriceBlock' && $params['type'] != 'after_price') {
return false;
}
return'<div class="product-features-block"> Test B</div>';
}
<style type="text/css">.product-features-block {
background-color: yellow;
padding: 5px;
width: 60px;
position: absolute;
top: -100px;
}</style>