Author: mor
Date: Thu Jul 9 05:22:02 2009
New Revision: 792402
URL: http://svn.apache.org/viewvc?rev=792402&view=rev
Log:
While placing an order through order manager user can add shipping
notes. These notes are saved similar to internal order notes but
shipping notes are public while internal
order notes are private. Patch from Akash Jain.
Modified:
ofbiz/trunk/applications/order/config/OrderUiLabels.xml
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/
CheckOutEvents.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/
CheckOutHelper.java
ofbiz/trunk/applications/order/webapp/ordermgr/entry/
optionsettings.ftl
Modified: ofbiz/trunk/applications/order/config/OrderUiLabels.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/config/OrderUiLabels.xml?rev=792402&r1=792401&r2=792402&view=diff
=
=
=
=
=
=
=
=
=
=====================================================================
--- ofbiz/trunk/applications/order/config/OrderUiLabels.xml
(original)
+++ ofbiz/trunk/applications/order/config/OrderUiLabels.xml Thu
Jul 9 05:22:02 2009
@@ -8569,6 +8569,9 @@
<value xml:lang="th">สà’√à¸Ωà¸≠à¸
à¸Ωà¸¡à¸”à’•à¸¡à¸·à’√à¸
มีสิà¸˙à¸≥à’≈ด</value>
<value xml:lang="zh">æ˛≈货昶镙å√°</
value>
</property>
+ <property key="OrderShippingNotes">
+ <value xml:lang="en">Shipping Notes</value>
+ </property>
<property key="OrderShipRequest">
<value xml:lang="de">Versandanfrage</value>
<value xml:lang="en">Ship Request</value>
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/
shoppingcart/CheckOutEvents.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java?rev=792402&r1=792401&r2=792402&view=diff
=
=
=
=
=
=
=
=
=
=====================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/
CheckOutEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/
CheckOutEvents.java Thu Jul 9 05:22:02 2009
@@ -667,6 +667,7 @@
String shipBeforeDate = null;
String shipAfterDate = null;
String internalOrderNotes = null;
+ String shippingNotes = null;
String mode = request.getParameter("finalizeMode");
Debug.logInfo("FinalizeMode: " + mode, module);
@@ -784,8 +785,9 @@
shipBeforeDate =
request.getParameter(shipGroupIndex + "_shipBeforeDate");
shipAfterDate =
request.getParameter(shipGroupIndex + "_shipAfterDate");
internalOrderNotes =
request.getParameter("internal_order_notes");
+ shippingNotes =
request.getParameter("shippingNotes");
- callResult =
checkOutHelper.finalizeOrderEntryOptions(shipGroupIndex,
shippingMethod, shippingInstructions, maySplit, giftMessage,
isGift, internalCode, shipBeforeDate, shipAfterDate,
internalOrderNotes);
+ callResult =
checkOutHelper.finalizeOrderEntryOptions(shipGroupIndex,
shippingMethod, shippingInstructions, maySplit, giftMessage,
isGift, internalCode, shipBeforeDate, shipAfterDate,
internalOrderNotes, shippingNotes);
ServiceUtil.addErrors(errorMessages, errorMaps,
callResult);
}
}
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=792402&r1=792401&r2=792402&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 Thu Jul 9 05:22:02 2009
@@ -1310,12 +1310,12 @@
* any error messages
*/
public Map finalizeOrderEntryOptions(int shipGroupIndex, String
shippingMethod, String shippingInstructions, String maySplit,
- String giftMessage, String isGift, String
internalCode, String shipBeforeDate, String shipAfterDate, String
orderAdditionalEmails, String internalOrderNotes) {
+ String giftMessage, String isGift, String
internalCode, String shipBeforeDate, String shipAfterDate, String
orderAdditionalEmails) {
this.cart.setOrderAdditionalEmails(orderAdditionalEmails);
- return finalizeOrderEntryOptions(shipGroupIndex,
shippingMethod, shippingInstructions, maySplit, giftMessage,
isGift, internalCode, shipBeforeDate, shipAfterDate,
internalOrderNotes);
+ return finalizeOrderEntryOptions(shipGroupIndex,
shippingMethod, shippingInstructions, maySplit, giftMessage,
isGift, internalCode, shipBeforeDate, shipAfterDate, null, null);
}
public Map finalizeOrderEntryOptions(int shipGroupIndex, String
shippingMethod, String shippingInstructions, String maySplit,
- String giftMessage, String isGift, String
internalCode, String shipBeforeDate, String shipAfterDate, String
internalOrderNotes) {
+ String giftMessage, String isGift, String
internalCode, String shipBeforeDate, String shipAfterDate, String
internalOrderNotes, String shippingNotes) {
Map result = ServiceUtil.returnSuccess();
@@ -1378,6 +1378,11 @@
}
}
+ // Shipping Notes for order will be public
+ if (UtilValidate.isNotEmpty(shippingNotes)) {
+ this.cart.addOrderNote(shippingNotes);
+ }
+
return result;
}
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=792402&r1=792401&r2=792402&view=diff
=
=
=
=
=
=
=
=
=
=====================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/
optionsettings.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/
optionsettings.ftl Thu Jul 9 05:22:02 2009
@@ -39,12 +39,24 @@
<table width="100%" cellpadding="1" border="0"
cellpadding="0" cellspacing="0">
<tr>
<td colspan="2">
- <h2>${uiLabelMap.OrderInternalNote}</h2>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <textarea cols="30" rows="3"
name="internal_order_notes"></textarea>
+ <table width="100%" cellpadding="1" border="0"
cellpadding="0" cellspacing="0">
+ <tr>
+ <td colspan="2">
+ <h2>${uiLabelMap.OrderInternalNote}</h2>
+ </td>
+ <td colspan="2">
+ <h2>${uiLabelMap.OrderShippingNotes}</h2>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <textarea cols="30" rows="3"
name="internal_order_notes"></textarea>
+ </td>
+ <td colspan="2">
+ <textarea cols="30" rows="3"
name="shippingNotes"></textarea>
+ </td>
+ </tr>
+ </table>
</td>
</tr>
<tr><td colspan="2"><hr/></td></tr>