Author: deepak
Date: Tue Jul 5 08:27:38 2016
New Revision: 1751407
URL:
http://svn.apache.org/viewvc?rev=1751407&view=revLog:
(OFBIZ-7654) Applied patch jira issue.
===========================================
Success message should be shown on screen for successfully applied promotion
===========================================
Thanks Pawan Verma for your contribution.
Modified:
ofbiz/trunk/applications/order/config/OrderUiLabels.xml
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
Modified: ofbiz/trunk/applications/order/config/OrderUiLabels.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/config/OrderUiLabels.xml?rev=1751407&r1=1751406&r2=1751407&view=diff==============================================================================
--- ofbiz/trunk/applications/order/config/OrderUiLabels.xml (original)
+++ ofbiz/trunk/applications/order/config/OrderUiLabels.xml Tue Jul 5 08:27:38 2016
@@ -10191,6 +10191,9 @@
<value xml:lang="zh">ç¨äºä¿éç产å</value>
<value xml:lang="zh-TW">ç¨æ¼ä¿é·çç¢å</value>
</property>
+ <property key="OrderPromoAppliedSuccessfully">
+ <value xml:lang="en">Promotion Code[${productPromoCodeId}] has been applied successfully</value>
+ </property>
<property key="OrderPromotion">
<value xml:lang="ar">ترÙÙج</value>
<value xml:lang="de">Aktionen</value>
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java?rev=1751407&r1=1751406&r2=1751407&view=diff==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java Tue Jul 5 08:27:38 2016
@@ -82,6 +82,7 @@ public class ShoppingCartEvents {
public static final MathContext generalRounding = new MathContext(10);
public static String addProductPromoCode(HttpServletRequest request, HttpServletResponse response) {
+ Locale locale = UtilHttp.getLocale(request);
LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
ShoppingCart cart = getCartObject(request);
String productPromoCodeId = request.getParameter("productPromoCodeId");
@@ -92,6 +93,7 @@ public class ShoppingCartEvents {
return "error";
}
}
+ request.setAttribute("_EVENT_MESSAGE_", UtilProperties.getMessage(resource, "OrderPromoAppliedSuccessfully", UtilMisc.toMap("productPromoCodeId", productPromoCodeId), locale));
return "success";
}