Mariano Posted March 10, 2019 Report Posted March 10, 2019 Hello, i wanted to see if there is some way to set the language and currency in the URL (GET parameter). Right now, I have a multilanguage and multicurrency Website, that links to WHMCS. When the user goes to order, login into the account, register, or anything related to the billing system, i send them to (as example): domain.com/cart.php?currency=Spanish¤cy=3 (so he see the billing system in spanish and prices in the particular currency. I can't find how to implement this in Blesta. It doesn't support a similar functionality. I was checking the source code too (for see how language works), and it looks like the core language part for example, is inside the 1% encrypted code (correct me if i am wrong), or i am not finding it. Is there some way to implement this? Thank you, regards. Quote
activa Posted March 11, 2019 Report Posted March 11, 2019 Search the forum, this subject already disucces many times, also a plugin from blesta addons has this option to change language from url . Quote
Blesta Addons Posted March 11, 2019 Report Posted March 11, 2019 11 hours ago, activa said: Search the forum, this subject already disucces many times, also a plugin from blesta addons has this option to change language from url . we have two plugins, the first one is multilanguages is released, the second one is not yet released, is one used by two clients and you one of them .maybe we will release it soon . Quote
Mariano Posted March 11, 2019 Author Report Posted March 11, 2019 13 hours ago, activa said: Search the forum, this subject already disucces many times, also a plugin from blesta addons has this option to change language from url . Hello, thank you. I have searched in forums, all posts i have seen send OPs to the blesta addons plugin. I was seraching if there is some included feature or some tip about how to implement this because that part of code isn't unencrypted (to check how combobox that change that works). If there is some post that has a closer solution I will be glad if you point it! 1 hour ago, Blesta Addons said: we have two plugins, the first one is multilanguages is released, the second one is not yet released, is one used by two clients and you one of them .maybe we will release it soon . Thank you, i have seen your modules. But i don't understand at 100% the subscription model and is not compatible with multi-company (you need a suscription for every company). So for now is not an option to me at this moment. Maybe in the near future! Regards! Quote
Michael Kinder Posted April 17, 2019 Report Posted April 17, 2019 You can set the currency in the URL by appending currency=USD Of course you can change the currency code if you desire. Please make note that you actually have to have the currency set as active in Blesta in order for this to work. So, for example: https://yourdomain.com/blesta/order/config/index/hosting/?currency=USD OR https://yourdomain.com/blesta/order/config/index/hosting/?group_id=2&pricing_id=4¤cy=USD I haven't tried the language part, but I assume there is probably a similar method. I have it working on my site with GeoIP multi-currency if you want to test that it works. Quote
Paul Posted April 19, 2019 Report Posted April 19, 2019 There's a dropdown to set the language if you have multiple languages installed. Right now this can't be set as a URL parameter, but it's something we're considering. However, it probably wouldn't be difficult to check for a GET parameter and then set the language similarly to the way the dropdown works. Quote
Mariano Posted April 22, 2019 Author Report Posted April 22, 2019 On 4/16/2019 at 9:01 PM, Michael Kinder said: You can set the currency in the URL by appending currency=USD Of course you can change the currency code if you desire. Please make note that you actually have to have the currency set as active in Blesta in order for this to work. So, for example: https://yourdomain.com/blesta/order/config/index/hosting/?currency=USD OR https://yourdomain.com/blesta/order/config/index/hosting/?group_id=2&pricing_id=4¤cy=USD I haven't tried the language part, but I assume there is probably a similar method. I have it working on my site with GeoIP multi-currency if you want to test that it works. It is not working on my side. Maybe do you have some additional plugin installed (like the blesta-addons one)? On 4/19/2019 at 8:13 PM, Paul said: There's a dropdown to set the language if you have multiple languages installed. Right now this can't be set as a URL parameter, but it's something we're considering. However, it probably wouldn't be difficult to check for a GET parameter and then set the language similarly to the way the dropdown works. Please consider it. I bet it is easy to implement ?. I correct my first message, i see an error now. Where i said: "currency=Spanish¤cy=3", I meant: "language=Spanish¤cy=3" Regards. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.