CDArreda Posted April 22, 2017 Share Posted April 22, 2017 On Back offce, go to add new order and when put a name for searching a customer, nothing happens. I tried prestashop 1.7.1 and 1.7.1.1 on local environment with wamp3 and wamp2, on Firefox, IE and Chrome. 1 Link to comment Share on other sites More sharing options...
CDArreda Posted April 22, 2017 Author Share Posted April 22, 2017 I found the error. When a value label present a single quote (') in the transaltion, we have a JS error like this: SyntaxError: missing ; before statement If you open the template file: \admin\themes\default\template\controllers\orders\form.tpl you can find the declaration of: html_orders += '<a href="{$link->getAdminLink('AdminOrders')}&id_order='+this.id_order+'&vieworder&liteDisplaying=1#" title="{l s='View this order'}" class="fancybox btn btn-default"><i class="icon-search"></i> {l s="Details"}</a>'; that translated in italian become: html_orders += '<a href="http://localhost/prestashop/bo/index.php?controller=AdminOrders&token=c1980aec5cab38a5f49a8030411be7e8&id_order='+this.id_order+'&vieworder&liteDisplaying=1#" title="Vedi quest'ordine" class="fancybox btn btn-default"><i class="icon-search"></i> Dettagli</a>'; removing the single quote all works fine. PS: there are another two points affected by this issue: html_orders += ' <a href="#" "title="{l s='Duplicate this order'}" class="duplicate_order btn btn-default" rel="'+this.id_order+'"><i class="icon-arrow-right"></i> {l s="Use"}</a>'; and $('#addresses_err').show().html('{l s='You must add at least one address to process the order.'}'); 1 Link to comment Share on other sites More sharing options...
Alithrarion Posted September 29, 2017 Share Posted September 29, 2017 I found the error. When a value label present a single quote (') in the transaltion, we have a JS error like this: SyntaxError: missing ; before statement If you open the template file: \admin\themes\default\template\controllers\orders\form.tpl you can find the declaration of: html_orders += '<a href="{$link->getAdminLink('AdminOrders')}&id_order='+this.id_order+'&vieworder&liteDisplaying=1#" title="{l s='View this order'}" class="fancybox btn btn-default"><i class="icon-search"></i> {l s="Details"}</a>'; that translated in italian become: html_orders += '<a href="http://localhost/prestashop/bo/index.php?controller=AdminOrders&token=c1980aec5cab38a5f49a8030411be7e8&id_order='+this.id_order+'&vieworder&liteDisplaying=1#" title="Vedi quest'ordine" class="fancybox btn btn-default"><i class="icon-search"></i> Dettagli</a>'; removing the single quote all works fine. PS: there are another two points affected by this issue: html_orders += ' <a href="#" "title="{l s='Duplicate this order'}" class="duplicate_order btn btn-default" rel="'+this.id_order+'"><i class="icon-arrow-right"></i> {l s="Use"}</a>'; and $('#addresses_err').show().html('{l s='You must add at least one address to process the order.'}'); Hi! I have the same problem, I'm not sure I've applied the suggestion well. I also have an PS 1.7.1.2 italian installation. Can you help me or send me the correct form.tpl file? Thx Matteo Link to comment Share on other sites More sharing options...
AleAmici Posted February 13, 2018 Share Posted February 13, 2018 I had the same problem! I'm Italian. How can I warn the developers of the bug?? This is a major bug. Italian it's not the only language that use quote in translations Link to comment Share on other sites More sharing options...
motion2082 Posted July 11, 2019 Share Posted July 11, 2019 Having the same issue in PS1.6.1.24 but this modification didn't fix. No JS errors showing up. Any suggestions? Link to comment Share on other sites More sharing options...
Alithrarion Posted July 11, 2019 Share Posted July 11, 2019 26 minutes ago, motion2082 said: Having the same issue in PS1.6.1.24 but this modification didn't fix. No JS errors showing up. Any suggestions? I'm sorry, it's been a long time and I can't remember how we solved it. I suggest you make a big backup and try to update PS to a newer version. Link to comment Share on other sites More sharing options...
motion2082 Posted July 11, 2019 Share Posted July 11, 2019 14 minutes ago, Alithrarion said: I'm sorry, it's been a long time and I can't remember how we solved it. I suggest you make a big backup and try to update PS to a newer version. Bugger, not an option to update PS at this stage Link to comment Share on other sites More sharing options...
Kert L Posted July 11, 2019 Share Posted July 11, 2019 1 hour ago, motion2082 said: Having the same issue in PS1.6.1.24 but this modification didn't fix. No JS errors showing up. Any suggestions? I imported Italian language pack and i can see the single quote, but i can not seem to reproduce this error. Do you have a demo or development environment? Link to comment Share on other sites More sharing options...
motion2082 Posted July 11, 2019 Share Posted July 11, 2019 55 minutes ago, Kert L said: I imported Italian language pack and i can see the single quote, but i can not seem to reproduce this error. Do you have a demo or development environment? Hi Kert, I have a development site, how did you go about importing the language pack? Link to comment Share on other sites More sharing options...
Kert L Posted July 11, 2019 Share Posted July 11, 2019 Could I have access there or you would rather not give it? And as for language pack. I went Localization -> Localization -> IMPORT A LOCALIZATION PACK, then changed my language to Italian. Link to comment Share on other sites More sharing options...
Famke Posted March 1, 2021 Share Posted March 1, 2021 (edited) Same issue in version 1.7.7.2 These are the errors in my console, I can't search for a client either. I don't think your problem will fix mine? I copied the orders folder from my backup because it wasn't there in my folder controllers. Edited March 1, 2021 by Famke (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