svn commit: r795883 - in /ofbiz/trunk: applications/order/src/org/ofbiz/order/shoppingcart/ applications/order/webapp/ordermgr/WEB-INF/actions/entry/ applications/order/webapp/ordermgr/WEB-INF/actions/order/ applications/order/webapp/ordermgr/entry/ ap...

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

svn commit: r795883 - in /ofbiz/trunk: applications/order/src/org/ofbiz/order/shoppingcart/ applications/order/webapp/ordermgr/WEB-INF/actions/entry/ applications/order/webapp/ordermgr/WEB-INF/actions/order/ applications/order/webapp/ordermgr/entry/ ap...

eckardjf
Author: eckardjf
Date: Mon Jul 20 15:52:05 2009
New Revision: 795883

URL: http://svn.apache.org/viewvc?rev=795883&view=rev
Log:
Changes to ShoppingCart & order entry to allow PO entry without requiring a ProductStore; updated seed data to remove productStoreId from the OrderEntry website

Modified:
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/OptionSettings.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/OrderAgreements.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/optionsettings.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/orderagreements.ftl
    ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java?rev=795883&r1=795882&r2=795883&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java Mon Jul 20 15:52:05 2009
@@ -789,8 +789,6 @@
     }
 
     private Map makeTaxContext(int shipGroup, GenericValue shipAddress, Map shoppingCartItemIndexMap) throws GeneralException {
-        String productStoreId = cart.getProductStoreId();
-        String billToPartyId = cart.getBillToCustomerPartyId();
         ShoppingCart.CartShipInfo csi = cart.getShipInfo(shipGroup);
         int totalItems = csi.shipItemInfo.size();
 
@@ -839,8 +837,9 @@
             }
         }
 
-        Map serviceContext = UtilMisc.toMap("productStoreId", productStoreId);
-        serviceContext.put("billToPartyId", billToPartyId);
+        Map serviceContext = UtilMisc.toMap("productStoreId", cart.getProductStoreId());
+        serviceContext.put("payToPartyId", cart.getBillFromVendorPartyId());
+        serviceContext.put("billToPartyId", cart.getBillToCustomerPartyId());
         serviceContext.put("itemProductList", product);
         serviceContext.put("itemAmountList", amount);
         serviceContext.put("itemPriceList", price);

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=795883&r1=795882&r2=795883&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Mon Jul 20 15:52:05 2009
@@ -231,38 +231,35 @@
 
     /** Creates new empty ShoppingCart object. */
     public ShoppingCart(GenericDelegator delegator, String productStoreId, String webSiteId, Locale locale, String currencyUom, String billToCustomerPartyId, String billFromVendorPartyId) {
+
         this.delegator = delegator;
         this.delegatorName = delegator.getDelegatorName();
         this.productStoreId = productStoreId;
         this.webSiteId = webSiteId;
-        this.currencyUom = currencyUom;
-        this.locale = locale;
-        if (this.locale == null) {
-            this.locale = Locale.getDefault();
-        }
+        this.locale = (locale != null) ? locale : Locale.getDefault();
+        this.currencyUom = (currencyUom != null) ? currencyUom : UtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD");
+        this.billToCustomerPartyId = billToCustomerPartyId;
+        this.billFromVendorPartyId = billFromVendorPartyId;
 
-        if (productStoreId == null) {
-            throw new IllegalArgumentException("productStoreId cannot be null");
-        }
+        if (productStoreId != null) {
 
-        // set the default view cart on add for this store
-        GenericValue productStore = ProductStoreWorker.getProductStore(productStoreId, delegator);
-        if (productStore == null) {
-            throw new IllegalArgumentException("Unable to locate ProductStore by ID [" + productStoreId + "]");
-        }
+            // set the default view cart on add for this store
+            GenericValue productStore = ProductStoreWorker.getProductStore(productStoreId, delegator);
+            if (productStore == null) {
+                throw new IllegalArgumentException("Unable to locate ProductStore by ID [" + productStoreId + "]");
+            }
 
-        String storeViewCartOnAdd = productStore.getString("viewCartOnAdd");
-        if (storeViewCartOnAdd != null && "Y".equalsIgnoreCase(storeViewCartOnAdd)) {
-            this.viewCartOnAdd = true;
-        }
+            String storeViewCartOnAdd = productStore.getString("viewCartOnAdd");
+            if (storeViewCartOnAdd != null && "Y".equalsIgnoreCase(storeViewCartOnAdd)) {
+                this.viewCartOnAdd = true;
+            }
 
-        if (billFromVendorPartyId == null) {
-            // since default cart is of type SALES_ORDER, set to store's payToPartyId
-            this.billFromVendorPartyId = productStore.getString("payToPartyId");
-        } else {
-            this.billFromVendorPartyId = billFromVendorPartyId;
+            if (billFromVendorPartyId == null) {
+                // since default cart is of type SALES_ORDER, set to store's payToPartyId
+                this.billFromVendorPartyId = productStore.getString("payToPartyId");
+            }
         }
-        this.billToCustomerPartyId = billToCustomerPartyId;
+
     }
 
 

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/OptionSettings.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/OptionSettings.groovy?rev=795883&r1=795882&r2=795883&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/OptionSettings.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/OptionSettings.groovy Mon Jul 20 15:52:05 2009
@@ -26,9 +26,13 @@
 
 cart = session.getAttribute("shoppingCart");
 context.cart = cart;
+
 productStore = ProductStoreWorker.getProductStore(request);
-productStoreId = productStore.productStoreId;
-context.productStore = productStore;
+if (productStore) {
+    context.productStore = productStore;
+    context.carrierShipmentMethodList = delegator.findByAndCache('ProductStoreShipmentMethView', [productStoreId: productStore.productStoreId], ['sequenceNumber']);
+}
+
 // nuke the event messages
 request.removeAttribute("_EVENT_MESSAGE_");
 
@@ -39,7 +43,6 @@
     context.orderPartyId = orderPartyId;
 }
 
