mushegh Posted June 14, 2016 Share Posted June 14, 2016 Hi, I have two questions regarding URLs and languages and will appreciate any help. Prestashop generates SEO friendly URLs when the option is turned on, however whenever I change the page name it rewrites the URL again. I need so that once the URL is set (manually or automatically) it can't change when I change the page name. The change can be done only manually. Any chance to do that. Second question is - adding lang file (theme -> lang - > lang.php file) had very weird effect on the site. Whatever I had translated before (product names and product titles) all disappeared. It's like it reset all things for that language. Is that possible? Thanks beforehand. I really need help for the first one. Link to comment Share on other sites More sharing options...
rocky Posted June 15, 2016 Share Posted June 15, 2016 For your first question, assuming you're using PrestaShop v1.6.1.5, it is lines 42-43 of admin/themes/default/controllers/products/input_text_lang.tpl that copies the product name to the friendly URL: onkeyup="if (isArrowKey(event)) return ;updateFriendlyURL();" onblur="updateLinkRewrite();" I suggest that you override the file and then change those lines to: {if isset($smarty.get.add_product)} onkeyup="if (isArrowKey(event)) return ;updateFriendlyURL();" onblur="updateLinkRewrite();" {/if} This will make it so the friendly URL is only updated when adding a new product. Link to comment Share on other sites More sharing options...
ant.jullien Posted December 13, 2021 Share Posted December 13, 2021 @rocky I'm looking to fix the same issue in Prestashop 1.7 do you have any idea in which file I can find it ? Thanks ! 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