0

I want to display recently viewed products on the product detail page with slider.

0

Please check below guide which will help you.

https://amasty.com/knowledge-base/how-to-set-magento-2-recently-viewed-products.html

or you can also do my xml layout to do this

vendor/magento/theme-frontend-luma/Magento_Catalog/layout/catalog_product_view.xml for testing purpose

<referenceContainer name="content">
  <block class="Magento\Reports\Block\Product\Widget\Viewed" after="-" name="recently_viewed" cacheable="false" template="Magento_Reports::widget/viewed/content/viewed_grid.phtml">
    <action method="setPageSize">
       <argument name="page_size" xsi:type="number">4</argument>
    </action>
  </block>
</referenceContainer>

You can add above snippet to catalog_product_view.xml file of your custom theme.

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.