-context.carrierShipmentMethodList = delegator.findByAndCache("ProductStoreShipmentMethView", [productStoreId : productStoreId], ["sequenceNumber"]);
 context.emailList = ContactHelper.getContactMechByType(orderPartyId, "EMAIL_ADDRESS", false);
 
 // create the beforeDate for calendar
@@ -65,3 +68,4 @@
 toTs = new Timestamp(toCal.getTimeInMillis());
 toStr = toTs.toString();
 context.afterDateStr = toStr;
+

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/OrderAgreements.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/OrderAgreements.groovy?rev=795883&r1=795882&r2=795883&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/OrderAgreements.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/OrderAgreements.groovy Mon Jul 20 15:52:05 2009
@@ -17,85 +17,80 @@
  * under the License.
  */
 
-import org.ofbiz.service.*;
-import org.ofbiz.entity.*;
-import org.ofbiz.entity.condition.*;
-import org.ofbiz.entity.util.*;
-import org.ofbiz.base.util.*;
-import org.ofbiz.order.shoppingcart.*;
-import org.ofbiz.party.party.PartyWorker;
-import org.ofbiz.product.catalog.CatalogWorker;
-import org.ofbiz.product.store.ProductStoreWorker;
-import org.ofbiz.order.shoppingcart.product.ProductDisplayWorker;
-import org.ofbiz.order.shoppingcart.product.ProductPromoWorker;
 import org.ofbiz.entity.condition.EntityCondition;
-import org.ofbiz.entity.condition.EntityExpr;
 import org.ofbiz.entity.condition.EntityOperator;
-import javolution.util.FastList;
+import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.order.shoppingcart.*;
+import org.ofbiz.product.catalog.CatalogWorker;
 
 
-// Get the Cart and Prepare Size
 shoppingCart = ShoppingCartEvents.getCartObject(request);
 context.cart = shoppingCart;
 
