renaud2263 Posted August 25, 2021 Share Posted August 25, 2021 Hi All, I need to add informations from my own tables on the product listing on category page. What could be the best way to do ? How modify the SQL request to add some LEFT JOIN request to get additionnal infos in my product.tpl ? Many thanks in advance ! Link to comment Share on other sites More sharing options...
renaud2263 Posted August 25, 2021 Author Share Posted August 25, 2021 Hello, yes ! I need to get customer reviews from another table and display them on the product's miniatures on category page (stars) Link to comment Share on other sites More sharing options...
renaud2263 Posted August 26, 2021 Author Share Posted August 26, 2021 My reviews are managed by a module, but yes, it's exactly what I'm searching to do...But where can I use WHERE reviews_table.id_product=this_id_product ? I need to build a new module and hook it on "ProductReviews" ? And in this hook I must write this request ? Sorry I don't really understand... Link to comment Share on other sites More sharing options...
SmartDataSoft Posted August 26, 2021 Share Posted August 26, 2021 @renaud2263 At first you need to told the module name and their table structure name and files, then community member can give you the full sql correctly if you are not expert. You find the table name and filed name and relation ship with theme and in your custom module you need class via PrestaShop DB class and then send the result data in ProductReviews hook. If you can share the module then any community member can help. Without know no one can help as you are not expert to find where you need to put the code and how to do Thank you Link to comment Share on other sites More sharing options...
renaud2263 Posted August 26, 2021 Author Share Posted August 26, 2021 @ndiaga @SmartDataSoft Ok, I will do that. Thanks for your help. Have a nice day ! 1 Link to comment Share on other sites More sharing options...
renaud2263 Posted August 26, 2021 Author Share Posted August 26, 2021 @ndiaga so in the hook function I need to write this piece of request ? with which Db method ? And I also have to Db execute and return the result ? Could you show me an example ? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now