mysho Posted January 25, 2017 Share Posted January 25, 2017 I am not able to find the way how to translate error messages. In this case I am trying to find where the message "You have not reached the minimum amount required to use this voucher" is. This message shows in the shopping cart when you try to use a voucher, but you have not reached the minimum amount of your order. Does anyone have any idea? PS 1.7.0.3 THX! Link to comment Share on other sites More sharing options...
mysho Posted February 9, 2017 Author Share Posted February 9, 2017 (edited) Any idea where to translate error messages? I don't care if it's in the BO, DB or hardcode. //edit: I have found some phrases in /web/controllers/front/CartController.php, but this message "You have not reached the minimum amount required to use this voucher" isn't there. Edited February 9, 2017 by mysho (see edit history) Link to comment Share on other sites More sharing options...
rocky Posted February 10, 2017 Share Posted February 10, 2017 I searched PrestaShop v1.7.0.4 and found that message on line 701 of classes/CartRule.php: return (!$display_error) ? false : Tools::displayError('You have not reached the minimum amount required to use this voucher'); In PrestaShop v1.6, it's translated in translations\en\errors.php like the following: $_ERRORS['dc0c81278849e0f6a297e93c935e465d'] = 'You have not reached the minimum amount required to use this voucher'; Unfortunately, PrestaShop v1.7 uses a different translation system, so I don't know how to manually add a translation. PrestaShop wrote here that they are expanding the translation scope in PrestaShop v1.7.1.0 next month, so hopefully, it will become translatable then. Link to comment Share on other sites More sharing options...
mysho Posted February 10, 2017 Author Share Posted February 10, 2017 Ohh, thanks. God bless you! How did you find it? Link to comment Share on other sites More sharing options...
rocky Posted February 11, 2017 Share Posted February 11, 2017 I used Adobe Dreamweaver to search my entire PrestaShop v1.7.0.4 test site for the string. It's one of my favourite tools, since it makes it easy to find hidden strings. 1 Link to comment Share on other sites More sharing options...
mysho Posted February 13, 2017 Author Share Posted February 13, 2017 Thanks. I tried the same way via Windows search, but it didn't work. I will try Dreamweaver next time. Thank you again for the useful advice. Link to comment Share on other sites More sharing options...
jugalfas Posted May 6, 2021 Share Posted May 6, 2021 (edited) Sir i want to show a translatable error message in form. means when customer choose different language and submit form error show in that language which is he choose. so how can we do that? i have to use $this->trans('error message'); something like this? Thanks if you can help me. ♥ Edited May 6, 2021 by jugalfas (see edit history) 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