svn commit: r534586 - in /ofbiz/trunk/applications/order/webapp/ordermgr: WEB-INF/actions/entry/checkinits.bsh entry/checkinits.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r534586 - in /ofbiz/trunk/applications/order/webapp/ordermgr: WEB-INF/actions/entry/checkinits.bsh entry/checkinits.ftl

jleroux@apache.org
Author: jleroux
Date: Wed May  2 11:42:43 2007
New Revision: 534586

URL: http://svn.apache.org/viewvc?view=rev&rev=534586
Log:
A patch from Nicolas Malin "Default Product Store and Sale Channel on initial Order Entry screen" (https://issues.apache.org/jira/browse/OFBIZ-955).

Modified:
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkinits.bsh
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/checkinits.ftl

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkinits.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkinits.bsh?view=diff&rev=534586&r1=534585&r2=534586
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkinits.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkinits.bsh Wed May  2 11:42:43 2007
@@ -36,6 +36,13 @@
 
 context.put("dispatcher",dispatcher);
 
+productStore = ProductStoreWorker.getProductStore(request);
+if( productStore != null ){
+    context.put("defaultProductStore", productStore);
+    if( productStore.getString("defaultSalesChannelEnumId") != null )
+        context.put("defaultSalesChannel", delegator.findByPrimaryKeyCache("Enumeration",
+                UtilMisc.toMap("enumId",productStore.getString("defaultSalesChannelEnumId"))));
+}
 // Get the Cart
 shoppingCart = session.getAttribute("shoppingCart");
 context.put("shoppingCart", shoppingCart);

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/checkinits.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/checkinits.ftl?view=diff&rev=534586&r1=534585&r2=534586
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/checkinits.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/checkinits.ftl Wed May  2 11:42:43 2007
@@ -65,6 +65,10 @@
             <div class='tabletext' valign='top'>
               <select class="selectBox" name="productStoreId"<#if sessionAttributes.orderMode?exists> disabled</#if>>
                 <#assign currentStore = shoppingCartProductStore>
+                <#if defaultProductStore?has_content>
+                   <option value="${defaultProductStore.productStoreId}">${defaultProductStore.storeName?if_exists}</option>
+                   <option value="${defaultProductStore.productStoreId}">----</option>
+                </#if>              
                 <#list productStores as productStore>
                   <option value="${productStore.productStoreId}"<#if productStore.productStoreId == currentStore> selected</#if>>${productStore.storeName?if_exists}</option>
                 </#list>
@@ -82,7 +86,11 @@
             <div class='tabletext' valign='top'>
               <select class="selectBox" name="salesChannelEnumId">
                 <#assign currentChannel = shoppingCartChannelType>
-                <option value="">${uiLabelMap.OrderNoChannel}</option>
+                <#if defaultSalesChannel?has_content>
+                   <option value="${defaultSalesChannel.enumId}">${defaultSalesChannel.description?if_exists}</option>
+                   <option value="${defaultSalesChannel.enumId}"> ---- </option>
+                </#if>                
+                <option value="">${uiLabelMap.OrderNoChannel}</option>                
                 <#list salesChannels as salesChannel>
                   <option value="${salesChannel.enumId}" <#if (salesChannel.enumId == currentChannel)>selected</#if>>${salesChannel.get("description",locale)}</option>
                 </#list>