Can anyone tell me how can I show a recently viewed product section in the customer account sidebar?
Any help would be appreciated.
Thanks in advance..!
I have done using below way
app/design/frontend/vendorname/themename/Magento_Customer/layout/default.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="sidebar.additional">
<block class="Magento\Reports\Block\Product\Widget\Viewed" before="-" name="recently_viewed" cacheable="false" template="Magento_Reports::widget/viewed/content/viewed_grid.phtml">
<action method="setPageSize">
<argument name="page_size" xsi:type="number">5</argument>
</action>
</block>
</referenceContainer>
</body>
</page>