Author: jleroux
Date: Fri Jun 30 18:50:22 2017 New Revision: 1800450 URL: http://svn.apache.org/viewvc?rev=1800450&view=rev Log: No functional change, completes r179986 which was framework only, this is for plugins ================================================================================ While checking there were no other cases like in OFBIZ-9432 (missing path to class), to be consistent I removed the trailing semicolons in groovy scripts and made few formatting ================================================================================ Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/minilang/customer/CustomerEvents.xml ofbiz/ofbiz-plugins/trunk/ecommerce/minilang/customer/QuickAnonCustomerEvents.xml ofbiz/ofbiz-plugins/trunk/scrum/minilang/ScrumEvents.xml ofbiz/ofbiz-plugins/trunk/webpos/minilang/CartEvents.xml Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/minilang/customer/CustomerEvents.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/minilang/customer/CustomerEvents.xml?rev=1800450&r1=1800449&r2=1800450&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ecommerce/minilang/customer/CustomerEvents.xml (original) +++ ofbiz/ofbiz-plugins/trunk/ecommerce/minilang/customer/CustomerEvents.xml Fri Jun 30 18:50:22 2017 @@ -88,10 +88,10 @@ under the License. <!-- Check the password, etc for validity --> <script>groovy: - String password = (String) userLoginContext.get("currentPassword"); - String confirmPassword = (String) userLoginContext.get("currentPasswordVerify"); - String passwordHint = (String) userLoginContext.get("passwordHint"); - org.apache.ofbiz.common.login.LoginServices.checkNewPassword(newUserLogin, null, password, confirmPassword, passwordHint, error_list, true, locale); + String password = (String) userLoginContext.get("currentPassword") + String confirmPassword = (String) userLoginContext.get("currentPasswordVerify") + String passwordHint = (String) userLoginContext.get("passwordHint") + org.apache.ofbiz.common.login.LoginServices.checkNewPassword(newUserLogin, null, password, confirmPassword, passwordHint, error_list, true, locale) </script> <!-- Create the Person --> @@ -384,8 +384,8 @@ under the License. <find-by-primary-key entity-name="Person" map="personLookup" value-field="personVo"/> <if-empty field="parameters.CLUB_NUMBER"> <script>groovy: - clubId = org.apache.ofbiz.party.party.PartyWorker.createClubId(delegator, "999", 13); - parameters.put("CLUB_NUMBER", clubId); + clubId = org.apache.ofbiz.party.party.PartyWorker.createClubId(delegator, "999", 13) + parameters.put("CLUB_NUMBER", clubId) </script> </if-empty> <set from-field="parameters.CLUB_NUMBER" field="personVo.memberId"/> @@ -395,12 +395,12 @@ under the License. <!-- now finished, log in the user and set the cart's partyId to that of the newly created customer ... --> <if-compare field="allowPassword" operator="equals" value="Y"> <script>groovy: - org.apache.ofbiz.webapp.control.LoginWorker.doBasicLogin(createdUserLogin, request); - org.apache.ofbiz.webapp.control.LoginWorker.autoLoginSet(request, response); - session = request.getSession(); - cart = session.getAttribute("shoppingCart"); + org.apache.ofbiz.webapp.control.LoginWorker.doBasicLogin(createdUserLogin, request) + org.apache.ofbiz.webapp.control.LoginWorker.autoLoginSet(request, response) + session = request.getSession() + cart = session.getAttribute("shoppingCart") if (cart != null) { - cart.setOrderPartyId(tempMap.get("partyId")); + cart.setOrderPartyId(tempMap.get("partyId")) } </script> </if-compare> @@ -819,10 +819,10 @@ under the License. <simple-method method-name="processShipOptions" short-description="Process Ship Options; to be called as a Request Event" login-required="false"> <script>groovy: - shipmentMethod = parameters.get("shipping_method"); - if(shipmentMethod != null){ - parameters.put("shipmentMethodTypeId", shipmentMethod.substring(0, shipmentMethod.indexOf("@"))); - parameters.put("carrierPartyId", shipmentMethod.substring(shipmentMethod.indexOf("@")+1)); + shipmentMethod = parameters.get("shipping_method") + if (shipmentMethod != null) { + parameters.put("shipmentMethodTypeId", shipmentMethod.substring(0, shipmentMethod.indexOf("@"))) + parameters.put("carrierPartyId", shipmentMethod.substring(shipmentMethod.indexOf("@")+1)) } </script> <session-to-field field="cart" session-name="shoppingCart"/> @@ -924,10 +924,10 @@ under the License. <set field="newUserLogin.passwordHint" from-field="userLoginMap.passwordHint"/> <!-- Check the password, etc for validity --> <script>groovy: - String password = (String) userLoginMap.get("currentPassword"); - String confirmPassword = (String) userLoginMap.get("currentPasswordVerify"); - String passwordHint = (String) userLoginMap.get("passwordHint"); - org.apache.ofbiz.common.login.LoginServices.checkNewPassword(newUserLogin, null, password, confirmPassword, passwordHint, error_list, true, locale); + String password = (String) userLoginMap.get("currentPassword") + String confirmPassword = (String) userLoginMap.get("currentPasswordVerify") + String passwordHint = (String) userLoginMap.get("passwordHint") + org.apache.ofbiz.common.login.LoginServices.checkNewPassword(newUserLogin, null, password, confirmPassword, passwordHint, error_list, true, locale) </script> <check-errors/> <set-service-fields service-name="createUserLogin" map="userLoginMap" to-map="userLoginCtx"/> @@ -943,8 +943,8 @@ under the License. <!-- now finished, log in the user and set the cart's partyId --> <script>groovy: - org.apache.ofbiz.webapp.control.LoginWorker.doBasicLogin(userLogin, request); - org.apache.ofbiz.webapp.control.LoginWorker.autoLoginSet(request, response); + org.apache.ofbiz.webapp.control.LoginWorker.doBasicLogin(userLogin, request) + org.apache.ofbiz.webapp.control.LoginWorker.autoLoginSet(request, response) </script> <set field="parameters.userLogin" from-field="userLogin"/> <else> @@ -983,9 +983,9 @@ under the License. <session-to-field field="shoppingCart"/> </if-empty> <script>groovy: - import org.apache.ofbiz.order.shoppingcart.shipping.ShippingEstimateWrapper; - shippingEstWpr = ShippingEstimateWrapper.getWrapper(dispatcher, shoppingCart, 0); - parameters.put("shippingEstWpr", shippingEstWpr); + import org.apache.ofbiz.order.shoppingcart.shipping.ShippingEstimateWrapper + shippingEstWpr = ShippingEstimateWrapper.getWrapper(dispatcher, shoppingCart, 0) + parameters.put("shippingEstWpr", shippingEstWpr) </script> <set field="shippingEstWpr" from-field="parameters.shippingEstWpr"/> <call-object-method obj-field="shippingEstWpr" method-name="getShippingMethods" ret-field="carrierShipmentMethodList"/> @@ -1027,18 +1027,18 @@ under the License. <simple-method method-name="setShippingOption" short-description="Set shipping method" login-required="false"> <script>groovy: - shippingMethod = parameters.get("shipMethod"); - if(shippingMethod != null) { - shipmentMethodTypeId = shippingMethod.substring(0, shippingMethod.indexOf("@")); + shippingMethod = parameters.get("shipMethod") + if (shippingMethod != null) { + shipmentMethodTypeId = shippingMethod.substring(0, shippingMethod.indexOf("@")) if (shippingMethod.indexOf(":") != -1) { - carrierPartyId = shippingMethod.substring(shippingMethod.indexOf("@")+1, shippingMethod.indexOf(":")); - productStoreShipMethId = shippingMethod.substring(shippingMethod.indexOf(":")+1); - parameters.put("productStoreShipMethId", productStoreShipMethId); + carrierPartyId = shippingMethod.substring(shippingMethod.indexOf("@")+1, shippingMethod.indexOf(":")) + productStoreShipMethId = shippingMethod.substring(shippingMethod.indexOf(":") + 1) + parameters.put("productStoreShipMethId", productStoreShipMethId) } else { - carrierPartyId = shippingMethod.substring(shippingMethod.indexOf("@")+1); + carrierPartyId = shippingMethod.substring(shippingMethod.indexOf("@") + 1) } - parameters.put("shipmentMethodTypeId", shipmentMethodTypeId); - parameters.put("carrierPartyId", carrierPartyId); + parameters.put("shipmentMethodTypeId", shipmentMethodTypeId) + parameters.put("carrierPartyId", carrierPartyId) } </script> <set field="shipmentMethodTypeId" from-field="parameters.shipmentMethodTypeId"/> @@ -1074,24 +1074,24 @@ under the License. <set field="locale" from-field="parameters.locale" type="Object"/> <script>groovy: - Map shipCost = org.apache.ofbiz.order.shoppingcart.shipping.ShippingEvents.getShipGroupEstimate(dispatcher, delegator, shoppingCart, 0); - shippingTotal = shipCost.get("shippingTotal"); + Map shipCost = org.apache.ofbiz.order.shoppingcart.shipping.ShippingEvents.getShipGroupEstimate(dispatcher, delegator, shoppingCart, 0) + shippingTotal = shipCost.get("shippingTotal") if (shippingTotal == null) { - shippingTotal = java.math.BigDecimal.ZERO; + shippingTotal = java.math.BigDecimal.ZERO } - shoppingCart.setItemShipGroupEstimate(shippingTotal, 0); - parameters.put("shippingTotal", org.apache.ofbiz.base.util.UtilFormatOut.formatCurrency(shippingTotal, isoCode, locale)); + shoppingCart.setItemShipGroupEstimate(shippingTotal, 0) + parameters.put("shippingTotal", org.apache.ofbiz.base.util.UtilFormatOut.formatCurrency(shippingTotal, isoCode, locale)) - checkOutHelper = new org.apache.ofbiz.order.shoppingcart.CheckOutHelper(dispatcher, delegator, shoppingCart); + checkOutHelper = new org.apache.ofbiz.order.shoppingcart.CheckOutHelper(dispatcher, delegator, shoppingCart) // Calculate and add the tax adjustments - checkOutHelper.calcAndAddTax(); + checkOutHelper.calcAndAddTax() - salesTax = shoppingCart.getTotalSalesTax(); - totalSalesTax = org.apache.ofbiz.base.util.UtilFormatOut.formatCurrency(salesTax, isoCode, locale); - parameters.put("totalSalesTax", totalSalesTax); + salesTax = shoppingCart.getTotalSalesTax() + totalSalesTax = org.apache.ofbiz.base.util.UtilFormatOut.formatCurrency(salesTax, isoCode, locale) + parameters.put("totalSalesTax", totalSalesTax) - cartGrandTotal = org.apache.ofbiz.base.util.UtilFormatOut.formatCurrency(shoppingCart.getGrandTotal(), isoCode, locale); - parameters.put("cartGrandTotal", cartGrandTotal); + cartGrandTotal = org.apache.ofbiz.base.util.UtilFormatOut.formatCurrency(shoppingCart.getGrandTotal(), isoCode, locale) + parameters.put("cartGrandTotal", cartGrandTotal) </script> <call-class-method method-name="doPromotions" class-name="org.apache.ofbiz.order.shoppingcart.product.ProductPromoWorker"> <field field="shoppingCart" type="org.apache.ofbiz.order.shoppingcart.ShoppingCart"/> @@ -1249,8 +1249,8 @@ under the License. </call-service> <set-current-user-login value-field="newUserLogin"/> <script>groovy: - org.apache.ofbiz.webapp.control.LoginWorker.doBasicLogin(newUserLogin, request); - org.apache.ofbiz.webapp.control.LoginWorker.autoLoginSet(request, response); + org.apache.ofbiz.webapp.control.LoginWorker.doBasicLogin(newUserLogin, request) + org.apache.ofbiz.webapp.control.LoginWorker.autoLoginSet(request, response) </script> <!-- disabledDateTime/disableForYears set time until a user login remains disabled --> <if-not-empty field="parameters.disabledDateTime"> Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/minilang/customer/QuickAnonCustomerEvents.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/minilang/customer/QuickAnonCustomerEvents.xml?rev=1800450&r1=1800449&r2=1800450&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ecommerce/minilang/customer/QuickAnonCustomerEvents.xml (original) +++ ofbiz/ofbiz-plugins/trunk/ecommerce/minilang/customer/QuickAnonCustomerEvents.xml Fri Jun 30 18:50:22 2017 @@ -86,10 +86,10 @@ under the License. <!-- Check the password, etc for validity --> <script>groovy: - String password = (String) userLoginContext.get("currentPassword"); - String confirmPassword = (String) userLoginContext.get("currentPasswordVerify"); - String passwordHint = (String) userLoginContext.get("passwordHint"); - org.apache.ofbiz.common.login.LoginServices.checkNewPassword(newUserLogin, null, password, confirmPassword, passwordHint, error_list, true, locale); + String password = (String) userLoginContext.get("currentPassword") + String confirmPassword = (String) userLoginContext.get("currentPasswordVerify") + String passwordHint = (String) userLoginContext.get("passwordHint") + org.apache.ofbiz.common.login.LoginServices.checkNewPassword(newUserLogin, null, password, confirmPassword, passwordHint, error_list, true, locale) </script> <else> <if-compare field="require_login" operator="equals" value="true"> @@ -349,8 +349,8 @@ under the License. <if-not-empty field="newUserLogin"> <!-- If password encryption is enabled, encrpyt it now --> <script>groovy: - boolean useEncryption = "true".equals(org.apache.ofbiz.base.util.UtilProperties.getPropertyValue("security", "password.encrypt")); - if (useEncryption) { newUserLogin.set("currentPassword", org.apache.ofbiz.base.crypto.HashCrypt.getDigestHash((String) newUserLogin.get("currentPassword"))); } + boolean useEncryption = "true".equals(org.apache.ofbiz.base.util.UtilProperties.getPropertyValue("security", "password.encrypt")) + if (useEncryption) { newUserLogin.set("currentPassword", org.apache.ofbiz.base.crypto.HashCrypt.getDigestHash((String) newUserLogin.get("currentPassword"))) } </script> <!-- create the UserLogin manually to get around ordering and security constraints in the service --> <set field="userLoginContext.partyId" from-field="partyId"/> @@ -563,10 +563,10 @@ under the License. <simple-method method-name="processShipOptions" short-description="Process Ship Options; to be called as a Request Event" login-required="false"> <script>groovy: - shipmentMethod = parameters.get("shipping_method"); - if(shipmentMethod != null){ - parameters.put("shipmentMethodTypeId", shipmentMethod.substring(0, shipmentMethod.indexOf("@"))); - parameters.put("carrierPartyId", shipmentMethod.substring(shipmentMethod.indexOf("@")+1)); + shipmentMethod = parameters.get("shipping_method") + if (shipmentMethod != null) { + parameters.put("shipmentMethodTypeId", shipmentMethod.substring(0, shipmentMethod.indexOf("@"))) + parameters.put("carrierPartyId", shipmentMethod.substring(shipmentMethod.indexOf("@")+1)) } </script> <session-to-field field="cart" session-name="shoppingCart"/> Modified: ofbiz/ofbiz-plugins/trunk/scrum/minilang/ScrumEvents.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/scrum/minilang/ScrumEvents.xml?rev=1800450&r1=1800449&r2=1800450&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/scrum/minilang/ScrumEvents.xml (original) +++ ofbiz/ofbiz-plugins/trunk/scrum/minilang/ScrumEvents.xml Fri Jun 30 18:50:22 2017 @@ -698,11 +698,11 @@ </iterate> <if-not-empty field="custRequestIndex"> <script>groovy: - List indexList = custRequestIndex; - Collections.sort(indexList); - Collections.reverse(indexList); - List uniqueCustRequestIndexList = indexList; - return org.apache.ofbiz.base.util.UtilMisc.toMap("uniqueCustRequestIndexList", uniqueCustRequestIndexList); + List indexList = custRequestIndex + Collections.sort(indexList) + Collections.reverse(indexList) + List uniqueCustRequestIndexList = indexList + return org.apache.ofbiz.base.util.UtilMisc.toMap("uniqueCustRequestIndexList", uniqueCustRequestIndexList) </script> </if-not-empty> <if-not-empty field="uniqueCustRequestIndexList"> @@ -759,9 +759,9 @@ <else> <!-- get size --> <script>groovy: - List custRequestSeq = custRequestListWithNewSeq; - List custRequestSeqList = org.apache.ofbiz.base.util.UtilMisc.sortMaps(custRequestSeq, org.apache.ofbiz.base.util.UtilMisc.toList("custSequenceNum")); - return org.apache.ofbiz.base.util.UtilMisc.toMap("custRequestSeqList", custRequestSeqList); + List custRequestSeq = custRequestListWithNewSeq + List custRequestSeqList = org.apache.ofbiz.base.util.UtilMisc.sortMaps(custRequestSeq, org.apache.ofbiz.base.util.UtilMisc.toList("custSequenceNum")) + return org.apache.ofbiz.base.util.UtilMisc.toMap("custRequestSeqList", custRequestSeqList) </script> <set field="custRequestListWithNewSeq" from-field="custRequestSeqList"/> <call-object-method method-name="size" obj-field="custRequestListWithNewSeq" ret-field="newCustCount"/> @@ -4216,15 +4216,15 @@ <!-- Check the password, etc for validity --> <script>groovy: - String password = (String) userLoginContext.get("currentPassword"); - String confirmPassword = (String) userLoginContext.get("currentPasswordVerify"); - String passwordHint = (String) userLoginContext.get("passwordHint"); - org.apache.ofbiz.common.login.LoginServices.checkNewPassword(newUserLogin, null, password, confirmPassword, passwordHint, error_list, true, locale); + String password = (String) userLoginContext.get("currentPassword") + String confirmPassword = (String) userLoginContext.get("currentPasswordVerify") + String passwordHint = (String) userLoginContext.get("passwordHint") + org.apache.ofbiz.common.login.LoginServices.checkNewPassword(newUserLogin, null, password, confirmPassword, passwordHint, error_list, true, locale) </script> <!-- If password encryption is enabled, encrpyt it now --> <script>groovy: - boolean useEncryption = "true".equals(org.apache.ofbiz.base.util.UtilProperties.getPropertyValue("security", "password.encrypt")); - if (useEncryption) { newUserLogin.set("currentPassword", org.apache.ofbiz.base.crypto.HashCrypt.getDigestHash((String) newUserLogin.get("currentPassword"))); } + boolean useEncryption = "true".equals(org.apache.ofbiz.base.util.UtilProperties.getPropertyValue("security", "password.encrypt")) + if (useEncryption) { newUserLogin.set("currentPassword", org.apache.ofbiz.base.crypto.HashCrypt.getDigestHash((String) newUserLogin.get("currentPassword"))) } </script> <!-- create the UserLogin --> Modified: ofbiz/ofbiz-plugins/trunk/webpos/minilang/CartEvents.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/webpos/minilang/CartEvents.xml?rev=1800450&r1=1800449&r2=1800450&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/webpos/minilang/CartEvents.xml (original) +++ ofbiz/ofbiz-plugins/trunk/webpos/minilang/CartEvents.xml Fri Jun 30 18:50:22 2017 @@ -190,20 +190,20 @@ under the License. <check-errors/> <else> <script>groovy: - webPosSession = org.apache.ofbiz.webpos.WebPosEvents.getWebPosSession(request, null); + webPosSession = org.apache.ofbiz.webpos.WebPosEvents.getWebPosSession(request, null) if (webPosSession != null) { - parameters.put("webPosSession", webPosSession); - parameters.put("productStoreId", org.apache.ofbiz.product.store.ProductStoreWorker.getProductStoreId(request)); - parameters.put("catalogId", org.apache.ofbiz.product.catalog.CatalogWorker.getCurrentCatalogId(request)); - parameters.put("webSiteId", org.apache.ofbiz.webapp.website.WebSiteWorker.getWebSiteId(request)); - session = request.getSession(); - parameters.put("autoUserLogin", session.getAttribute("autoUserLogin")); - cart = webPosSession.getCart(); + parameters.put("webPosSession", webPosSession) + parameters.put("productStoreId", org.apache.ofbiz.product.store.ProductStoreWorker.getProductStoreId(request)) + parameters.put("catalogId", org.apache.ofbiz.product.catalog.CatalogWorker.getCurrentCatalogId(request)) + parameters.put("webSiteId", org.apache.ofbiz.webapp.website.WebSiteWorker.getWebSiteId(request)) + session = request.getSession() + parameters.put("autoUserLogin", session.getAttribute("autoUserLogin")) + cart = webPosSession.getCart() if (cart != null) { - parameters.put("cart", cart); - parameters.put("currencyId", cart.getCurrency()); - parameters.put("agreementId", cart.getAgreementId()); - parameters.put("partyId", cart.getPartyId()); + parameters.put("cart", cart) + parameters.put("currencyId", cart.getCurrency()) + parameters.put("agreementId", cart.getAgreementId()) + parameters.put("partyId", cart.getPartyId()) } } </script> @@ -338,9 +338,9 @@ under the License. <check-errors/> <set field="dispatcher" from-field="parameters.dispatcher" type="Object"/> <script>groovy: - import org.apache.ofbiz.order.shoppingcart.shipping.ShippingEstimateWrapper; - shippingEstWpr = ShippingEstimateWrapper.getWrapper(dispatcher, shoppingCart, 0); - parameters.put("shippingEstWpr", shippingEstWpr); + import org.apache.ofbiz.order.shoppingcart.shipping.ShippingEstimateWrapper + shippingEstWpr = ShippingEstimateWrapper.getWrapper(dispatcher, shoppingCart, 0) + parameters.put("shippingEstWpr", shippingEstWpr) </script> <set field="shippingEstWpr" from-field="parameters.shippingEstWpr"/> <call-object-method obj-field="shippingEstWpr" method-name="getShippingMethods" ret-field="carrierShipmentMethodList"/> @@ -392,18 +392,18 @@ under the License. <call-object-method obj-field="webPosSession" method-name="getCurrentTransaction" ret-field="webPosTransaction"/> <check-errors/> <script>groovy: - shippingMethod = parameters.get("shipMethod"); + shippingMethod = parameters.get("shipMethod") if(shippingMethod != null) { - shipmentMethodTypeId = shippingMethod.substring(0, shippingMethod.indexOf("@")); + shipmentMethodTypeId = shippingMethod.substring(0, shippingMethod.indexOf("@")) if (shippingMethod.indexOf(":") != -1) { - carrierPartyId = shippingMethod.substring(shippingMethod.indexOf("@")+1, shippingMethod.indexOf(":")); - productStoreShipMethId = shippingMethod.substring(shippingMethod.indexOf(":")+1); - parameters.put("productStoreShipMethId", productStoreShipMethId); + carrierPartyId = shippingMethod.substring(shippingMethod.indexOf("@")+1, shippingMethod.indexOf(":")) + productStoreShipMethId = shippingMethod.substring(shippingMethod.indexOf(":")+1) + parameters.put("productStoreShipMethId", productStoreShipMethId) } else { - carrierPartyId = shippingMethod.substring(shippingMethod.indexOf("@")+1); + carrierPartyId = shippingMethod.substring(shippingMethod.indexOf("@")+1) } - parameters.put("shipmentMethodTypeId", shipmentMethodTypeId); - parameters.put("carrierPartyId", carrierPartyId); + parameters.put("shipmentMethodTypeId", shipmentMethodTypeId) + parameters.put("carrierPartyId", carrierPartyId) } </script> <set field="shipmentMethodTypeId" from-field="parameters.shipmentMethodTypeId"/> @@ -430,22 +430,22 @@ under the License. <set field="locale" from-field="parameters.locale" type="Object"/> <script>groovy: Map shipCost = org.apache.ofbiz.order.shoppingcart.shipping.ShippingEvents.getShipGroupEstimate(dispatcher, delegator, shoppingCart, 0); - shippingTotal = shipCost.get("shippingTotal"); + shippingTotal = shipCost.get("shippingTotal") if (shippingTotal == null) { shippingTotal = BigDecimal.ZERO; } - shoppingCart.setItemShipGroupEstimate(shippingTotal, 0); - parameters.put("shippingTotal", org.apache.ofbiz.base.util.UtilFormatOut.formatCurrency(shippingTotal, isoCode, locale)); + shoppingCart.setItemShipGroupEstimate(shippingTotal, 0) + parameters.put("shippingTotal", org.apache.ofbiz.base.util.UtilFormatOut.formatCurrency(shippingTotal, isoCode, locale)) // Calculate and add the tax adjustments - webPosTransaction.calcTax(); + webPosTransaction.calcTax() - salesTax = shoppingCart.getTotalSalesTax(); - totalSalesTax = org.apache.ofbiz.base.util.UtilFormatOut.formatCurrency(salesTax, isoCode, locale); - parameters.put("totalSalesTax", totalSalesTax); + salesTax = shoppingCart.getTotalSalesTax() + totalSalesTax = org.apache.ofbiz.base.util.UtilFormatOut.formatCurrency(salesTax, isoCode, locale) + parameters.put("totalSalesTax", totalSalesTax) - cartGrandTotal = org.apache.ofbiz.base.util.UtilFormatOut.formatCurrency(shoppingCart.getGrandTotal(), isoCode, locale); - parameters.put("cartGrandTotal", cartGrandTotal); + cartGrandTotal = org.apache.ofbiz.base.util.UtilFormatOut.formatCurrency(shoppingCart.getGrandTotal(), isoCode, locale) + parameters.put("cartGrandTotal", cartGrandTotal) </script> <call-class-method method-name="doPromotions" class-name="org.apache.ofbiz.order.shoppingcart.product.ProductPromoWorker"> <field field="shoppingCart" type="org.apache.ofbiz.order.shoppingcart.ShoppingCart"/> |
Free forum by Nabble | Edit this page |