0

I need to do a check if there is any recently viewed product and if so, then need to display some text.

Does anyone know, how to check if there are recently viewed products?

0

There is a getCount() method in block here \Magento\Reports\Block\Product\Widget\Viewed and used in module-reports/view/frontend/templates/product/widget/viewd.phtml

  • it return how many products are viewed But not return each product how many time viewed as shown on Dashboard when we click on Most Viewed Product Tab. – HaFiz Umer Sep 17 at 5:45

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.