In magento 2, I've created a recently viewed items using Magento Reports block. Now I need to show prices for only registered users.
I have 2 problems,
price is rendered by following php code,
echo $block->getProductPriceHtml( $_item, \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, [ 'price_id_suffix' => '-' . $type ] );
When it renders, chrome inspector shows multiple div classes and spans, which makes my css obsolete. I need to just get the price value given from above block and put inside my own div block. How can I do that? From where this price comes from?
please help me