pabloliracecilio Posted February 16, 2021 Share Posted February 16, 2021 (edited) Prestshop 1.7.7.1 php 7.2 At production environment I call the url https://torretecidos.com.br/module/productcomments/ListComments?id_product=55501261&page=1 and get this at Development enviroment I get correct answer https://torrevermelha.com.br/clean/module/productcomments/ListComments?id_product=55501261&page=1:1 {"comments_nb":2,"comments_per_page":"5","comments":[{"id_product":"55501261","id_product_comment":"651","title":"Indico!","content":"Tecido bonito, brilhoso e o blackout funciona. Coloquei em um quarto e ficou melhor do que eu imaginava.","customer_name":"Rosy","date_add":"05\/12\/17 16:13","grade":"5","firstname":null,"lastname":null,"usefulness":0,"total_usefulness":0},{"id_product":"55501261","id_product_comment":"502","title":"Tecido blackout ","content":"Tecido de qualidade e entrega rápida! \r\nSatisfeito com o produto e com a loja!","customer_name":"Marcelo Vogel ","date_add":"25\/04\/17 15:33","grade":"5","firstname":null,"lastname":null,"usefulness":0,"total_usefulness":0}]} The database of both are equal: at product page, the comment count appears, but they are not listed: Tks in advance Edited February 16, 2021 by pabloliracecilio (see edit history) Link to comment Share on other sites More sharing options...
pabloliracecilio Posted April 16, 2021 Author Share Posted April 16, 2021 Just leaving the fix I had to do so others can save some time: at file modules/productcomments/controllers/front/ListComments;php around line 60 there is: dateFormatter = new \IntlDateFormatter( I swiched that to the date_format aproach, and it worked, like that /**$dateFormatter = new \IntlDateFormatter( $this->context->language->locale, \IntlDateFormatter::SHORT, \IntlDateFormatter::SHORT ); **/ $productComment['customer_name'] = htmlentities($productComment['customer_name']); $productComment['title'] = htmlentities($productComment['title']); $productComment['content'] = htmlentities($productComment['content']); $productComment['date_add'] = date_format($dateAdd,"d/m/Y H:i:s");//$dateFormatter->format($dateAdd); cheers! 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