You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Erwan de FERRIERES (JIRA)" <ji...@apache.org> on 2011/06/23 15:53:47 UTC

[jira] [Commented] (OFBIZ-4324) When creating a customer from the shopping cart the selected country has to be the default one (with patch)

    [ https://issues.apache.org/jira/browse/OFBIZ-4324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053860#comment-13053860 ] 

Erwan de FERRIERES commented on OFBIZ-4324:
-------------------------------------------

Hi Stephane,
you should attach your patch as a file to the issue and accept the license. If it's just a description, then it couldn't be included.

Thanks,

> 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