Jump to content
Mariano

Set language and currency in the URL

Recommended Posts

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&currency=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.

Share this post


Link to post
Share on other sites
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 .

 

Share this post


Link to post
Share on other sites
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! 

Share this post


Link to post
Share on other sites

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&currency=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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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&currency=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&currency=3",

I meant: "language=Spanish&currency=3"

Regards.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...