-// check the selected product store
+// get applicable agreements for order entry
+if ('PURCHASE_ORDER'.equals(shoppingCart.getOrderType())) {
+
+    // for a purchase order, orderPartyId = billFromVendor (the supplier)
+    supplierPartyId = shoppingCart.getOrderPartyId();
+    customerPartyId = shoppingCart.getBillToCustomerPartyId();
+
+    // the agreement for a purchse order is from us to the supplier
+    agreementCondition = EntityCondition.makeCondition([
+            EntityCondition.makeCondition('partyIdTo', EntityOperator.EQUALS, supplierPartyId),
+            EntityCondition.makeCondition('partyIdFrom', EntityOperator.EQUALS, customerPartyId)
+    ], EntityOperator.AND);
+
+    agreementRoleCondition = EntityCondition.makeCondition([
+            EntityCondition.makeCondition('partyId', EntityOperator.EQUALS, supplierPartyId),
+            EntityCondition.makeCondition('roleTypeId', EntityOperator.EQUALS, 'SUPPLIER')
+    ], EntityOperator.AND);
+
+} else {
+
+    // for a sales order, orderPartyId = billToCustomer (the customer)
+    customerPartyId = shoppingCart.getOrderPartyId();
+    companyPartyId = shoppingCart.getBillFromVendorPartyId();
+
+    // the agreement for a sales order is from the customer to us
+    agreementCondition = EntityCondition.makeCondition([
+            EntityCondition.makeCondition('partyIdTo', EntityOperator.EQUALS, companyPartyId),
+            EntityCondition.makeCondition('partyIdFrom', EntityOperator.EQUALS, customerPartyId)
+    ], EntityOperator.AND);
+
+    agreementRoleCondition = EntityCondition.makeCondition([
+            EntityCondition.makeCondition('partyId', EntityOperator.EQUALS, customerPartyId),
+            EntityCondition.makeCondition('roleTypeId', EntityOperator.EQUALS, 'CUSTOMER')
+    ], EntityOperator.AND);
+
+}
+
+agreements = delegator.findList('Agreement', agreementCondition, null, null, null, true);
+agreements = EntityUtil.filterByDate(agreements);
+if (agreements) {
+    context.agreements = agreements;
+}
+
+agreementRoles = delegator.findList('AgreementRole', agreementRoleCondition, null, null, null, true);
+if (agreementRoles) {
+    context.agreementRoles = agreementRoles;
+}
+
+// catalog id collection, current catalog id and name
 productStoreId = shoppingCart.getProductStoreId();
