You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Florin Popa <fl...@gmail.com> on 2009/01/29 19:28:17 UTC

Change Language in Ofbiz

Hello,

Please help me with the following issue described below.

Problem :

How to implement functionality to be able to stay on the same page after the
user change language (http, https)

Details:

In order to be able to change the language and return to the same page the
last user action before change language should be saved entirely to redirect
the user back to it.

What I tried was to keep the last url accessed before change language along
with the parameters used (for reproducing entirely the last state before
change language was accessed), and after change the language to redirect the
user to this url.

The problem appeared when for example you add an item to cart from a product
page and the user is kept on the same page after the item is added. The last
accessed url in this case was add to cart and after the user changes his
language the response was redirected to the add to cart url.

Another problem was that when you log into the application you enter in an
https area and the url is created with https but the parameters from the
last request are present in the url after redirect which is not desired.



Thanks,
 Flopa


Re: Change Language in Ofbiz

Posted by Heidi Dehaes <in...@gmail.com>.
Hello,

I thought hosting more shops under the same ofbiz instance in ofbiz 4.0 was
already implemented, isn't it?

Heidi
www.olagos.eu

2009/1/30 Florin Popa <fl...@gmail.com>

> Hi,
>
> Thanks for both replies. We will try it and if possible to improve
> something, of course we can share it.
> We are a team working on customization of e-commerce since almost a year.
> Soon I can share a demo as well as some additional development like advanced
> Ebay integration or ajax based shopping cart refresh..
> Another interesting topic we had to implement ourselves (hosting more shops
> under the same ofbiz instance as well as admin users controlling at the same
> time more shops)
>
> Best regards,
> Flopa
>
>
>> For a pattern of how to do this check out the add to cart request (and
>> more importantly how it is used in productdetail and other templates) which
>> does support staying on the same page, even though the request is always the
>> same it goes to different views when it is done.
>>
>> -David
>>
>>
>>
>> On Jan 29, 2009, at 11:39 AM, BJ Freeman wrote:
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> I ask this when it was first implemented.
>>> it was designed to reset.
>>> it would take a lot of rethink to not do this, from what I saw of the
>>> code.
>>> However if you find a way besure to submit a patch, through a jira.
>>> http://docs.ofbiz.org/display/OFBADMIN/Best+Practices+Guide
>>> http://docs.ofbiz.org/display/OFBADMIN/Coding+Conventions
>>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices
>>> http://issues.apache.org/jira/browse/OFBIZ
>>>
>>>
>>>
>>> Florin Popa sent the following on 1/29/2009 10:28 AM:
>>>
>>>> Hello,
>>>>
>>>> Please help me with the following issue described below.
>>>>
>>>> Problem :
>>>>
>>>> How to implement functionality to be able to stay on the same page after
>>>> the
>>>> user change language (http, https)
>>>>
>>>> Details:
>>>>
>>>> In order to be able to change the language and return to the same page
>>>> the
>>>> last user action before change language should be saved entirely to
>>>> redirect
>>>> the user back to it.
>>>>
>>>> What I tried was to keep the last url accessed before change language
>>>> along
>>>> with the parameters used (for reproducing entirely the last state before
>>>> change language was accessed), and after change the language to redirect
>>>> the
>>>> user to this url.
>>>>
>>>> The problem appeared when for example you add an item to cart from a
>>>> product
>>>> page and the user is kept on the same page after the item is added. The
>>>> last
>>>> accessed url in this case was add to cart and after the user changes his
>>>> language the response was redirected to the add to cart url.
>>>>
>>>> Another problem was that when you log into the application you enter in
>>>> an
>>>> https area and the url is created with https but the parameters from the
>>>> last request are present in the url after redirect which is not desired.
>>>>
>>>>
>>>>
>>>> Thanks,
>>>> Flopa
>>>>
>>>>
>>>>
>>>> -----BEGIN PGP SIGNATURE-----
>>> Version: GnuPG v1.4.6 (MingW32)
>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>>
>>> iD8DBQFJgffurP3NbaWWqE4RAnpLAJ46pUFtwsGd2SwR216SY350ZDEqRwCeKvTh
>>> pU2ON2HR9IQWOdE0oKYiPtU=
>>> =S0Ha
>>> -----END PGP SIGNATURE-----
>>>
>>
>>
>>
>

Re: Change Language in Ofbiz

Posted by Florin Popa <fl...@gmail.com>.
Hi,

Thanks for both replies. We will try it and if possible to improve 
something, of course we can share it.
We are a team working on customization of e-commerce since almost a 
year. Soon I can share a demo as well as some additional development 
like advanced Ebay integration or ajax based shopping cart refresh..
Another interesting topic we had to implement ourselves (hosting more 
shops under the same ofbiz instance as well as admin users controlling 
at the same time more shops)

Best regards,
 Flopa
