Prestashop: error in module Viewed products block v1.2.0

Created on 7 Dec 2018  路  16Comments  路  Source: PrestaShop/PrestaShop

Prestashop 1.7.4.4
with this module installed I've now this error:
(1/1) ClassNotFoundException
Attempted to load class "ProductListingPresenter" from namespace "PrestaShop\PrestaShop\Adapter\Presenter\Product".
Did you forget a "use" statement for "PrestaShop\PrestaShop\Core\Product\ProductListingPresenter"?

in聽ps_viewedproduct.php聽line 269

at聽Ps_Viewedproduct->getViewedProducts()in聽ps_viewedproduct.php聽line 219

1.7.4.4 Bug FO Fixed Major Viewed products

Most helpful comment

to solve the issue, replace in the top of the file the line

//use PrestaShop\PrestaShop\Adapter\Presenter\Product\ProductListingPresenter;
use PrestaShop\PrestaShop\Core\Product\ProductListingPresenter;

All 16 comments

Hi @centoasa,

Thanks for your report.
I manage to reproduce the issue with PS1.7.4.4 & ps_viewedproduct v1.2.0
image
We will see how to fix it.

I tried with ps_viewedproduct v1.2.0 & PS1.7.5.0rc1 and it is ok.
Thanks!

To visualize the issue, we need to enable the debug mode.
Thanks!

@khouloudbelguith last message was for me?
I'm sorry but my website is in production, so I can't enable module and show error in product page

@centoasa, no.
Just to reproduce the issue, we need to enable the debug mode.
Thanks!

Me the same, I follow this topic and keep looking the way to fix it.

to solve the issue, replace in the top of the file the line

//use PrestaShop\PrestaShop\Adapter\Presenter\Product\ProductListingPresenter;
use PrestaShop\PrestaShop\Core\Product\ProductListingPresenter;

Thx. Works for me. The same problem on 1.7.2

Thx. Works for us to. The same problem on 1.7.4.4,Multistore
It was a big issue for us, because the customers could not put anything or only 1 product in de the shopping cart. After a long search, found this solution, the first thought we had was a cookie or cache problem.

Hi @shacker2,

Would you be willing to make a pull request on GitHub with your code suggestion?
https://github.com/PrestaShop/ps_viewedproduct/
Thank you!

I don't understand why with the patch of @shacker2 I've an error500 when I see more than 1 product

@centoasa, if you enable the debug mode, is there any exceptions displayed?
Thanks!

done

to solve the issue, replace in the top of the file the line

//use PrestaShop\PrestaShop\Adapter\Presenter\Product\ProductListingPresenter;
use PrestaShop\PrestaShop\Core\Product\ProductListingPresenter;

Thanks for the help. It solved my problem in 1.7.3.2

with latest release 1.2.1 of this module I've still this error: https://1drv.ms/t/s!AnkbspQIR_C67GifIkwDNUAzglgz
Already patched with https://github.com/PrestaShop/PrestaShop/issues/11655#issuecomment-450387405

@centoasa Hi, it seems you have an error in themes/leo_emarket/templates/catalog/_partials/miniatures/product.tpl
This file is provided by third party, contact the developper of your theme on Addons MarketPlace.

Was this page helpful?
0 / 5 - 0 ratings