-productStore = null;
-if (productStoreId) {
-    productStore = ProductStoreWorker.getProductStore(productStoreId, delegator);
-    if (productStore) {
-        // put in the default currency, to help selecting a currency for a purchase order
-        context.defaultCurrencyUomId = productStore.defaultCurrencyUomId;
-        payToPartyId = productStore.payToPartyId;
-        partyId = shoppingCart.getOrderPartyId();
-
-        exprsAgreements = FastList.newInstance();
-        exprsAgreementRoles = FastList.newInstance();
-        // get applicable agreements for order entry
-        if ("PURCHASE_ORDER".equals(shoppingCart.getOrderType())) {
-            // the agreement for a PO is from customer to payToParty (ie, us)
-            exprsAgreements.add(EntityCondition.makeCondition("partyIdTo", EntityOperator.EQUALS, partyId));
-            exprsAgreements.add(EntityCondition.makeCondition("partyIdFrom", EntityOperator.EQUALS, payToPartyId));
-            agreements = delegator.findList("Agreement", EntityCondition.makeCondition(exprsAgreements, EntityOperator.AND), null, null, null, true);
-            exprsAgreementRoles.add(EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId));
-            exprsAgreementRoles.add(EntityCondition.makeCondition("roleTypeId", EntityOperator.EQUALS, "SUPPLIER"));
-            agreementRoles = delegator.findList("AgreementRole", EntityCondition.makeCondition(exprsAgreementRoles, EntityOperator.AND), null, null, null, true);
-            catalogCol = CatalogWorker.getAllCatalogIds(request);
-        } else {
-            // the agreement for a sales order is from us to the customer
-            exprsAgreements.add(EntityCondition.makeCondition("partyIdTo", EntityOperator.EQUALS, payToPartyId));
-            exprsAgreements.add(EntityCondition.makeCondition("partyIdFrom", EntityOperator.EQUALS, partyId));
-            agreements = delegator.findList("Agreement", EntityCondition.makeCondition(exprsAgreements, EntityOperator.AND), null, null, null, true);
-            exprsAgreementRoles.add(EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId));
-            exprsAgreementRoles.add(EntityCondition.makeCondition("roleTypeId", EntityOperator.EQUALS, "CUSTOMER"));
-            agreementRoles = delegator.findList("AgreementRole", EntityCondition.makeCondition(exprsAgreementRoles, EntityOperator.AND), null, null, null, true);
-            catalogCol = CatalogWorker.getCatalogIdsAvailable(delegator, productStoreId, partyId);
-        }
-
-        agreements = EntityUtil.filterByDate(agreements);
-        if (agreements) {
-            context.agreements = agreements;
-        }
-        if (agreementRoles) {
-            context.agreementRoles =agreementRoles;
-        }
-
-
-        if (catalogCol) {
-            currentCatalogId = catalogCol.get(0);
-            currentCatalogName = CatalogWorker.getCatalogName(request, currentCatalogId);
-            context.catalogCol = catalogCol;
-            context.currentCatalogId = currentCatalogId;
-            context.currentCatalogName = currentCatalogName;
-        }
-    }
+if ('SALES_ORDER' == shoppingCart.getOrderType() && productStoreId) {
+    catalogCol = CatalogWorker.getCatalogIdsAvailable(delegator, productStoreId, shoppingCart.getOrderPartyId());
+} else {
+    catalogCol = CatalogWorker.getAllCatalogIds(request);
 }
 
-partyId = shoppingCart.getPartyId();
-if ("_NA_".equals(partyId)) partyId = null;
-context.partyId = partyId;
+if (catalogCol) {
+    context.catalogCol = catalogCol;
+
+    currentCatalogId = catalogCol.get(0);
+    context.currentCatalogId = currentCatalogId;
+    context.currentCatalogName = CatalogWorker.getCatalogName(request, currentCatalogId);
+}
 
 // currencies and shopping cart currency
-currencies = delegator.findByAndCache("Uom", [uomTypeId : "CURRENCY_MEASURE"]);
-context.currencies = currencies;
+context.currencies = delegator.findByAndCache('Uom', [uomTypeId: 'CURRENCY_MEASURE']);
 context.currencyUomId = shoppingCart.getCurrency();

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy?rev=795883&r1=795882&r2=795883&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy Mon Jul 20 15:52:05 2009
@@ -386,9 +386,9 @@
     context.shippingContactMechList = shippingContactMechList;
 
     // list to find all the shipmentMethods from the view named "ProductStoreShipmentMethView".
-    productStoreId = orderHeader.getRelatedOne("ProductStore").productStoreId;
-    productStoreShipmentMethList = delegator.findByAndCache("ProductStoreShipmentMethView", [productStoreId : productStoreId], ["sequenceNumber"]);
-    context.productStoreShipmentMethList = productStoreShipmentMethList;
+    if (productStore) {
+        context.productStoreShipmentMethList = delegator.findByAndCache('ProductStoreShipmentMethView', [productStoreId: productStore.productStoreId], ['sequenceNumber']);
+    }
 
     // Get a map of returnable items
     returnableItems = [:];
