haimbilia Posted April 3, 2016 Share Posted April 3, 2016 hi everyone. i want to let my users the option to add an empty review on a product so i will only get the stars review. in other words: making the subject and comment fields optional. by default it is mendatory, as you can see in the image i added. i use prestashop 1.6.1.4 with the default bootstrap theme this is my site: techbit.co.il thank you, and sorry if i done anything wrong. Link to comment Share on other sites More sharing options...
haimbilia Posted April 3, 2016 Author Share Posted April 3, 2016 anyone? a hint maybe? where to start looking? Link to comment Share on other sites More sharing options...
shokinro Posted April 3, 2016 Share Posted April 3, 2016 you need to remove the validation code from the controller of the page /modules/productcomments/controllers/front/default.php if (!Tools::getValue('title') || !Validate::isGenericName(Tools::getValue('title'))) $errors[] = $module_instance->l('Title is incorrect', 'default'); if (!Tools::getValue('content') || !Validate::isMessage(Tools::getValue('content'))) $errors[] = $module_instance->l('Comment is incorrect', 'default'); You may also consider to use our Agile Product Review modules, it has more features, for example send email to customer ask for reviews after several of order (configurable). 1 Link to comment Share on other sites More sharing options...
haimbilia Posted April 4, 2016 Author Share Posted April 4, 2016 thank you very much for the help. very appreciated! i did what you said. but now if i post an empty review, the submit button will do nothing (no response). it does let me submit it without a title but it wants at least one character in the comment field. Link to comment Share on other sites More sharing options...
haimbilia Posted April 4, 2016 Author Share Posted April 4, 2016 ok so i managed to do it by putting   inside the <textarea> tags, so the field has a space value when you open it. so if anyone want to do it just go to productcomments.tpl and search for this: <textarea id="content" name="content"></textarea> and replace it with this: <textarea id="content" name="content"> </textarea> 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