Jump to content

[SOLVED] [PrestaShopDatabaseException] best-sales


Recommended Posts

Hi,

 

check you sql-query, your "IN" parametr has wrong content becose starting from "," (AND p.`id_product` IN (,8,9,10...)

 

Regards

 

Hi Alexander,

thank you for your replay. I'm not good at coding, so  please, can you tell me what exactly I should to do?

Link to comment
Share on other sites

THat IN statement is broken, look:

 

IN (,8,9,1

 

It can't start with a comma, are you using any third party module for this page?

hi Nemo1,

no, I do not use third party module for this page. How I should fix this issue, in which file is that?

Link to comment
Share on other sites

Thank you Nemo1 it helped :)

but for other who have same problem, for clarity file is classes/ProductSale.php there is two plases with code:

AND p.`id_product` IN ('.$ids.')

and in first plase replace that code with:

AND p.`id_product` IN ('.ltrim($ids,',').')
  • Like 1
Link to comment
Share on other sites

  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...