svn commit: r1861811 - /ofbiz/ofbiz-framework/trunk/applications/product/template/promo/EditProductPromoRules.ftl

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

svn commit: r1861811 - /ofbiz/ofbiz-framework/trunk/applications/product/template/promo/EditProductPromoRules.ftl

surajk
Author: surajk
Date: Sat Jun 22 04:56:53 2019
New Revision: 1861811

URL: http://svn.apache.org/viewvc?rev=1861811&view=rev
Log:
Fixed: Promotion condition/action type of few promotion not showing.
(OFBIZ-10794)
This was caused due to some refactoring work in promotions screens related inputParamEnumId and customMethodId.
Thanks Lalit Dashora for reporting the issue and providing the patch.

Modified:
    ofbiz/ofbiz-framework/trunk/applications/product/template/promo/EditProductPromoRules.ftl

Modified: ofbiz/ofbiz-framework/trunk/applications/product/template/promo/EditProductPromoRules.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/template/promo/EditProductPromoRules.ftl?rev=1861811&r1=1861810&r2=1861811&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/template/promo/EditProductPromoRules.ftl (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/template/promo/EditProductPromoRules.ftl Sat Jun 22 04:56:53 2019
@@ -80,11 +80,15 @@ under the License.
                   <input type="hidden" name="productPromoId" value="${(productPromoCond.productPromoId)!}"/>
                   <input type="hidden" name="productPromoRuleId" value="${(productPromoCond.productPromoRuleId)!}"/>
                   <input type="hidden" name="productPromoCondSeqId" value="${(productPromoCond.productPromoCondSeqId)!}"/>
-                  <select name="inputParamEnumId" size="1">
+                  <select name="customMethodId" size="1">
                   <#if (productPromoCond.customMethodId)??>
                     <#assign customMethod = productPromoCond.getRelatedOne("CustomMethod", true)>
                              <option value="${productPromoCond.customMethodId}"><#if customMethod??>${(customMethod.get("description",locale))!}<#else>[${(productPromoCond.customMethodId)!}]</#if></option>
                              <option value="${(productPromoCond.customMethodId)!}">&nbsp;</option>
+                      <#elseif (productPromoCond.inputParamEnumId)??>
+                        <#assign inputParamEnumeration = productPromoCond.getRelatedOne("InputParamEnumeration", true)! />
+                        <#assign customMethod = EntityQuery.use(delegator).from("CustomMethod").where("customMethodId", inputParamEnumeration.enumCode!).cache().queryOne()!>
+                        <option value="${(customMethod.customMethodId)!}">${(inputParamEnumeration.get("description",locale))!}</option>
       <#else>
                     <option value="">&nbsp;</option>
       </#if>
@@ -290,6 +294,10 @@ under the License.
         <#assign productPromoActionCurEnum = productPromoAction.getRelatedOne("ActionEnumeration", true)>
                       <option value="${(productPromoAction.customMethodId)!}"><#if productPromoActionCurEnum??>${(productPromoActionCurEnum.get("description",locale))!}<#else>[${(productPromoAction.customMethodId)!}]</#if></option>
                       <option value="${(productPromoAction.customMethodId)!}">&nbsp;</option>
+        <#elseif (productPromoAction.productPromoActionEnumId)??>
+          <#assign actionEnumeration = productPromoAction.getRelatedOne("ActionEnumeration", true)! />
+          <#assign customMethod = EntityQuery.use(delegator).from("CustomMethod").where("customMethodId", actionEnumeration.enumCode!).cache().queryOne()!>
+            <option value="${(customMethod.customMethodId)!}">${(actionEnumeration.get("description",locale))!}</option>
       <#else>
                       <option value="">&nbsp;</option>
       </#if>