juanrojas Posted September 10, 2020 Share Posted September 10, 2020 hi guys I need help, what happens is the following: Our store sells in US dollars and euros, we have it like this because we are connected to google shopping and according to the documentation we can only campaign in the United States if our store works with dollars When doing the google ads campaign for the United States, the documentation says that we have to remove the currency ( Noindex: / *? id_currency= ) from our robots.txt, so our campaign works fine the problem is prestashop and its url that first when you activate this is not friendly at all. example and second and more serious is that the return link is lost for example in the source code of the page below, it is stated this is the Spanish version of the site "https://janabebe.com/es/?SubmitCurrency=1&id_currency=1" hreflang="es">: https://janabebe.com/es/?SubmitCurrency=1&id_currency=1 You also can see a link, that the English version of a website is located there: https://janabebe.com/en/?SubmitCurrency=1&id_currency=1 If we open the English version of a page and check the source code again, we'll see that the link to the Spanish version of a page this time leads to a different page than the first one: https://janabebe.com/es/?SubmitCurrency=1&%3Bid_currency=1 In the end we're having the discrepancy between 2 URLs: https://janabebe.com/es/?SubmitCurrency=1&id_currency=1 and https://janabebe.com/es/?SubmitCurrency=1&amp%3Bid_currency=1 Such an issue can happen due to poorly written parameters or errors in the source code. And this is why WebSite Auditor shows that you don't have a return link on this page. Is there any solution for this? How should it work with two currencies and that the url works well? Link to comment Share on other sites More sharing options...
_tech Posted September 10, 2020 Share Posted September 10, 2020 Hello, Your shop seems to use a module for "pretty url" without id in product page. Do you know which module it is ? Or did you modify the source code of Prestashop ? It could change several things... Link to comment Share on other sites More sharing options...
juanrojas Posted September 10, 2020 Author Share Posted September 10, 2020 modul Link to comment Share on other sites More sharing options...
_tech Posted September 10, 2020 Share Posted September 10, 2020 Ok, i think we'll need to get into code to find solutions. There could be bugs in your theme or/and your langage/currency selector module AND we need to know what your "removing ids module" is really doing. You can send me a private message, I could check what is going wrong. Link to comment Share on other sites More sharing options...
juanrojas Posted September 10, 2020 Author Share Posted September 10, 2020 what you tell me is not possible I have entered another topic and they have the same problem, it seems that the problem is from prestashop https://prnt.sc/uesznk https://prnt.sc/uet00f https://prnt.sc/uet43p https://prnt.sc/uet4bc here rather I would say do you know any store that does not do this? Link to comment Share on other sites More sharing options...
_tech Posted September 10, 2020 Share Posted September 10, 2020 This is not "a problem", the SubmitCurrency parameter is send to ps_currencyselector to set the currency of the cookie. This is the native way of Prestashop. Without it, Prestashop is getting the currency from the cookie. No way to set it via "special" friendly url like "/fr/eur" of "/us/usd". Is it what are you searching for ? Anyway, links in your screenshots are generated by head.tpl of themes which use getAlternativeLangsUrl() from FrontController (and Link classes getLanguageLink). If your module override url link generation (it does), it can be tricky to change that. An easy and not very good option could be to set manually theses link in head.tpl but you can't add something in the url to set the currency except SubmitCurrency. Link to comment Share on other sites More sharing options...
juanrojas Posted September 10, 2020 Author Share Posted September 10, 2020 The url can stay like this, I already imagined that it could not be made friendly, the problem is that 2 different urls are being generated for the same currency, this should not be like that, or what is the sense of doing this? in the screenshots I send you can see clearly Link to comment Share on other sites More sharing options...
_tech Posted September 10, 2020 Share Posted September 10, 2020 Two urls for the same currency, not really because %3B is a semicolon, it's just & where (i don't known why), the semicolon is encoded. This %3B doesn't show up in my browser (Firefox / Chrome) in the source of the page But, I saw weird bug in your shop : Url parameters are added twice. (click on EUR, click on USD, click on EUR). (probably an other problem...) Like i said, the easy way is to edit head.tpl template and set urls or/and with a custom module. A good thing would be also to switch currency without changing url by using AJAX request (improve currency selector module). Link to comment Share on other sites More sharing options...
juanrojas Posted September 10, 2020 Author Share Posted September 10, 2020 Exactly, I think that would be the solution, that the url does not change, when the user changes the currency Link to comment Share on other sites More sharing options...
_tech Posted September 10, 2020 Share Posted September 10, 2020 6 minutes ago, juanrojas said: Exactly, I think that would be the solution, that the url does not change, when the user changes the currency But urls 'alternate' in HEAD will still have currency parameter. I don't think it's useful, don't you ? When Google go to this page, the default currency will be selected, so what is the point of overriding it there ? Link to comment Share on other sites More sharing options...
juanrojas Posted September 10, 2020 Author Share Posted September 10, 2020 https://addons.prestashop.com/es/internacionalizacion-localizacion/7363-auto-cambio-de-idioma-y-moneda-geolocalizacion.html I am consulting with this module to see if it can help with something Link to comment Share on other sites More sharing options...
_tech Posted September 10, 2020 Share Posted September 10, 2020 Ok. Please tell me if it helps or not. The best thing to do should be to define precisely what behaviour you want to have and create a custom module or/and edit the theme to do that. To add a module and add another, and another is rarely a good thing. One module to do only one custom thing else you'll end up with 300 modules... Link to comment Share on other sites More sharing options...
juanrojas Posted September 10, 2020 Author Share Posted September 10, 2020 they tell me "Those URLs are generated by the currency selector. What our module does is adapt the currency to the customer's location. For example, a customer from the USA will see the store in dollars directly, a customer from Europe in euros, and so on with the currencies installed in the store. When the module sets the currency, it does not generate those URLs, but if once established the client uses the currency selector to change it (although in theory it shouldn't because it would already be "its" currency), it will generate those URLs." Link to comment Share on other sites More sharing options...
juanrojas Posted September 10, 2020 Author Share Posted September 10, 2020 https://github.com/PrestaShop/PrestaShop/issues/9481 I think this talks a bit about the issue and from what I see if it is a prestashop problem that is already more than reported and they do not solve it Link to comment Share on other sites More sharing options...
juanrojas Posted September 10, 2020 Author Share Posted September 10, 2020 And from what I am reviewing, this did not happen in prestashop 1.6, how many more years for prestashop 1.7 to be ready? it's quite an enigma Link to comment Share on other sites More sharing options...
juanrojas Posted September 10, 2020 Author Share Posted September 10, 2020 The solution is logical, deactivate the ads campaign for the United States and deactivate the currencies. We have a lot of SEO work and clearly this affects a lot. Link to comment Share on other sites More sharing options...
_tech Posted September 10, 2020 Share Posted September 10, 2020 11 minutes ago, juanrojas said: And from what I am reviewing, this did not happen in prestashop 1.6, how many more years for prestashop 1.7 to be ready? it's quite an enigma Maybe it was fixed and with a new version the issue came back. Link to comment Share on other sites More sharing options...
_tech Posted September 10, 2020 Share Posted September 10, 2020 6 minutes ago, juanrojas said: The solution is logical, deactivate the ads campaign for the United States and deactivate the currencies. We have a lot of SEO work and clearly this affects a lot. It could be fixed, but with custom dev / adapt currency selector module. Link to comment Share on other sites More sharing options...
juanrojas Posted September 10, 2020 Author Share Posted September 10, 2020 I have my doubts this has been reported 2 years ago and it seems that they have planned for 1.7.7 Link to comment Share on other sites More sharing options...
_tech Posted September 10, 2020 Share Posted September 10, 2020 (edited) 1 hour ago, juanrojas said: I have my doubts this has been reported 2 years ago and it seems that they have planned for 1.7.7 For the issue with doublon in url it's very easy to fix, just copy and replace ps_currencyselector.php in the module directory with the one in github : https://raw.githubusercontent.com/jolelievre/ps_currencyselector/1b2422a1ec3e1708778695436d63e89917bbc9e2/ps_currencyselector.php Planned for 1.7.7 but you can already fix it if you want. I tested in a test shop it's working. Edited September 10, 2020 by _tech (see edit history) Link to comment Share on other sites More sharing options...
juanrojas Posted September 14, 2020 Author Share Posted September 14, 2020 I've tried it and it doesn't work, it still works the same Link to comment Share on other sites More sharing options...
_tech Posted September 14, 2020 Share Posted September 14, 2020 1 hour ago, juanrojas said: I've tried it and it doesn't work, it still works the same For the "doublon bug", It works but it's not for the "duplicates" urls. 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