I have added a code in Magento_Catalog/layout/catalog_product_view.xml

<referenceBlock name="product.info.details">

       <block class="Magento\Reports\Block\Product\Widget\Viewed" name="recently_viewed" template="Magento_Reports::widget/viewed/content/viewed_grid.phtml" group="detailed_info">     
              <argument translate="true" name="title" xsi:type="string">Recently Viewed</argument>
              <argument name="sort_order" xsi:type="string">50</argument>
            <action method="setPageSize">
                    <argument name="page_size" xsi:type="number">4</argument>

The above code showing only the recently viewed tab, but products are not showing.

Here i am attaching the screenshot,

enter image description here

Please anyone look into it and update me. Thanks


Try This :-

<block class="Magento\Catalog\Block\Widget\RecentlyViewed" name="recently_viewed" template="Magento_Catalog::product/widget/viewed/grid.phtml" after="-">
        <argument name="uiComponent" xsi:type="string">widget_recently_viewed</argument>
        <argument name="page_size" xsi:type="number">4</argument>
        <argument name="show_attributes" xsi:type="string">name,image,price,learn_more</argument>
        <argument name="show_buttons" xsi:type="string">add_to_cart,add_to_compare,add_to_wishlist</argument>
  • I am trying include this in tabs, can i use this code? – jafar pinjar Jun 6 '19 at 7:36
  • yes you can try – Rk Rathod Jun 6 '19 at 7:38
  • yes, this working for me, thanks, can we resize the product image there, like upsell prdoucts image size. – jafar pinjar Jun 6 '19 at 7:41
  • please attach screen-shot – Rk Rathod Jun 6 '19 at 7:49
  • thanks, i made it working.. – jafar pinjar Jun 6 '19 at 8:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.