@@ -400,8 +400,8 @@
 
     // get the catalogIds for appending items
     if (context.request != null) {
-        if ("SALES_ORDER".equals(orderType)) {
-            catalogCol = CatalogWorker.getCatalogIdsAvailable(delegator, productStoreId, partyId);
+        if ("SALES_ORDER".equals(orderType) && productStore) {
+            catalogCol = CatalogWorker.getCatalogIdsAvailable(delegator, productStore.productStoreId, partyId);
         } else {
             catalogCol = CatalogWorker.getAllCatalogIds(request);
         }
@@ -441,8 +441,8 @@
         context.shipmentRouteSegmentId = shipmentRouteSegment.shipmentRouteSegmentId;
         context.pickedShipmentId = pickedShipmentId;
         if (pickedShipmentId && shipmentRouteSegment.trackingIdNumber) {
-            if ("UPS" == shipmentRouteSegment.carrierPartyId) {
-                resultMap = dispatcher.runSync("upsShipmentAlternateRatesEstimate",[productStoreId : productStoreId, shipmentId : pickedShipmentId]);
+            if ("UPS" == shipmentRouteSegment.carrierPartyId && productStore) {
+                resultMap = dispatcher.runSync('upsShipmentAlternateRatesEstimate', [productStoreId: productStore.productStoreId, shipmentId: pickedShipmentId]);
                 shippingRates = resultMap.shippingRates;
                 shippingRateList = [];
                 shippingRates.each { shippingRate ->

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl?rev=795883&r1=795882&r2=795883&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl Mon Jul 20 15:52:05 2009
@@ -39,7 +39,7 @@
           <td colspan="2">
             <div>
               <b>${uiLabelMap.ProductProduct}</b>
-              <#if productStore.showCheckoutGiftOptions?if_exists != "N">
+              <#if (shoppingCart.getOrderType() == 'SALES_ORDER') && (productStore.showCheckoutGiftOptions)?default('Y') != 'N'>
                   <select name="GWALL" onchange="javascript:gwAll(this);">
                     <option value="">${uiLabelMap.OrderGiftWrapAllItems}</option>
                     <option value="NO^">${uiLabelMap.OrderNoGiftWrap}</option>

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/optionsettings.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/optionsettings.ftl?rev=795883&r1=795882&r2=795883&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/optionsettings.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/optionsettings.ftl Mon Jul 20 15:52:05 2009
@@ -139,34 +139,34 @@
                     <textarea cols="30" rows="3" name="${shipGroupIndex?default("0")}_shipping_instructions">${cart.getShippingInstructions(shipGroupIndex)?if_exists}</textarea>
                   </td>
                 </tr>
-                <#if productStore.showCheckoutGiftOptions?if_exists != "N">
-                <tr>
-                  <td colspan="2">
-                    <#if cart.getOrderType() = "PURCHASE_ORDER">
-                       <input type='hidden' name='${shipGroupIndex?default("0")}_is_gift' value='false'>
-                    <#else>
-                    <div>
-                      <span class="h2"><b>${uiLabelMap.OrderIsThisGift}</b></span>
-                      <input type='radio' <#if cart.getIsGift(shipGroupIndex)?default("Y") == "Y">checked</#if> name='${shipGroupIndex?default("0")}_is_gift' value='true'><span class='tabletext'>${uiLabelMap.CommonYes}</span>
-                      <input type='radio' <#if cart.getIsGift(shipGroupIndex)?default("N") == "N">checked</#if> name='${shipGroupIndex?default("0")}_is_gift' value='false'><span class='tabletext'>${uiLabelMap.CommonNo}</span>
-                    </div>
+
+                <#if cart.getOrderType() == 'PURCHASE_ORDER'>
+                    <input type="hidden" name="${shipGroupIndex?default('0')}_is_gift" value="false">
+                <#else>
+                    <#if (productStore.showCheckoutGiftOptions)?default('Y') != 'N'>
+                        <tr>
+                            <td colspan="2">
+                                <div>
+                                    <span class="h2"><b>${uiLabelMap.OrderIsThisGift}</b></span>
+                                    <input type="radio" <#if cart.getIsGift(shipGroupIndex)?default('Y') == 'Y'>checked="checked"</#if> name="${shipGroupIndex?default('0')}_is_gift" value="true"><span class="tabletext">${uiLabelMap.CommonYes}</span>
+                                    <input type="radio" <#if cart.getIsGift(shipGroupIndex)?default('N') == 'N'>checked="checked"</#if> name="${shipGroupIndex?default('0')}_is_gift" value="false"><span class="tabletext">${uiLabelMap.CommonNo}</span>
+                                </div>
+                            </td>
+                        </tr>
                     </#if>
-                  </td>
-                </tr>
-                <#if cart.getOrderType() != "PURCHASE_ORDER">
-                <tr><td colspan="2"><hr/></td></tr>
-                <tr>
-                  <td colspan="2">
-                    <h2>${uiLabelMap.OrderGiftMessage}</h2>
-                  </td>
-                </tr>
-                <tr>
-                  <td colspan="2">
-                    <textarea cols="30" rows="3" name="${shipGroupIndex?default("0")}_gift_message">${cart.getGiftMessage(shipGroupIndex)?if_exists}</textarea>
-                  </td>
-                </tr>
-                 </#if>
+                    <tr><td colspan="2"><hr /></td></tr>
+                    <tr>
+                        <td colspan="2">
+                            <h2>${uiLabelMap.OrderGiftMessage}</h2>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td colspan="2">
+                            <textarea cols="30" rows="3" name="${shipGroupIndex?default('0')}_gift_message">${cart.getGiftMessage(shipGroupIndex)?if_exists}</textarea>
+                        </td>
+                    </tr>
                 </#if>
+
                    <tr>
                       <td colspan="2"></td>
                    </tr>

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/orderagreements.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/orderagreements.ftl?rev=795883&r1=795882&r2=795883&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/orderagreements.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/orderagreements.ftl Mon Jul 20 15:52:05 2009
@@ -128,7 +128,7 @@
             <select name="currencyUomId">
               <option value=""></option>
               <#list currencies as currency>
-              <option value="${currency.uomId}" <#if (defaultCurrencyUomId?has_content) && (currency.uomId == defaultCurrencyUomId)>selected</#if>>${currency.uomId}</option>
+              <option value="${currency.uomId}" <#if currencyUomId?default('') == currency.uomId>selected="selected"</#if> >${currency.uomId}</option>
               </#list>
             </select>
           </div>
@@ -143,11 +143,9 @@
         <td>&nbsp;</td>
         <td>
            <select name='CURRENT_CATALOG_ID'>
-            <option value='${currentCatalogId}'>${currentCatalogName}</option>
-            <option value='${currentCatalogId}'></option>
-            <#list catalogCol as catalogId>
+            <#list catalogCol?if_exists as catalogId>
               <#assign thisCatalogName = Static["org.ofbiz.product.catalog.CatalogWorker"].getCatalogName(request, catalogId)>
-              <option value='${catalogId}'>${thisCatalogName}</option>
+              <option value="${catalogId}" <#if currentCatalogId?default('') == catalogId>selected="selected"</#if> >${thisCatalogName}</option>
             </#list>
           </select>
         </td>

Modified: ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml?rev=795883&r1=795882&r2=795883&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml Mon Jul 20 15:52:05 2009
@@ -111,8 +111,6 @@
 
     <WebSite webSiteId="WebStore" siteName="eCommerce Web Site" productStoreId="9000" visualThemeSetId="ECOMMERCE"/>
     <WebSite webSiteId="WebStoreClone" siteName="Cloned eCommerce Web Site" productStoreId="9000" visualThemeSetId="ECOMMERCE"/>
-    <!-- the following item is defined in the OrderTypeData.xml file and just the productStoreId is being associated with it here -->
-    <WebSite webSiteId="OrderEntry" productStoreId="9000"/>
     
     <ProdCatalog prodCatalogId="DemoCatalog" catalogName="Demo Catalog" useQuickAdd="Y"/>
     <ProdCatalog prodCatalogId="TestCatalog" catalogName="Test Catalog" useQuickAdd="N"/>