eCommerce Edit Contact Information use Dependent drop-downs
----------------------------------------------------------- Key: OFBIZ-4797 URL: https://issues.apache.org/jira/browse/OFBIZ-4797 Project: OFBiz Issue Type: Improvement Components: specialpurpose/ecommerce Affects Versions: SVN trunk Environment: demo-trunk Reporter: Tom Burns Priority: Minor Using Dependent drop-downs to filter the State drop down based on the selection in the Country drop-down will improve the usability of the component. Current Behavior: 1. Open eCommerce application 2. Log in as user with Postal Address say Demo Customer 3. In the menu bar select Profile 4. In "Contact Information" > "Postal Address" select update. 5. The "Country" drop-down value is "United States" and the "State/Province" drop-down list displays all geo values. After improvement: 5. The "Country" drop-down value is "United States" and the "State/Province" drop-down list is limited to States in the United States. 6. Changing the value in the "Country" drop-down will update "State/Province" drop-down list with values for the selected country. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
[ https://issues.apache.org/jira/browse/OFBIZ-4797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux reassigned OFBIZ-4797: -------------------------------------- Assignee: Jacques Le Roux > eCommerce Edit Contact Information use Dependent drop-downs > ----------------------------------------------------------- > > Key: OFBIZ-4797 > URL: https://issues.apache.org/jira/browse/OFBIZ-4797 > Project: OFBiz > Issue Type: Improvement > Components: specialpurpose/ecommerce > Affects Versions: SVN trunk > Environment: demo-trunk > Reporter: Tom Burns > Assignee: Jacques Le Roux > Priority: Minor > > Using Dependent drop-downs to filter the State drop down based on the selection in the Country drop-down will improve the usability of the component. > Current Behavior: > 1. Open eCommerce application > 2. Log in as user with Postal Address say Demo Customer > 3. In the menu bar select Profile > 4. In "Contact Information" > "Postal Address" select update. > 5. The "Country" drop-down value is "United States" and the "State/Province" drop-down list displays all geo values. > After improvement: > 5. The "Country" drop-down value is "United States" and the "State/Province" drop-down list is limited to States in the United States. > 6. Changing the value in the "Country" drop-down will update "State/Province" drop-down list with values for the selected country. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Burns updated OFBIZ-4797: ----------------------------- Attachment: OFBIZ-4797 eCommerce Draft.patch Need a second pair of eyes. This patch follows the pattern of other implementations of the "dependent drop down" but does not display the State/Province field correctly. The first State/Province on the list is displayed when the recorded State/Province is expected. For example: Login as DemoCustomer Select the Profile tab In "Contact Information" > "Postal Address" > Click "Update" Select "United Kingdom" from the "Country Postal address" drop down Select any value after the first value from the "State/Province" drop down Say "Catithnees" Click "Save" Expect "State/Province" = "Catithnees" Actual "State/Province" = "Anglesey/Sir Fon" Click Profile Note: In Postal Address GB-CTHN and GBR. The change was saved but is not being displayed in the detail display. Also Note: The term "requestName" is used by both editcontactmech.ftl for the form target as well as a dependent drop field name. To resolve the conflict in "editcontactmech.ftl" "reqName" replaces "requestName". The patch includes some println's for debugging. > eCommerce Edit Contact Information use Dependent drop-downs > ----------------------------------------------------------- > > Key: OFBIZ-4797 > URL: https://issues.apache.org/jira/browse/OFBIZ-4797 > Project: OFBiz > Issue Type: Improvement > Components: specialpurpose/ecommerce > Affects Versions: SVN trunk > Environment: demo-trunk > Reporter: Tom Burns > Assignee: Jacques Le Roux > Priority: Minor > Attachments: OFBIZ-4797 eCommerce Draft.patch > > > Using Dependent drop-downs to filter the State drop down based on the selection in the Country drop-down will improve the usability of the component. > Current Behavior: > 1. Open eCommerce application > 2. Log in as user with Postal Address say Demo Customer > 3. In the menu bar select Profile > 4. In "Contact Information" > "Postal Address" select update. > 5. The "Country" drop-down value is "United States" and the "State/Province" drop-down list displays all geo values. > After improvement: > 5. The "Country" drop-down value is "United States" and the "State/Province" drop-down list is limited to States in the United States. > 6. Changing the value in the "Country" drop-down will update "State/Province" drop-down list with values for the selected country. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13254348#comment-13254348 ] Jacques Le Roux commented on OFBIZ-4797: ---------------------------------------- Sorry Tom, Your patch does not apply: D:\workspace\ofbizClean>patch -N -p0 0<"OFBIZ-4797 eCommerce Draft.patch" patching file specialpurpose/ecommerce/widget/CustomerScreens.xml patching file specialpurpose/ecommerce/widget/CommonScreens.xml patching file specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditContactMech.groovy patching file specialpurpose/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl Hunk #4 FAILED at 173. 1 out of 4 hunks FAILED -- saving rejects to file specialpurpose/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl.rej rejected: {code} --- specialpurpose/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl +++ specialpurpose/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl @@ -176,15 +173,23 @@ <input type="text" class='inputBox' size="12" maxlength="10" name="postalCode" value="${postalAddressData.postalCode?if_exists}" /> *</td> </tr> - <tr> - <td align="right" valign="top">${uiLabelMap.PartyCountry}</td> - <td> </td> - <td> - <select name="countryGeoId" class='selectBox'> - <#if postalAddressData.countryGeoId?exists><option value='${postalAddressData.countryGeoId}'>${selectedCountryName?default(postalAddressData.countryGeoId)}</option></#if> - ${screens.render("component://common/widget/CommonScreens.xml#countries")} + <tr> + <td align="right" valign="top">${uiLabelMap.CommonCountry} Postal address geoId ${postalAddress.countryGeoId}</td> + <td> </td> + <td> + <select name="countryGeoId" id="editcontactmechform_countryGeoId"> + ${screens.render("component://common/widget/CommonScreens.xml#countries")} + <#if (postalAddress?exists) && (postalAddress.countryGeoId?exists)> + <#assign defaultCountryGeoId = postalAddress.countryGeoId> + <#else> + <#assign defaultCountryGeoId = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("general.properties", "country.geo.id.default")> + </#if> + <option selected="selected" value="${defaultCountryGeoId}"> + <#assign countryGeo = delegator.findByPrimaryKey("Geo",Static["org.ofbiz.base.util.UtilMisc"].toMap("geoId",defaultCountryGeoId))> + ${countryGeo.get("geoName",locale)} + </option> </select> - *</td> + </td> </tr> <#elseif contactMechTypeId = "TELECOM_NUMBER"> <tr> {code} > eCommerce Edit Contact Information use Dependent drop-downs > ----------------------------------------------------------- > > Key: OFBIZ-4797 > URL: https://issues.apache.org/jira/browse/OFBIZ-4797 > Project: OFBiz > Issue Type: Improvement > Components: specialpurpose/ecommerce > Affects Versions: SVN trunk > Environment: demo-trunk > Reporter: Tom Burns > Assignee: Jacques Le Roux > Priority: Minor > Attachments: OFBIZ-4797 eCommerce Draft.patch > > > Using Dependent drop-downs to filter the State drop down based on the selection in the Country drop-down will improve the usability of the component. > Current Behavior: > 1. Open eCommerce application > 2. Log in as user with Postal Address say Demo Customer > 3. In the menu bar select Profile > 4. In "Contact Information" > "Postal Address" select update. > 5. The "Country" drop-down value is "United States" and the "State/Province" drop-down list displays all geo values. > After improvement: > 5. The "Country" drop-down value is "United States" and the "State/Province" drop-down list is limited to States in the United States. > 6. Changing the value in the "Country" drop-down will update "State/Province" drop-down list with values for the selected country. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13254377#comment-13254377 ] Tom Burns commented on OFBIZ-4797: ---------------------------------- Jacques, You will probably have to fix this conflict manually. In editcontactmech.ftl table record below... <tr> <td align="right" valign="top">${uiLabelMap.CommonCountry} Postal address geoId ${postalAddress.countryGeoId}</td> <td> </td> <td> <select name="countryGeoId" id="editcontactmechform_countryGeoId"> ${screens.render("component://common/widget/CommonScreens.xml#countries")} <#if (postalAddress?exists) && (postalAddress.countryGeoId?exists)> <#assign defaultCountryGeoId = postalAddress.countryGeoId> <#else> <#assign defaultCountryGeoId = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("general.properties", "country.geo.id.default")> </#if> <option selected="selected" value="${defaultCountryGeoId}"> <#assign countryGeo = delegator.findByPrimaryKey("Geo",Static["org.ofbiz.base.util.UtilMisc"].toMap("geoId",defaultCountryGeoId))> ${countryGeo.get("geoName",locale)} </option> </select> *</td> </tr> ... replaces the table record above Above <#elseif contactMechTypeId = "TELECOM_NUMBER"> It is the same table record used by your fix for countryGeoId By the way while working on the above I noticed a few additional issues in the eCommerce profile and the dependent drop down fix. Dependent Drop Down The Dependent drop down State/Province defaults to the first record after a refresh from the "Country Postal address". The State/Province should be blank after a refresh and throw an alert if none is selected. For example if the Country changes from US to United Kingdom then Aberdeenshire is selected. The selection should be the responsibility of the user. eCommerce profile 1. The "Go Back" button in the "Contact Information" Create and update screens (Postal Address, Phone Number etc.) does not return to the Profile screen (viewprofile). Return to the Profile screen is the behavior for all similar buttons in the feature. 2. The buttons in "Payment Method Information" labeled Cancel/Done and are of two styles class="buttontext" and class="button". "Cancel/Done" text may be confusing. After making a change in one for these forms the user may think that Cancel would undo the change. "Go Back" would be better. 3. The buttons in the Profile screen itself use different styles. I'll create issues for these unless you are of a different mind. Tom > eCommerce Edit Contact Information use Dependent drop-downs > ----------------------------------------------------------- > > Key: OFBIZ-4797 > URL: https://issues.apache.org/jira/browse/OFBIZ-4797 > Project: OFBiz > Issue Type: Improvement > Components: specialpurpose/ecommerce > Affects Versions: SVN trunk > Environment: demo-trunk > Reporter: Tom Burns > Assignee: Jacques Le Roux > Priority: Minor > Attachments: OFBIZ-4797 eCommerce Draft.patch > > > Using Dependent drop-downs to filter the State drop down based on the selection in the Country drop-down will improve the usability of the component. > Current Behavior: > 1. Open eCommerce application > 2. Log in as user with Postal Address say Demo Customer > 3. In the menu bar select Profile > 4. In "Contact Information" > "Postal Address" select update. > 5. The "Country" drop-down value is "United States" and the "State/Province" drop-down list displays all geo values. > After improvement: > 5. The "Country" drop-down value is "United States" and the "State/Province" drop-down list is limited to States in the United States. > 6. Changing the value in the "Country" drop-down will update "State/Province" drop-down list with values for the selected country. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux updated OFBIZ-4797: ----------------------------------- Attachment: OFBIZ-4797 eCommerce Draft.patch Tom, For the rejected part forget it. I just figured out that it came from http://svn.apache.org/viewvc?rev=1326270&view=rev For those interested here is an updated patch > eCommerce Edit Contact Information use Dependent drop-downs > ----------------------------------------------------------- > > Key: OFBIZ-4797 > URL: https://issues.apache.org/jira/browse/OFBIZ-4797 > Project: OFBiz > Issue Type: Improvement > Components: specialpurpose/ecommerce > Affects Versions: SVN trunk > Environment: demo-trunk > Reporter: Tom Burns > Assignee: Jacques Le Roux > Priority: Minor > Attachments: OFBIZ-4797 eCommerce Draft.patch, OFBIZ-4797 eCommerce Draft.patch > > > Using Dependent drop-downs to filter the State drop down based on the selection in the Country drop-down will improve the usability of the component. > Current Behavior: > 1. Open eCommerce application > 2. Log in as user with Postal Address say Demo Customer > 3. In the menu bar select Profile > 4. In "Contact Information" > "Postal Address" select update. > 5. The "Country" drop-down value is "United States" and the "State/Province" drop-down list displays all geo values. > After improvement: > 5. The "Country" drop-down value is "United States" and the "State/Province" drop-down list is limited to States in the United States. > 6. Changing the value in the "Country" drop-down will update "State/Province" drop-down list with values for the selected country. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13254389#comment-13254389 ] Jacques Le Roux commented on OFBIZ-4797: ---------------------------------------- About {quote} Dependent Drop Down The Dependent drop down State/Province defaults to the first record after a refresh from the "Country Postal address". The State/Province should be blank after a refresh and throw an alert if none is selected. For example if the Country changes from US to United Kingdom then Aberdeenshire is selected. The selection should be the responsibility of the user. {quote} I will not change the way the dependent dropdowns work, too much work and regression possibilities. Anyway, it's the user responsability to change the province/state value. Feel free to customise locally... For other points I agree that issues should be created > eCommerce Edit Contact Information use Dependent drop-downs > ----------------------------------------------------------- > > Key: OFBIZ-4797 > URL: https://issues.apache.org/jira/browse/OFBIZ-4797 > Project: OFBiz > Issue Type: Improvement > Components: specialpurpose/ecommerce > Affects Versions: SVN trunk > Environment: demo-trunk > Reporter: Tom Burns > Assignee: Jacques Le Roux > Priority: Minor > Attachments: OFBIZ-4797 eCommerce Draft.patch, OFBIZ-4797 eCommerce Draft.patch > > > Using Dependent drop-downs to filter the State drop down based on the selection in the Country drop-down will improve the usability of the component. > Current Behavior: > 1. Open eCommerce application > 2. Log in as user with Postal Address say Demo Customer > 3. In the menu bar select Profile > 4. In "Contact Information" > "Postal Address" select update. > 5. The "Country" drop-down value is "United States" and the "State/Province" drop-down list displays all geo values. > After improvement: > 5. The "Country" drop-down value is "United States" and the "State/Province" drop-down list is limited to States in the United States. > 6. Changing the value in the "Country" drop-down will update "State/Province" drop-down list with values for the selected country. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux closed OFBIZ-4797. ---------------------------------- Resolution: Fixed Fix Version/s: SVN trunk Thanks Tom, A slightly modified version of your patch is in trunk at r1326397 Your patch had only a small issue: duplicated line (but this had any impact since overriden by the following line) <set field="selectedDependentOption" value="_none_"/> The problem was more in EditContactMech.groovy: context.selectedStateName = geoValue.geoName; was used, instead of needed by setDependentDropdownValuesJs.ftl context.selectedStateName = geoValue.geoId; > eCommerce Edit Contact Information use Dependent drop-downs > ----------------------------------------------------------- > > Key: OFBIZ-4797 > URL: https://issues.apache.org/jira/browse/OFBIZ-4797 > Project: OFBiz > Issue Type: Improvement > Components: specialpurpose/ecommerce > Affects Versions: SVN trunk > Environment: demo-trunk > Reporter: Tom Burns > Assignee: Jacques Le Roux > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-4797 eCommerce Draft.patch, OFBIZ-4797 eCommerce Draft.patch > > > Using Dependent drop-downs to filter the State drop down based on the selection in the Country drop-down will improve the usability of the component. > Current Behavior: > 1. Open eCommerce application > 2. Log in as user with Postal Address say Demo Customer > 3. In the menu bar select Profile > 4. In "Contact Information" > "Postal Address" select update. > 5. The "Country" drop-down value is "United States" and the "State/Province" drop-down list displays all geo values. > After improvement: > 5. The "Country" drop-down value is "United States" and the "State/Province" drop-down list is limited to States in the United States. > 6. Changing the value in the "Country" drop-down will update "State/Province" drop-down list with values for the selected country. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13254411#comment-13254411 ] Tom Burns commented on OFBIZ-4797: ---------------------------------- Grasshopper Thanks You > eCommerce Edit Contact Information use Dependent drop-downs > ----------------------------------------------------------- > > Key: OFBIZ-4797 > URL: https://issues.apache.org/jira/browse/OFBIZ-4797 > Project: OFBiz > Issue Type: Improvement > Components: specialpurpose/ecommerce > Affects Versions: SVN trunk > Environment: demo-trunk > Reporter: Tom Burns > Assignee: Jacques Le Roux > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-4797 eCommerce Draft.patch, OFBIZ-4797 eCommerce Draft.patch > > > Using Dependent drop-downs to filter the State drop down based on the selection in the Country drop-down will improve the usability of the component. > Current Behavior: > 1. Open eCommerce application > 2. Log in as user with Postal Address say Demo Customer > 3. In the menu bar select Profile > 4. In "Contact Information" > "Postal Address" select update. > 5. The "Country" drop-down value is "United States" and the "State/Province" drop-down list displays all geo values. > After improvement: > 5. The "Country" drop-down value is "United States" and the "State/Province" drop-down list is limited to States in the United States. > 6. Changing the value in the "Country" drop-down will update "State/Province" drop-down list with values for the selected country. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
Free forum by Nabble | Edit this page |