Hi
I found a javascript function in code of the ecommerce app that was causing me problems to register a new customer. The file is ~/ofbiz/applications/ecommerce/webapp/ecommerce/customer/newcustomer.ftl and section is: ----------snip-------------------------------------------------------------------- function hideShowUsaStates() { if (document.getElementById("customerCountry").value == "USA" || document.getElementById("customerCountry").value == "UMI") { document.getElementById("customerState").style.display = "block"; } else { document.getElementById("customerState").style.display = "none"; } } ----------snip-------------------------------------------------------------------- This code prevents any non-US user from registering a new account because it hides the state field on the form. After commenting this code it works fine and displays the state field on the form. I am not sure what the goal of this function is but I am wondering if it might be reconsidered because of the issue it causes. Michael |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 please submit a patch. http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices http://docs.ofbiz.org/display/OFBADMIN/Coding+Conventions and http://docs.ofbiz.org/display/OFBADMIN/Best+Practices+Guide G. Michael Jean sent the following on 3/8/2009 7:48 PM: > Hi > > I found a javascript function in code of the ecommerce app that was > causing me problems to register a new customer. The file is > ~/ofbiz/applications/ecommerce/webapp/ecommerce/customer/newcustomer.ftl > and section is: > > ----------snip-------------------------------------------------------------------- > function hideShowUsaStates() { > if (document.getElementById("customerCountry").value == "USA" > || document.getElementById("customerCountry").value == "UMI") { > document.getElementById("customerState").style.display = > "block"; > } else { > document.getElementById("customerState").style.display = > "none"; > } > } > ----------snip-------------------------------------------------------------------- > > This code prevents any non-US user from registering a new account > because it hides the state field on the form. After commenting this > code it works fine and displays the state field on the form. I am not > sure what the goal of this function is but I am wondering if it might be > reconsidered because of the issue it causes. > > Michael > > Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJtOG3rP3NbaWWqE4RAsQjAKDDpV1JAj5TZluOvw5GI6CmSK4eagCcD2VP qeMfjyQBsiTmhE+/Tj9xJK0= =JhdX -----END PGP SIGNATURE----- |
Administrator
|
We should show the states field only in relevant cases. For instance it's irrevelant for most EU countries, if not all...
My guess is to introduce it for USA, and any other countries where it's relevant. So I propose to have a properties (in general.properties I guess) for this case and to use it in this snippet of code. Could be ShowStatesField=USA, other_country1, other_country2, etc. Thanks Jacques From: "BJ Freeman" <[hidden email]> > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > please submit a patch. > http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices > http://docs.ofbiz.org/display/OFBADMIN/Coding+Conventions and > http://docs.ofbiz.org/display/OFBADMIN/Best+Practices+Guide > > > G. Michael Jean sent the following on 3/8/2009 7:48 PM: >> Hi >> >> I found a javascript function in code of the ecommerce app that was >> causing me problems to register a new customer. The file is >> ~/ofbiz/applications/ecommerce/webapp/ecommerce/customer/newcustomer.ftl >> and section is: >> >> ----------snip-------------------------------------------------------------------- >> function hideShowUsaStates() { >> if (document.getElementById("customerCountry").value == "USA" >> || document.getElementById("customerCountry").value == "UMI") { >> document.getElementById("customerState").style.display = >> "block"; >> } else { >> document.getElementById("customerState").style.display = >> "none"; >> } >> } >> ----------snip-------------------------------------------------------------------- >> >> This code prevents any non-US user from registering a new account >> because it hides the state field on the form. After commenting this >> code it works fine and displays the state field on the form. I am not >> sure what the goal of this function is but I am wondering if it might be >> reconsidered because of the issue it causes. >> >> Michael >> >> > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFJtOG3rP3NbaWWqE4RAsQjAKDDpV1JAj5TZluOvw5GI6CmSK4eagCcD2VP > qeMfjyQBsiTmhE+/Tj9xJK0= > =JhdX > -----END PGP SIGNATURE----- > |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 I can see where someone in a Country that does not have a State wanting to send something to someone that does have a State. this may be better handles with a Country lookup that is a form in ofbiz so that Geo code and address formats can be looked up and used for such things. Jacques Le Roux sent the following on 3/9/2009 3:35 AM: > We should show the states field only in relevant cases. For instance > it's irrevelant for most EU countries, if not all... > > My guess is to introduce it for USA, and any other countries where it's > relevant. So I propose to have a properties (in general.properties I > guess) for this case and to use it in this snippet of code. > > Could be > ShowStatesField=USA, other_country1, other_country2, etc. > > Thanks > > Jacques > > From: "BJ Freeman" <[hidden email]> > please submit a patch. > http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices > http://docs.ofbiz.org/display/OFBADMIN/Coding+Conventions and > http://docs.ofbiz.org/display/OFBADMIN/Best+Practices+Guide > > > G. Michael Jean sent the following on 3/8/2009 7:48 PM: >>>> Hi >>>> >>>> I found a javascript function in code of the ecommerce app that was >>>> causing me problems to register a new customer. The file is >>>> ~/ofbiz/applications/ecommerce/webapp/ecommerce/customer/newcustomer.ftl >>>> and section is: >>>> >>>> ----------snip-------------------------------------------------------------------- >>>> >>>> function hideShowUsaStates() { >>>> if (document.getElementById("customerCountry").value == "USA" >>>> || document.getElementById("customerCountry").value == "UMI") { >>>> document.getElementById("customerState").style.display = >>>> "block"; >>>> } else { >>>> document.getElementById("customerState").style.display = >>>> "none"; >>>> } >>>> } >>>> ----------snip-------------------------------------------------------------------- >>>> >>>> >>>> This code prevents any non-US user from registering a new account >>>> because it hides the state field on the form. After commenting this >>>> code it works fine and displays the state field on the form. I am not >>>> sure what the goal of this function is but I am wondering if it might be >>>> reconsidered because of the issue it causes. >>>> >>>> Michael >>>> >>>> >> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJtPbCrP3NbaWWqE4RAhKqAJ9GIo4C4HL+M/auw3+IVTfiMtqsdwCgvc01 60HA6dMnB3Fk8zaUjooU6MA= =8fMf -----END PGP SIGNATURE----- |
Administrator
|
Sorry BJ,
I think when you create your profile (new customer is what we speak about here) you need only to fill informations about you. So I don't understand what you want to do here Jacques From: "BJ Freeman" <[hidden email]> > I can see where someone in a Country that does not have a State wanting > to send something to someone that does have a State. > this may be better handles with a Country lookup that is a form in ofbiz > so that Geo code and address formats can be looked up and used for such > things. > > Jacques Le Roux sent the following on 3/9/2009 3:35 AM: >> We should show the states field only in relevant cases. For instance >> it's irrevelant for most EU countries, if not all... >> >> My guess is to introduce it for USA, and any other countries where it's >> relevant. So I propose to have a properties (in general.properties I >> guess) for this case and to use it in this snippet of code. >> >> Could be >> ShowStatesField=USA, other_country1, other_country2, etc. >> >> Thanks >> >> Jacques >> >> From: "BJ Freeman" <[hidden email]> >> please submit a patch. >> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices >> http://docs.ofbiz.org/display/OFBADMIN/Coding+Conventions and >> http://docs.ofbiz.org/display/OFBADMIN/Best+Practices+Guide >> >> >> G. Michael Jean sent the following on 3/8/2009 7:48 PM: >>>>> Hi >>>>> >>>>> I found a javascript function in code of the ecommerce app that was >>>>> causing me problems to register a new customer. The file is >>>>> ~/ofbiz/applications/ecommerce/webapp/ecommerce/customer/newcustomer.ftl >>>>> and section is: >>>>> >>>>> ----------snip-------------------------------------------------------------------- >>>>> >>>>> function hideShowUsaStates() { >>>>> if (document.getElementById("customerCountry").value == "USA" >>>>> || document.getElementById("customerCountry").value == "UMI") { >>>>> document.getElementById("customerState").style.display = >>>>> "block"; >>>>> } else { >>>>> document.getElementById("customerState").style.display = >>>>> "none"; >>>>> } >>>>> } >>>>> ----------snip-------------------------------------------------------------------- >>>>> >>>>> >>>>> This code prevents any non-US user from registering a new account >>>>> because it hides the state field on the form. After commenting this >>>>> code it works fine and displays the state field on the form. I am not >>>>> sure what the goal of this function is but I am wondering if it might be >>>>> reconsidered because of the issue it causes. >>>>> >>>>> Michael >>>>> >>>>> >>> > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFJtPbCrP3NbaWWqE4RAhKqAJ9GIo4C4HL+M/auw3+IVTfiMtqsdwCgvc01 > 60HA6dMnB3Fk8zaUjooU6MA= > =8fMf > -----END PGP SIGNATURE----- > |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Yes, I was thinking ahead. In a customer, you have at least two scenarios. creating a customer as in the ECommerce and Creating a Customer as in New Client in SFA. In the second the company may be in a Country that does not require States, but he customer address they are adding does. You also have addressing needs in other areas. so instead of just focusing on one small area, I looked at all addressing considerations to make more like a utility (as in country lookup) that could be plugged into any of the forms that need addressing. Thus removing the need for the java script and replacing with a Lookup form. this also does away with using properties. just my 2 cents Jacques Le Roux sent the following on 3/9/2009 4:22 AM: > Sorry BJ, > > I think when you create your profile (new customer is what we speak > about here) you need only to fill informations about you. So I don't > understand what you want to do here > > Jacques > > From: "BJ Freeman" <[hidden email]> >> I can see where someone in a Country that does not have a State wanting >> to send something to someone that does have a State. >> this may be better handles with a Country lookup that is a form in ofbiz >> so that Geo code and address formats can be looked up and used for such >> things. >> >> Jacques Le Roux sent the following on 3/9/2009 3:35 AM: >>> We should show the states field only in relevant cases. For instance >>> it's irrevelant for most EU countries, if not all... >>> >>> My guess is to introduce it for USA, and any other countries where it's >>> relevant. So I propose to have a properties (in general.properties I >>> guess) for this case and to use it in this snippet of code. >>> >>> Could be >>> ShowStatesField=USA, other_country1, other_country2, etc. >>> >>> Thanks >>> >>> Jacques >>> >>> From: "BJ Freeman" <[hidden email]> >>> please submit a patch. >>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices >>> http://docs.ofbiz.org/display/OFBADMIN/Coding+Conventions and >>> http://docs.ofbiz.org/display/OFBADMIN/Best+Practices+Guide >>> >>> >>> G. Michael Jean sent the following on 3/8/2009 7:48 PM: >>>>>> Hi >>>>>> >>>>>> I found a javascript function in code of the ecommerce app that was >>>>>> causing me problems to register a new customer. The file is >>>>>> ~/ofbiz/applications/ecommerce/webapp/ecommerce/customer/newcustomer.ftl >>>>>> >>>>>> and section is: >>>>>> >>>>>> ----------snip-------------------------------------------------------------------- >>>>>> >>>>>> >>>>>> function hideShowUsaStates() { >>>>>> if (document.getElementById("customerCountry").value == >>>>>> "USA" >>>>>> || document.getElementById("customerCountry").value == "UMI") { >>>>>> document.getElementById("customerState").style.display = >>>>>> "block"; >>>>>> } else { >>>>>> document.getElementById("customerState").style.display = >>>>>> "none"; >>>>>> } >>>>>> } >>>>>> ----------snip-------------------------------------------------------------------- >>>>>> >>>>>> >>>>>> >>>>>> This code prevents any non-US user from registering a new account >>>>>> because it hides the state field on the form. After commenting this >>>>>> code it works fine and displays the state field on the form. I am >>>>>> not >>>>>> sure what the goal of this function is but I am wondering if it >>>>>> might be >>>>>> reconsidered because of the issue it causes. >>>>>> >>>>>> Michael >>>>>> >>>>>> >>>> >> >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v1.4.6 (MingW32) >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org >> >> iD8DBQFJtPbCrP3NbaWWqE4RAhKqAJ9GIo4C4HL+M/auw3+IVTfiMtqsdwCgvc01 >> 60HA6dMnB3Fk8zaUjooU6MA= >> =8fMf >> -----END PGP SIGNATURE----- >> > > > > Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJtQCFrP3NbaWWqE4RArZxAJ9rovKnUzjutVv9mqfco5yjpaZHgwCgjca9 DnJD8PMFzsdTs2P6UtLxCtk= =FG3h -----END PGP SIGNATURE----- |
Administrator
|
I understand now, thanks for details
Jacques From: "BJ Freeman" <[hidden email]> > Yes, I was thinking ahead. > In a customer, you have at least two scenarios. > creating a customer as in the ECommerce and Creating a Customer as in > New Client in SFA. In the second the company may be in a Country that > does not require States, but he customer address they are adding does. > > You also have addressing needs in other areas. > so instead of just focusing on one small area, I looked at all > addressing considerations to make more like a utility (as in country > lookup) that could be plugged into any of the forms that need addressing. > Thus removing the need for the java script and replacing with a Lookup form. > this also does away with using properties. > > just my 2 cents > > > Jacques Le Roux sent the following on 3/9/2009 4:22 AM: >> Sorry BJ, >> >> I think when you create your profile (new customer is what we speak >> about here) you need only to fill informations about you. So I don't >> understand what you want to do here >> >> Jacques >> >> From: "BJ Freeman" <[hidden email]> >>> I can see where someone in a Country that does not have a State wanting >>> to send something to someone that does have a State. >>> this may be better handles with a Country lookup that is a form in ofbiz >>> so that Geo code and address formats can be looked up and used for such >>> things. >>> >>> Jacques Le Roux sent the following on 3/9/2009 3:35 AM: >>>> We should show the states field only in relevant cases. For instance >>>> it's irrevelant for most EU countries, if not all... >>>> >>>> My guess is to introduce it for USA, and any other countries where it's >>>> relevant. So I propose to have a properties (in general.properties I >>>> guess) for this case and to use it in this snippet of code. >>>> >>>> Could be >>>> ShowStatesField=USA, other_country1, other_country2, etc. >>>> >>>> Thanks >>>> >>>> Jacques >>>> >>>> From: "BJ Freeman" <[hidden email]> >>>> please submit a patch. >>>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices >>>> http://docs.ofbiz.org/display/OFBADMIN/Coding+Conventions and >>>> http://docs.ofbiz.org/display/OFBADMIN/Best+Practices+Guide >>>> >>>> >>>> G. Michael Jean sent the following on 3/8/2009 7:48 PM: >>>>>>> Hi >>>>>>> >>>>>>> I found a javascript function in code of the ecommerce app that was >>>>>>> causing me problems to register a new customer. The file is >>>>>>> ~/ofbiz/applications/ecommerce/webapp/ecommerce/customer/newcustomer.ftl >>>>>>> >>>>>>> and section is: >>>>>>> >>>>>>> ----------snip-------------------------------------------------------------------- >>>>>>> >>>>>>> >>>>>>> function hideShowUsaStates() { >>>>>>> if (document.getElementById("customerCountry").value == >>>>>>> "USA" >>>>>>> || document.getElementById("customerCountry").value == "UMI") { >>>>>>> document.getElementById("customerState").style.display = >>>>>>> "block"; >>>>>>> } else { >>>>>>> document.getElementById("customerState").style.display = >>>>>>> "none"; >>>>>>> } >>>>>>> } >>>>>>> ----------snip-------------------------------------------------------------------- >>>>>>> >>>>>>> >>>>>>> >>>>>>> This code prevents any non-US user from registering a new account >>>>>>> because it hides the state field on the form. After commenting this >>>>>>> code it works fine and displays the state field on the form. I am >>>>>>> not >>>>>>> sure what the goal of this function is but I am wondering if it >>>>>>> might be >>>>>>> reconsidered because of the issue it causes. >>>>>>> >>>>>>> Michael >>>>>>> >>>>>>> >>>>> >>> >>> -----BEGIN PGP SIGNATURE----- >>> Version: GnuPG v1.4.6 (MingW32) >>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org >>> >>> iD8DBQFJtPbCrP3NbaWWqE4RAhKqAJ9GIo4C4HL+M/auw3+IVTfiMtqsdwCgvc01 >>> 60HA6dMnB3Fk8zaUjooU6MA= >>> =8fMf >>> -----END PGP SIGNATURE----- >>> >> >> >> >> > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFJtQCFrP3NbaWWqE4RArZxAJ9rovKnUzjutVv9mqfco5yjpaZHgwCgjca9 > DnJD8PMFzsdTs2P6UtLxCtk= > =FG3h > -----END PGP SIGNATURE----- > |
Free forum by Nabble | Edit this page |