>
> For a pattern of how to do this check out the add to cart request (and 
> more importantly how it is used in productdetail and other templates) 
> which does support staying on the same page, even though the request 
> is always the same it goes to different views when it is done.
>
> -David
>
>
>
> On Jan 29, 2009, at 11:39 AM, BJ Freeman wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> I ask this when it was first implemented.
>> it was designed to reset.
>> it would take a lot of rethink to not do this, from what I saw of the 
>> code.
>> However if you find a way besure to submit a patch, through a jira.
>> http://docs.ofbiz.org/display/OFBADMIN/Best+Practices+Guide
>> http://docs.ofbiz.org/display/OFBADMIN/Coding+Conventions
>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices
>> http://issues.apache.org/jira/browse/OFBIZ
>>
>>
>>
>> Florin Popa sent the following on 1/29/2009 10:28 AM:
>>> Hello,
>>>
>>> Please help me with the following issue described below.
>>>
>>> Problem :
>>>
>>> How to implement functionality to be able to stay on the same page 
>>> after
>>> the
>>> user change language (http, https)
>>>
>>> Details:
>>>
>>> In order to be able to change the language and return to the same 
>>> page the
>>> last user action before change language should be saved entirely to
>>> redirect
>>> the user back to it.
>>>
>>> What I tried was to keep the last url accessed before change 
>>> language along
>>> with the parameters used (for reproducing entirely the last state 
>>> before
>>> change language was accessed), and after change the language to 
>>> redirect
>>> the
>>> user to this url.
>>>
>>> The problem appeared when for example you add an item to cart from a
>>> product
>>> page and the user is kept on the same page after the item is added. The
>>> last
>>> accessed url in this case was add to cart and after the user changes 
>>> his
>>> language the response was redirected to the add to cart url.
>>>
>>> Another problem was that when you log into the application you enter 
>>> in an
>>> https area and the url is created with https but the parameters from 
>>> the
>>> last request are present in the url after redirect which is not 
>>> desired.
>>>
>>>
>>>
>>> Thanks,
>>> Flopa
>>>
>>>
>>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.6 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iD8DBQFJgffurP3NbaWWqE4RAnpLAJ46pUFtwsGd2SwR216SY350ZDEqRwCeKvTh
>> pU2ON2HR9IQWOdE0oKYiPtU=
>> =S0Ha
>> -----END PGP SIGNATURE-----
>
>


Re: Change Language in Ofbiz

Posted by David E Jones <da...@hotwaxmedia.com>.
For a pattern of how to do this check out the add to cart request (and  
more importantly how it is used in productdetail and other templates)  
which does support staying on the same page, even though the request  
is always the same it goes to different views when it is done.

-David



On Jan 29, 2009, at 11:39 AM, BJ Freeman wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I ask this when it was first implemented.
> it was designed to reset.
> it would take a lot of rethink to not do this, from what I saw of  
> the code.
> However if you find a way besure to submit a patch, through a jira.
> http://docs.ofbiz.org/display/OFBADMIN/Best+Practices+Guide
> http://docs.ofbiz.org/display/OFBADMIN/Coding+Conventions
> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices
> http://issues.apache.org/jira/browse/OFBIZ
>
>
>
> Florin Popa sent the following on 1/29/2009 10:28 AM:
>> Hello,
>>
>> Please help me with the following issue described below.
>>
>> Problem :
>>
>> How to implement functionality to be able to stay on the same page  
>> after
>> the
>> user change language (http, https)
>>
>> Details:
>>
>> In order to be able to change the language and return to the same  
>> page the
>> last user action before change language should be saved entirely to
>> redirect
>> the user back to it.
>>
>> What I tried was to keep the last url accessed before change  
>> language along
>> with the parameters used (for reproducing entirely the last state  
>> before
>> change language was accessed), and after change the language to  
>> redirect
>> the
>> user to this url.
>>
>> The problem appeared when for example you add an item to cart from a
>> product
>> page and the user is kept on the same page after the item is added.  
>> The
>> last
>> accessed url in this case was add to cart and after the user  
>> changes his
>> language the response was redirected to the add to cart url.
>>
>> Another problem was that when you log into the application you  
>> enter in an
>> https area and the url is created with https but the parameters  
>> from the
>> last request are present in the url after redirect which is not  
>> desired.
>>
>>
>>
>> Thanks,
>> Flopa
>>
>>
>>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFJgffurP3NbaWWqE4RAnpLAJ46pUFtwsGd2SwR216SY350ZDEqRwCeKvTh
> pU2ON2HR9IQWOdE0oKYiPtU=
> =S0Ha
> -----END PGP SIGNATURE-----


Re: Change Language in Ofbiz

Posted by BJ Freeman <bj...@free-man.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I ask this when it was first implemented.
it was designed to reset.
it would take a lot of rethink to not do this, from what I saw of the code.
However if you find a way besure to submit a patch, through a jira.
http://docs.ofbiz.org/display/OFBADMIN/Best+Practices+Guide
http://docs.ofbiz.org/display/OFBADMIN/Coding+Conventions
http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices
http://issues.apache.org/jira/browse/OFBIZ



Florin Popa sent the following on 1/29/2009 10:28 AM:
> Hello,
> 
> Please help me with the following issue described below.
> 
> Problem :
> 
> How to implement functionality to be able to stay on the same page after
> the
> user change language (http, https)
> 
> Details:
> 
> In order to be able to change the language and return to the same page the
> last user action before change language should be saved entirely to
> redirect
> the user back to it.
> 
> What I tried was to keep the last url accessed before change language along
> with the parameters used (for reproducing entirely the last state before
> change language was accessed), and after change the language to redirect
> the
> user to this url.
> 
> The problem appeared when for example you add an item to cart from a
> product
> page and the user is kept on the same page after the item is added. The
> last
> accessed url in this case was add to cart and after the user changes his
> language the response was redirected to the add to cart url.
> 
> Another problem was that when you log into the application you enter in an
> https area and the url is created with https but the parameters from the
> last request are present in the url after redirect which is not desired.
> 
> 
> 
> Thanks,
> Flopa
> 
> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJgffurP3NbaWWqE4RAnpLAJ46pUFtwsGd2SwR216SY350ZDEqRwCeKvTh
pU2ON2HR9IQWOdE0oKYiPtU=
=S0Ha
-----END PGP SIGNATURE-----