When creating a customer from the shopping cart the selected country has to be 
the default one (with patch)
-----------------------------------------------------------------------------------------------------------

                 Key: OFBIZ-4324
                 URL: https://issues.apache.org/jira/browse/OFBIZ-4324
             Project: OFBiz
          Issue Type: Improvement
          Components: order
    Affects Versions: SVN trunk
            Reporter: Stéphane DUCAS
            Priority: Minor


When creating a new customer from the shopping cart of the ordermgr 
application, the country field is initialized to Afghanistan. It make sense 
that the country field should be the default country defined in 
general.properties.

Here is the patch:

Index: framework/common/webcommon/includes/countries.ftl
===================================================================
--- framework/common/webcommon/includes/countries.ftl   (revision 1137569)
+++ framework/common/webcommon/includes/countries.ftl   (working copy)
@@ -18,6 +18,6 @@
 -->
 <#assign countries = 
Static["org.ofbiz.common.CommonWorkers"].getCountryList(delegator)>
 <#list countries as country>
-    <option 
value='${country.geoId}'>${country.get("geoName",locale)?default(country.geoId)}</option>
+    <option value='${country.geoId}' 
${(country.geoId==defaultCountryGeoId)?string("selected=\"selected\"","")}>${country.get("geoName",locale)?default(country.geoId)}</option>
 </#list>
 
Index: applications/order/widget/ordermgr/OrderEntryOrderScreens.xml
===================================================================
--- applications/order/widget/ordermgr/OrderEntryOrderScreens.xml       
(revision 1137569)
+++ applications/order/widget/ordermgr/OrderEntryOrderScreens.xml       
(working copy)
@@ -109,6 +109,7 @@
                 <set field="stepTitleId" 
value="OrderOrderEntryShipToSettings"/>
                 <set field="stepLabelId" value="FacilityShipping"/>
                 <script 
location="component://order/webapp/ordermgr/WEB-INF/actions/entry/ShipSettings.groovy"/>
+                <property-to-field field="defaultCountryGeoId" 
resource="general" property="country.geo.id.default" default="USA"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonOrderCheckoutDecorator">


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to