svn commit: r1751407 - in /ofbiz/trunk/applications/order: config/OrderUiLabels.xml src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java

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

svn commit: r1751407 - in /ofbiz/trunk/applications/order: config/OrderUiLabels.xml src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java

Deepak Dixit-5
Author: deepak
Date: Tue Jul  5 08:27:38 2016
New Revision: 1751407

URL: http://svn.apache.org/viewvc?rev=1751407&view=rev
Log:
(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";
     }