From 77f97242e00a2ead470e26353b6b0f47aae9fee3 Mon Sep 17 00:00:00 2001 From: Adam Heath Date: Tue, 29 May 2012 04:14:59 +0000 Subject: [PATCH] DEPRECATION: specialpurpose/ecommerce: getRelatedOne variants replaced with a getRelatedOne variant that takes a boolean useCache parameter. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343493 13f79535-47bb-0310-9956-ffa450edef68 --- .../ecommerce/misc/ThirdPartyEvents.java | 4 ++-- .../email/ShipmentNotificationEmail.ftl | 2 +- .../templates/email/returnaccept.ftl | 4 ++-- .../templates/survey/genericresult.ftl | 2 +- .../WEB-INF/actions/cart/ShowCart.groovy | 2 +- .../actions/customer/CustomerSurvey.groovy | 2 +- .../customer/EditBillingAddress.groovy | 10 ++++---- .../customer/EditEmailAndTelecomNumber.groovy | 4 ++-- .../customer/EditShippingAddress.groovy | 8 +++---- .../WEB-INF/actions/order/BillSettings.groovy | 10 ++++---- .../actions/order/CheckoutReview.groovy | 2 +- .../order/CheckoutShippingOptions.groovy | 2 +- .../WEB-INF/actions/order/OrderStatus.groovy | 10 ++++---- .../actions/order/PaymentInformation.groovy | 10 ++++---- .../order/QuickAnonCustSettings.groovy | 2 +- .../actions/order/RequestReturn.groovy | 4 ++-- .../WEB-INF/actions/order/ShipSettings.groovy | 2 +- .../shoppinglist/EditShoppingList.groovy | 10 ++++---- .../webapp/ecommerce/cart/showcart.ftl | 2 +- .../ecommerce/catalog/configproductdetail.ftl | 4 ++-- .../ecommerce/catalog/productdetail.ftl | 18 +++++++------- .../ecommerce/customer/FinAccountDetail.ftl | 2 +- .../customer/SerializedInventorySummary.ftl | 2 +- .../ecommerce/customer/digitalproductlist.ftl | 2 +- .../ecommerce/customer/editcontactmech.ftl | 2 +- .../ecommerce/customer/editcreditcard.ftl | 4 ++-- .../ecommerce/customer/editeftaccount.ftl | 4 ++-- .../customer/miniSignUpForContactList.ftl | 2 +- .../webapp/ecommerce/customer/viewprofile.ftl | 24 +++++++++---------- .../webapp/ecommerce/customer/viewreviews.ftl | 2 +- .../ecommerce/order/checkoutpayment.ftl | 6 ++--- .../webapp/ecommerce/order/orderheader.ftl | 16 ++++++------- .../webapp/ecommerce/order/orderhistory.ftl | 4 ++-- .../webapp/ecommerce/order/orderitems.ftl | 24 +++++++++---------- .../ecommerce/order/quickAnonOrderHeader.ftl | 2 +- .../webapp/ecommerce/order/requestreturn.ftl | 4 ++-- .../webapp/ecommerce/order/splitship.ftl | 2 +- .../webapp/ecommerce/quote/QuoteList.ftl | 2 +- .../webapp/ecommerce/request/RequestList.ftl | 4 ++-- .../webapp/ecommerce/request/requestRoles.ftl | 4 ++-- .../shoppinglist/editShoppingList.ftl | 10 ++++---- 41 files changed, 118 insertions(+), 118 deletions(-) diff --git a/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/misc/ThirdPartyEvents.java b/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/misc/ThirdPartyEvents.java index c38cf8733f..5909bcfb33 100644 --- a/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/misc/ThirdPartyEvents.java +++ b/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/misc/ThirdPartyEvents.java @@ -128,7 +128,7 @@ public class ThirdPartyEvents { } try { - party = userLogin == null ? null : userLogin.getRelatedOne("Party"); + party = userLogin == null ? null : userLogin.getRelatedOne("Party", false); } catch (GenericEntityException gee) { Debug.logWarning(gee, module); } @@ -205,7 +205,7 @@ public class ThirdPartyEvents { return "success"; try { - party = userLogin == null ? null : userLogin.getRelatedOne("Party"); + party = userLogin == null ? null : userLogin.getRelatedOne("Party", false); } catch (GenericEntityException gee) { Debug.logWarning(gee, module); } diff --git a/specialpurpose/ecommerce/templates/email/ShipmentNotificationEmail.ftl b/specialpurpose/ecommerce/templates/email/ShipmentNotificationEmail.ftl index 952c307723..30d9b6e282 100644 --- a/specialpurpose/ecommerce/templates/email/ShipmentNotificationEmail.ftl +++ b/specialpurpose/ecommerce/templates/email/ShipmentNotificationEmail.ftl @@ -51,7 +51,7 @@ under the License.
<#list shipmentItems as shipmentItem> <#assign productId = shipmentItem.productId> - <#assign product = shipmentItem.getRelatedOne("Product")> + <#assign product = shipmentItem.getRelatedOne("Product", false)> ${productId?if_exists} - ${product.internalName?if_exists} ${shipmentItem.quantity?if_exists} diff --git a/specialpurpose/ecommerce/templates/email/returnaccept.ftl b/specialpurpose/ecommerce/templates/email/returnaccept.ftl index 99e17ed00f..c39295fb17 100644 --- a/specialpurpose/ecommerce/templates/email/returnaccept.ftl +++ b/specialpurpose/ecommerce/templates/email/returnaccept.ftl @@ -23,8 +23,8 @@ ${uiLabelMap.EcommerceReturnRequest}

 <#list returnItems as item>
-  <#assign returnReason = item.getRelatedOne("ReturnReason")?if_exists>
-  <#assign returnType = item.getRelatedOne("ReturnType")?if_exists>
+  <#assign returnReason = item.getRelatedOne("ReturnReason", false)?if_exists>
+  <#assign returnType = item.getRelatedOne("ReturnType", false)?if_exists>
   ${item.description?default("N/A")} - ${item.returnQuantity?string.number} @ ${item.returnPrice}
 
 
diff --git a/specialpurpose/ecommerce/templates/survey/genericresult.ftl b/specialpurpose/ecommerce/templates/survey/genericresult.ftl index 48b4ae29c9..c02be9cf90 100644 --- a/specialpurpose/ecommerce/templates/survey/genericresult.ftl +++ b/specialpurpose/ecommerce/templates/survey/genericresult.ftl @@ -98,7 +98,7 @@ under the License.
[${uiLabelMap.CommonNotShown}]
<#elseif surveyQuestionAndAppl.surveyQuestionTypeId == "CONTENT"> <#if answer.contentId?has_content> - <#assign content = answer.getRelatedOne("Content")> + <#assign content = answer.getRelatedOne("Content", false)> ${answer.contentId} - ${content.contentName?if_exists} <#elseif surveyQuestionAndAppl.surveyQuestionTypeId == "OPTION"> diff --git a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/ShowCart.groovy b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/ShowCart.groovy index 7c9049692f..f0c09d7473 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/ShowCart.groovy +++ b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/ShowCart.groovy @@ -73,7 +73,7 @@ if(shoppingCartItems) { productCategoryMembers = delegator.findList("ProductCategoryMember", EntityCondition.makeCondition("productId", EntityOperator.EQUALS, parentProductId), null, null, null, false); if (productCategoryMembers) { productCategoryMember = EntityUtil.getFirst(productCategoryMembers); - productCategory = productCategoryMember.getRelatedOne("ProductCategory"); + productCategory = productCategoryMember.getRelatedOne("ProductCategory", false); context.productCategory = productCategory; } } diff --git a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/CustomerSurvey.groovy b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/CustomerSurvey.groovy index e13882d905..5449b118f6 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/CustomerSurvey.groovy +++ b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/CustomerSurvey.groovy @@ -29,7 +29,7 @@ productStoreSurveyId = parameters.productStoreSurveyId; surveyAppl = delegator.findOne("ProductStoreSurveyAppl", [productStoreSurveyId : productStoreSurveyId], false); if (surveyAppl) { - survey = surveyAppl.getRelatedOne("Survey"); + survey = surveyAppl.getRelatedOne("Survey", false); context.survey = survey; if (!parameters._ERROR_MESSAGE_) { diff --git a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy index 34d9a6d41a..c3be210c7c 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy +++ b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy @@ -22,10 +22,10 @@ import org.ofbiz.party.contact.ContactHelper; import org.ofbiz.entity.condition.EntityCondition; if (userLogin) { - party = userLogin.getRelatedOne("Party"); + party = userLogin.getRelatedOne("Party", false); contactMech = EntityUtil.getFirst(ContactHelper.getContactMech(party, "BILLING_LOCATION", "POSTAL_ADDRESS", false)); if (contactMech) { - postalAddress = contactMech.getRelatedOne("PostalAddress"); + postalAddress = contactMech.getRelatedOne("PostalAddress", false); billToContactMechId = postalAddress.contactMechId; context.billToContactMechId = billToContactMechId; context.billToName = postalAddress.toName; @@ -48,7 +48,7 @@ if (userLogin) { creditCards = []; paymentMethod = EntityUtil.getFirst(EntityUtil.filterByDate(delegator.findList("PaymentMethod", EntityCondition.makeCondition([partyId : party.partyId, paymentMethodTypeId : "CREDIT_CARD"]), null, ["fromDate"], null, false))); if (paymentMethod) { - creditCard = paymentMethod.getRelatedOne("CreditCard"); + creditCard = paymentMethod.getRelatedOne("CreditCard", false); context.paymentMethodTypeId = "CREDIT_CARD"; context.cardNumber = creditCard.cardNumber; context.cardType = creditCard.cardType; @@ -67,7 +67,7 @@ if (userLogin) { billToContactMechList = ContactHelper.getContactMech(party, "PHONE_BILLING", "TELECOM_NUMBER", false) if (billToContactMechList) { - billToTelecomNumber = (EntityUtil.getFirst(billToContactMechList)).getRelatedOne("TelecomNumber"); + billToTelecomNumber = (EntityUtil.getFirst(billToContactMechList)).getRelatedOne("TelecomNumber", false); pcm = EntityUtil.getFirst(billToTelecomNumber.getRelated("PartyContactMech")); context.billToTelecomNumber = billToTelecomNumber; context.billToExtension = pcm.extension; @@ -75,7 +75,7 @@ if (userLogin) { billToFaxNumberList = ContactHelper.getContactMech(party, "FAX_BILLING", "TELECOM_NUMBER", false) if (billToFaxNumberList) { - billToFaxNumber = (EntityUtil.getFirst(billToFaxNumberList)).getRelatedOne("TelecomNumber"); + billToFaxNumber = (EntityUtil.getFirst(billToFaxNumberList)).getRelatedOne("TelecomNumber", false); faxPartyContactMech = EntityUtil.getFirst(billToFaxNumber.getRelated("PartyContactMech")); context.billToFaxNumber = billToFaxNumber; context.billToFaxExtension = faxPartyContactMech.extension; diff --git a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditEmailAndTelecomNumber.groovy b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditEmailAndTelecomNumber.groovy index 41636abfb4..be4feedf98 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditEmailAndTelecomNumber.groovy +++ b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditEmailAndTelecomNumber.groovy @@ -21,7 +21,7 @@ import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.party.contact.ContactHelper; if (userLogin) { - party = userLogin.getRelatedOne("Party"); + party = userLogin.getRelatedOne("Party", false); contactMech = EntityUtil.getFirst(ContactHelper.getContactMech(party, "PRIMARY_EMAIL", "EMAIL_ADDRESS", false)); if (contactMech) { @@ -33,7 +33,7 @@ if (userLogin) { if (contactMech) { partyContactMech = EntityUtil.getFirst(EntityUtil.filterByDate(delegator.findByAnd("PartyContactMech", [partyId : party.partyId, contactMechId : contactMech.contactMechId], null, false))); if (partyContactMech) { - telecomNumber = partyContactMech.getRelatedOne("TelecomNumber"); + telecomNumber = partyContactMech.getRelatedOne("TelecomNumber", false); context.phoneContactMechId = telecomNumber.contactMechId; context.countryCode = telecomNumber.countryCode; context.areaCode = telecomNumber.areaCode; diff --git a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy index 4b89bd16e8..ebb53b44b2 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy +++ b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy @@ -21,7 +21,7 @@ import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.party.contact.ContactHelper; if (userLogin) { - party = userLogin.getRelatedOne("Party"); + party = userLogin.getRelatedOne("Party", false); context.partyId = party.partyId if ("PERSON".equals(party.partyTypeId)) { person = delegator.findOne("Person", [partyId : party.partyId], false); @@ -35,7 +35,7 @@ if (userLogin) { contactMech = EntityUtil.getFirst(ContactHelper.getContactMech(party, "SHIPPING_LOCATION", "POSTAL_ADDRESS", false)); if (contactMech) { - postalAddress = contactMech.getRelatedOne("PostalAddress"); + postalAddress = contactMech.getRelatedOne("PostalAddress", false); context.shipToContactMechId = postalAddress.contactMechId; context.shipToName = postalAddress.toName; @@ -60,7 +60,7 @@ if (userLogin) { shipToContactMechList = ContactHelper.getContactMech(party, "PHONE_SHIPPING", "TELECOM_NUMBER", false) if (shipToContactMechList) { - shipToTelecomNumber = (EntityUtil.getFirst(shipToContactMechList)).getRelatedOne("TelecomNumber"); + shipToTelecomNumber = (EntityUtil.getFirst(shipToContactMechList)).getRelatedOne("TelecomNumber", false); pcm = EntityUtil.getFirst(shipToTelecomNumber.getRelated("PartyContactMech")); context.shipToTelecomNumber = shipToTelecomNumber; context.shipToExtension = pcm.extension; @@ -68,7 +68,7 @@ if (userLogin) { shipToFaxNumberList = ContactHelper.getContactMech(party, "FAX_SHIPPING", "TELECOM_NUMBER", false) if (shipToFaxNumberList) { - shipToFaxNumber = (EntityUtil.getFirst(shipToFaxNumberList)).getRelatedOne("TelecomNumber"); + shipToFaxNumber = (EntityUtil.getFirst(shipToFaxNumberList)).getRelatedOne("TelecomNumber", false); faxPartyContactMech = EntityUtil.getFirst(shipToFaxNumber.getRelated("PartyContactMech")); context.shipToFaxNumber = shipToFaxNumber; context.shipToFaxExtension = faxPartyContactMech.extension; diff --git a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/BillSettings.groovy b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/BillSettings.groovy index 4d57242e08..81ba0a6f22 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/BillSettings.groovy +++ b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/BillSettings.groovy @@ -41,7 +41,7 @@ request.removeAttribute("_EVENT_MESSAGE_"); if (partyId && !partyId.equals("_NA_")) { party = delegator.findOne("Party", [partyId : partyId], false); - person = party.getRelatedOne("Person"); + person = party.getRelatedOne("Person", false); context.party = party; context.person = person; if (party) { @@ -79,22 +79,22 @@ if (cart && !parameters.singleUsePayment) { account = null; if ("CREDIT_CARD".equals(paymentMethod.paymentMethodTypeId)) { - account = paymentMethod.getRelatedOne("CreditCard"); + account = paymentMethod.getRelatedOne("CreditCard", false); context.creditCard = account; context.paymentMethodType = "CC"; } else if ("EFT_ACCOUNT".equals(paymentMethod.paymentMethodTypeId)) { - account = paymentMethod.getRelatedOne("EftAccount"); + account = paymentMethod.getRelatedOne("EftAccount", false); context.eftAccount = account; context.paymentMethodType = "EFT"; } else if ("GIFT_CARD".equals(paymentMethod.paymentMethodTypeId)) { - account = paymentMethod.getRelatedOne("GiftCard"); + account = paymentMethod.getRelatedOne("GiftCard", false); context.giftCard = account; context.paymentMethodType = "GC"; } else { context.paymentMethodType = "offline"; } if (account && parameters.useShipAddr) { - address = account.getRelatedOne("PostalAddress"); + address = account.getRelatedOne("PostalAddress", false); context.postalAddress = address; context.postalFields = address; } diff --git a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CheckoutReview.groovy b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CheckoutReview.groovy index 499d8fe544..abfeed4745 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CheckoutReview.groovy +++ b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CheckoutReview.groovy @@ -55,7 +55,7 @@ context.headerAdjustmentsToShow = OrderReadHelper.filterOrderAdjustments(orderHe orderSubTotal = OrderReadHelper.getOrderItemsSubTotal(orderItems, orderAdjustments, workEfforts); context.orderSubTotal = orderSubTotal; -context.placingCustomerPerson = userLogin?.getRelatedOne("Person"); +context.placingCustomerPerson = userLogin?.getRelatedOne("Person", false); context.paymentMethods = cart.getPaymentMethods(); paymentMethodTypeIds = cart.getPaymentMethodTypeIds(); diff --git a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CheckoutShippingOptions.groovy b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CheckoutShippingOptions.groovy index 2a82f5ff65..dbebb0cdce 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CheckoutShippingOptions.groovy +++ b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CheckoutShippingOptions.groovy @@ -25,7 +25,7 @@ import org.ofbiz.product.store.*; import org.ofbiz.order.shoppingcart.shipping.*; cart = session.getAttribute("shoppingCart"); -party = userLogin.getRelatedOne("Party"); +party = userLogin.getRelatedOne("Party", false); productStore = ProductStoreWorker.getProductStore(request); if (cart) { diff --git a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OrderStatus.groovy b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OrderStatus.groovy index 1588f8de70..01429786ba 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OrderStatus.groovy +++ b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OrderStatus.groovy @@ -110,7 +110,7 @@ if (orderId) { } if (orderHeader) { - productStore = orderHeader.getRelatedOneCache("ProductStore"); + productStore = orderHeader.getRelatedOne("ProductStore", true); if (productStore) isDemoStore = !"N".equals(productStore.isDemoStore); orderReadHelper = new OrderReadHelper(orderHeader); @@ -131,16 +131,16 @@ if (orderHeader) { placingCustomerOrderRole = EntityUtil.getFirst(placingCustomerOrderRoles); placingCustomerPerson = placingCustomerOrderRole == null ? null : delegator.findOne("Person", [partyId : placingCustomerOrderRole.partyId], false); - billingAccount = orderHeader.getRelatedOne("BillingAccount"); + billingAccount = orderHeader.getRelatedOne("BillingAccount", false); orderPaymentPreferences = EntityUtil.filterByAnd(orderHeader.getRelated("OrderPaymentPreference"), [EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "PAYMENT_CANCELLED")]); paymentMethods = []; orderPaymentPreferences.each { opp -> - paymentMethod = opp.getRelatedOne("PaymentMethod"); + paymentMethod = opp.getRelatedOne("PaymentMethod", false); if (paymentMethod) { paymentMethods.add(paymentMethod); } else { - paymentMethodType = opp.getRelatedOne("PaymentMethodType"); + paymentMethodType = opp.getRelatedOne("PaymentMethodType", false); if (paymentMethodType) { context.paymentMethodType = paymentMethodType; } @@ -179,7 +179,7 @@ if (orderHeader) { totalItems += oitem.quantity; ritems = oitem.getRelated("ReturnItem"); ritems.each { ritem -> - rh = ritem.getRelatedOne("ReturnHeader"); + rh = ritem.getRelatedOne("ReturnHeader", false); if (!rh.statusId.equals("RETURN_CANCELLED")) { returned += ritem.returnQuantity; } diff --git a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/PaymentInformation.groovy b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/PaymentInformation.groovy index cc1ba44710..21c485c9b2 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/PaymentInformation.groovy +++ b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/PaymentInformation.groovy @@ -37,7 +37,7 @@ context.partyId = partyId; if (partyId && !partyId.equals("_NA_")) { party = delegator.findOne("Party", [partyId : partyId], false); - person = party.getRelatedOne("Person"); + person = party.getRelatedOne("Person", false); context.party = party; context.person = person; } @@ -67,15 +67,15 @@ if (cart) { paymentMethods.each { paymentMethod -> account = null; if ("CREDIT_CARD".equals(paymentMethod?.paymentMethodTypeId)) { - account = paymentMethod.getRelatedOne("CreditCard"); + account = paymentMethod.getRelatedOne("CreditCard", false); context.creditCard = account; context.paymentMethodTypeId = "CREDIT_CARD"; } else if ("EFT_ACCOUNT".equals(paymentMethod?.paymentMethodTypeId)) { - account = paymentMethod.getRelatedOne("EftAccount"); + account = paymentMethod.getRelatedOne("EftAccount", false); context.eftAccount = account; context.paymentMethodTypeId = "EFT_ACCOUNT"; } else if ("GIFT_CARD".equals(paymentMethod?.paymentMethodTypeId)) { - account = paymentMethod.getRelatedOne("GiftCard"); + account = paymentMethod.getRelatedOne("GiftCard", false); context.giftCard = account; context.paymentMethodTypeId = "GIFT_CARD"; context.addGiftCard = "Y"; @@ -83,7 +83,7 @@ if (cart) { context.paymentMethodTypeId = "EXT_OFFLINE"; } if (account && !parameters.useShipAddr) { - address = account.getRelatedOne("PostalAddress"); + address = account.getRelatedOne("PostalAddress", false); context.postalAddress = address; } } diff --git a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/QuickAnonCustSettings.groovy b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/QuickAnonCustSettings.groovy index adf14b48d7..e9bc45638f 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/QuickAnonCustSettings.groovy +++ b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/QuickAnonCustSettings.groovy @@ -95,7 +95,7 @@ request.removeAttribute("_EVENT_MESSAGE_"); if (cartPartyId && !cartPartyId.equals("_NA_")) { cartParty = delegator.findOne("Party", [partyId : cartPartyId], false); if (cartParty) { - cartPerson = cartParty.getRelatedOne("Person"); + cartPerson = cartParty.getRelatedOne("Person", false); context.party = cartParty; context.person = cartPerson; } diff --git a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/RequestReturn.groovy b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/RequestReturn.groovy index e3c46a30a1..c69803c0fc 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/RequestReturn.groovy +++ b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/RequestReturn.groovy @@ -24,7 +24,7 @@ import org.ofbiz.party.contact.*; orderId = parameters.orderId; context.orderId = orderId; -party = userLogin.getRelatedOne("Party"); +party = userLogin.getRelatedOne("Party", false); context.party = party; returnTypes = delegator.findList("ReturnType", null, null, ["sequenceId"], null, false); @@ -48,7 +48,7 @@ context.returnItemTypeMap = typeMap; //put in the return to party information from the order header if (orderId) { order = delegator.findOne("OrderHeader", [orderId : orderId], false); - productStore = order.getRelatedOne("ProductStore"); + productStore = order.getRelatedOne("ProductStore", false); context.toPartyId = productStore.payToPartyId; } diff --git a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipSettings.groovy b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipSettings.groovy index e314b3a985..c3e8260aa9 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipSettings.groovy +++ b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipSettings.groovy @@ -33,7 +33,7 @@ request.removeAttribute("_EVENT_MESSAGE_"); if (partyId && !partyId.equals("_NA_")) { party = delegator.findOne("Party", [partyId : partyId], false); - person = party.getRelatedOne("Person"); + person = party.getRelatedOne("Person", false); context.party = party; context.person = person; } diff --git a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy index 8f145505be..726013358e 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy +++ b/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy @@ -30,7 +30,7 @@ import org.ofbiz.product.catalog.*; import org.ofbiz.product.store.*; import org.ofbiz.service.calendar.*; -party = userLogin.getRelatedOne("Party"); +party = userLogin.getRelatedOne("Party", false); cart = ShoppingCartEvents.getCartObject(request); currencyUomId = cart.getCurrency(); @@ -84,7 +84,7 @@ if (shoppingListId) { shoppingListItems.each { shoppingListItem -> shoppingListItemData = [:]; - product = shoppingListItem.getRelatedOneCache("Product"); + product = shoppingListItem.getRelatedOne("Product", true); calcPriceInMap = [product : product, quantity : shoppingListItem.quantity, currencyUomId : currencyUomId, userLogin : userLogin]; calcPriceInMap.webSiteId = webSiteId; @@ -155,7 +155,7 @@ if (shoppingListId) { context.highIndex = highIndex; } - shoppingListType = shoppingList.getRelatedOne("ShoppingListType"); + shoppingListType = shoppingList.getRelatedOne("ShoppingListType", false); context.shoppingListType = shoppingListType; // get the child shopping lists of the current list for the logged in user @@ -182,14 +182,14 @@ if (shoppingListId) { context.shoppingListChildTotal = shoppingListChildTotal; // get the parent shopping list if there is one - parentShoppingList = shoppingList.getRelatedOne("ParentShoppingList"); + parentShoppingList = shoppingList.getRelatedOne("ParentShoppingList", false); context.parentShoppingList = parentShoppingList; context.canView = userLogin.partyId.equals(shoppingList.partyId); // auto-reorder info if ("SLT_AUTO_REODR".equals(shoppingListType?.shoppingListTypeId)) { - recurrenceVo = shoppingList.getRelatedOne("RecurrenceInfo"); + recurrenceVo = shoppingList.getRelatedOne("RecurrenceInfo", false); context.recurrenceInfo = recurrenceVo; if (userLogin.partyId.equals(shoppingList.partyId)) { diff --git a/specialpurpose/ecommerce/webapp/ecommerce/cart/showcart.ftl b/specialpurpose/ecommerce/webapp/ecommerce/cart/showcart.ftl index e6d48298dd..b8cbdd3c00 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/cart/showcart.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/cart/showcart.ftl @@ -385,7 +385,7 @@ function setAlternateGwp(field) { <#list shoppingCart.getAdjustments() as cartAdjustment> - <#assign adjustmentType = cartAdjustment.getRelatedOneCache("OrderAdjustmentType") /> + <#assign adjustmentType = cartAdjustment.getRelatedOne("OrderAdjustmentType", true) /> ${uiLabelMap.EcommerceAdjustment} - ${adjustmentType.get("description",locale)?if_exists} diff --git a/specialpurpose/ecommerce/webapp/ecommerce/catalog/configproductdetail.ftl b/specialpurpose/ecommerce/webapp/ecommerce/catalog/configproductdetail.ftl index d3fe59d172..8227e9081a 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/catalog/configproductdetail.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/catalog/configproductdetail.ftl @@ -610,8 +610,8 @@ function getConfigDetails(event) {
<#if productReviews?has_content> <#list productReviews as productReview> - <#assign postedUserLogin = productReview.getRelatedOne("UserLogin")> - <#assign postedPerson = postedUserLogin.getRelatedOne("Person")?if_exists> + <#assign postedUserLogin = productReview.getRelatedOne("UserLogin", false)> + <#assign postedPerson = postedUserLogin.getRelatedOne("Person", false)?if_exists> diff --git a/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl b/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl index 53166a0ec1..3969fab411 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl @@ -325,7 +325,7 @@ $(function(){ <#assign features = prod.getRelated("ProductFeatureAppl")/>
  • <#list features as feature> - ${feature.getRelatedOne("ProductFeature").description}<#if feature_has_next>, + ${feature.getRelatedOne("ProductFeature", false).description}<#if feature_has_next>, ${uiLabelMap.ProductItemOutOfStock}
  • @@ -495,32 +495,32 @@ $(function(){ <#if (product.quantityIncluded?exists && product.quantityIncluded != 0) || product.quantityUomId?has_content> - <#assign quantityUom = product.getRelatedOneCache("QuantityUom")?if_exists /> + <#assign quantityUom = product.getRelatedOne("QuantityUom", true)?if_exists />
    ${uiLabelMap.CommonQuantity}: ${product.quantityIncluded?if_exists} ${((quantityUom.abbreviation)?default(product.quantityUomId))?if_exists}
    <#if (product.weight?exists && product.weight != 0) || product.weightUomId?has_content> - <#assign weightUom = product.getRelatedOneCache("WeightUom")?if_exists /> + <#assign weightUom = product.getRelatedOne("WeightUom", true)?if_exists />
    ${uiLabelMap.CommonWeight}: ${product.weight?if_exists} ${((weightUom.abbreviation)?default(product.weightUomId))?if_exists}
    <#if (product.productHeight?exists && product.productHeight != 0) || product.heightUomId?has_content> - <#assign heightUom = product.getRelatedOneCache("HeightUom")?if_exists /> + <#assign heightUom = product.getRelatedOne("HeightUom", true)?if_exists />
    ${uiLabelMap.CommonHeight}: ${product.productHeight?if_exists} ${((heightUom.abbreviation)?default(product.heightUomId))?if_exists}
    <#if (product.productWidth?exists && product.productWidth != 0) || product.widthUomId?has_content> - <#assign widthUom = product.getRelatedOneCache("WidthUom")?if_exists /> + <#assign widthUom = product.getRelatedOne("WidthUom", true)?if_exists />
    ${uiLabelMap.CommonWidth}: ${product.productWidth?if_exists} ${((widthUom.abbreviation)?default(product.widthUomId))?if_exists}
    <#if (product.productDepth?exists && product.productDepth != 0) || product.depthUomId?has_content> - <#assign depthUom = product.getRelatedOneCache("DepthUom")?if_exists /> + <#assign depthUom = product.getRelatedOne("DepthUom", true)?if_exists />
    ${uiLabelMap.CommonDepth}: ${product.productDepth?if_exists} ${((depthUom.abbreviation)?default(product.depthUomId))?if_exists}
    @@ -539,7 +539,7 @@ $(function(){ <#if disFeatureList?exists && 0 < disFeatureList.size()>

     

    <#list disFeatureList as currentFeature> - <#assign disFeatureType = currentFeature.getRelatedOneCache("ProductFeatureType") /> + <#assign disFeatureType = currentFeature.getRelatedOne("ProductFeatureType", true) />
    <#if disFeatureType.description?exists>${disFeatureType.get("description", locale)}<#else>${currentFeature.productFeatureTypeId}: ${currentFeature.description}
    @@ -784,8 +784,8 @@ $(function(){
    <#if productReviews?has_content> <#list productReviews as productReview> - <#assign postedUserLogin = productReview.getRelatedOne("UserLogin") /> - <#assign postedPerson = postedUserLogin.getRelatedOne("Person")?if_exists /> + <#assign postedUserLogin = productReview.getRelatedOne("UserLogin", false) /> + <#assign postedPerson = postedUserLogin.getRelatedOne("Person", false)?if_exists />
    ${uiLabelMap.CommonBy}: <#if productReview.postedAnonymous?default("N") == "Y"> ${uiLabelMap.OrderAnonymous}<#else> ${postedPerson.firstName} ${postedPerson.lastName} 
    ${uiLabelMap.CommonAt}: ${productReview.postedDateTime?if_exists} 
    ${uiLabelMap.OrderRanking}: ${productReview.productRating?if_exists?string}
    diff --git a/specialpurpose/ecommerce/webapp/ecommerce/customer/FinAccountDetail.ftl b/specialpurpose/ecommerce/webapp/ecommerce/customer/FinAccountDetail.ftl index 1ee33b8dd2..8e5f8da4a2 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/customer/FinAccountDetail.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/customer/FinAccountDetail.ftl @@ -52,7 +52,7 @@ under the License. <#list ownedFinAccountTransList as ownedFinAccountTrans> - <#assign finAccountTransType = ownedFinAccountTrans.getRelatedOne("FinAccountTransType")/> + <#assign finAccountTransType = ownedFinAccountTrans.getRelatedOne("FinAccountTransType", false)/> <#assign displayAmount = ownedFinAccountTrans.amount/> <#if ownedFinAccountTrans.finAccountTransTypeId == "WITHDRAWAL"> <#assign displayAmount = -displayAmount/> diff --git a/specialpurpose/ecommerce/webapp/ecommerce/customer/SerializedInventorySummary.ftl b/specialpurpose/ecommerce/webapp/ecommerce/customer/SerializedInventorySummary.ftl index 84fb91bd36..d5ccdca6d4 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/customer/SerializedInventorySummary.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/customer/SerializedInventorySummary.ftl @@ -35,7 +35,7 @@ under the License. <#list inventoryItemList as inventoryItem> - <#assign product = inventoryItem.getRelatedOne('Product')?if_exists> + <#assign product = inventoryItem.getRelatedOne('Product', false)?if_exists> <#list supplierProductList as supplierProduct> - <#assign product = supplierProduct.getRelatedOneCache("Product")/> + <#assign product = supplierProduct.getRelatedOne("Product", true)/>
    Amount
    ${inventoryItem.inventoryItemId} diff --git a/specialpurpose/ecommerce/webapp/ecommerce/customer/digitalproductlist.ftl b/specialpurpose/ecommerce/webapp/ecommerce/customer/digitalproductlist.ftl index b55bd90639..b3ed334698 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/customer/digitalproductlist.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/customer/digitalproductlist.ftl @@ -36,7 +36,7 @@ under the License.  

    diff --git a/specialpurpose/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl b/specialpurpose/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl index cf87978213..aa0f2ede00 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl @@ -70,7 +70,7 @@ under the License. <#list partyContactMechPurposes?if_exists as partyContactMechPurpose> - <#assign contactMechPurposeType = partyContactMechPurpose.getRelatedOneCache("ContactMechPurposeType") /> + <#assign contactMechPurposeType = partyContactMechPurpose.getRelatedOne("ContactMechPurposeType", true) /> <#if orderHeaderList?has_content> <#list orderHeaderList as orderHeader> - <#assign status = orderHeader.getRelatedOneCache("StatusItem") /> + <#assign status = orderHeader.getRelatedOne("StatusItem", true) /> @@ -76,7 +76,7 @@ under the License. <#if porderHeaderList?has_content> <#list porderHeaderList as porderHeader> - <#assign pstatus = porderHeader.getRelatedOneCache("StatusItem") /> + <#assign pstatus = porderHeader.getRelatedOne("StatusItem", true) /> diff --git a/specialpurpose/ecommerce/webapp/ecommerce/order/orderitems.ftl b/specialpurpose/ecommerce/webapp/ecommerce/order/orderitems.ftl index 08e2ae1c64..8b588250fa 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/order/orderitems.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/order/orderitems.ftl @@ -108,7 +108,7 @@ under the License. <#assign WorkOrderItemFulfillments = orderItem.getRelated("WorkOrderItemFulfillment")?if_exists> <#if WorkOrderItemFulfillments?has_content> <#list WorkOrderItemFulfillments as WorkOrderItemFulfillment> - <#assign workEffortSave = WorkOrderItemFulfillment.getRelatedOneCache("WorkEffort")?if_exists> + <#assign workEffortSave = WorkOrderItemFulfillment.getRelatedOne("WorkEffort", true)?if_exists> <#break> @@ -120,7 +120,7 @@ under the License. ${orderItem.itemDescription?default("")} <#else> - <#assign product = orderItem.getRelatedOneCache("Product")?if_exists/> <#-- should always exist because of FK constraint, but just in case --> + <#assign product = orderItem.getRelatedOne("Product", true)?if_exists/> <#-- should always exist because of FK constraint, but just in case -->
    <#if contactMechPurposeType?exists> diff --git a/specialpurpose/ecommerce/webapp/ecommerce/customer/editcreditcard.ftl b/specialpurpose/ecommerce/webapp/ecommerce/customer/editcreditcard.ftl index a3b5868c28..0cb7d25392 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/customer/editcreditcard.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/customer/editcreditcard.ftl @@ -55,7 +55,7 @@ under the License. ${uiLabelMap.PartyUseCurrentAddress}: <#list curPartyContactMechPurposes as curPartyContactMechPurpose> - <#assign curContactMechPurposeType = curPartyContactMechPurpose.getRelatedOneCache("ContactMechPurposeType") /> + <#assign curContactMechPurposeType = curPartyContactMechPurpose.getRelatedOne("ContactMechPurposeType", true) />
    ${curContactMechPurposeType.get("description",locale)?if_exists} <#if curPartyContactMechPurpose.thruDate?exists> @@ -100,7 +100,7 @@ under the License.
    <#list partyContactMechPurposes as partyContactMechPurpose> - <#assign contactMechPurposeType = partyContactMechPurpose.getRelatedOneCache("ContactMechPurposeType") /> + <#assign contactMechPurposeType = partyContactMechPurpose.getRelatedOne("ContactMechPurposeType", true) />
    ${contactMechPurposeType.get("description",locale)?if_exists} <#if partyContactMechPurpose.thruDate?exists>(${uiLabelMap.CommonExpire}:${partyContactMechPurpose.thruDate}) diff --git a/specialpurpose/ecommerce/webapp/ecommerce/customer/editeftaccount.ftl b/specialpurpose/ecommerce/webapp/ecommerce/customer/editeftaccount.ftl index 7f1f7528c8..9d93353325 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/customer/editeftaccount.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/customer/editeftaccount.ftl @@ -105,7 +105,7 @@ under the License.
    ${uiLabelMap.PartyUseCurrentAddress}:
    <#list curPartyContactMechPurposes as curPartyContactMechPurpose> - <#assign curContactMechPurposeType = curPartyContactMechPurpose.getRelatedOneCache("ContactMechPurposeType")> + <#assign curContactMechPurposeType = curPartyContactMechPurpose.getRelatedOne("ContactMechPurposeType", true)>
    ${curContactMechPurposeType.get("description",locale)?if_exists} <#if curPartyContactMechPurpose.thruDate?exists> @@ -150,7 +150,7 @@ under the License.
    <#list partyContactMechPurposes as partyContactMechPurpose> - <#assign contactMechPurposeType = partyContactMechPurpose.getRelatedOneCache("ContactMechPurposeType")> + <#assign contactMechPurposeType = partyContactMechPurpose.getRelatedOne("ContactMechPurposeType", true)>
    ${contactMechPurposeType.get("description",locale)?if_exists} <#if partyContactMechPurpose.thruDate?exists>(${uiLabelMap.CommonExpire}:${partyContactMechPurpose.thruDate}) diff --git a/specialpurpose/ecommerce/webapp/ecommerce/customer/miniSignUpForContactList.ftl b/specialpurpose/ecommerce/webapp/ecommerce/customer/miniSignUpForContactList.ftl index b8a838d108..8814e3f3e2 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/customer/miniSignUpForContactList.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/customer/miniSignUpForContactList.ftl @@ -21,7 +21,7 @@ under the License. <#macro contactList publicEmailContactLists> diff --git a/specialpurpose/ecommerce/webapp/ecommerce/customer/viewprofile.ftl b/specialpurpose/ecommerce/webapp/ecommerce/customer/viewprofile.ftl index c2c96461de..2c1d3f0f74 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/customer/viewprofile.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/customer/viewprofile.ftl @@ -126,7 +126,7 @@ under the License.
      <#list partyContactMechValueMap.partyContactMechPurposes?if_exists as partyContactMechPurpose> - <#assign contactMechPurposeType = partyContactMechPurpose.getRelatedOneCache("ContactMechPurposeType") /> + <#assign contactMechPurposeType = partyContactMechPurpose.getRelatedOne("ContactMechPurposeType", true) />
    <#if contactMechPurposeType?exists> ${contactMechPurposeType.get("description",locale)} @@ -403,10 +403,10 @@ under the License. <#if partyContent?has_content> <#list partyContent as contentRole> - <#assign content = contentRole.getRelatedOne("Content") /> - <#assign contentType = content.getRelatedOneCache("ContentType") /> - <#assign mimeType = content.getRelatedOneCache("MimeType")?if_exists /> - <#assign status = content.getRelatedOneCache("StatusItem") /> + <#assign content = contentRole.getRelatedOne("Content", false) /> + <#assign contentType = content.getRelatedOne("ContentType", true) /> + <#assign mimeType = content.getRelatedOne("MimeType", true)?if_exists /> + <#assign status = content.getRelatedOne("StatusItem", true) /> @@ -475,10 +475,10 @@ under the License. <#list contactListPartyList as contactListParty> - <#assign contactList = contactListParty.getRelatedOne("ContactList")?if_exists /> - <#assign statusItem = contactListParty.getRelatedOneCache("StatusItem")?if_exists /> - <#assign emailAddress = contactListParty.getRelatedOneCache("PreferredContactMech")?if_exists /> - <#-- <#assign contactListType = contactList.getRelatedOneCache("ContactListType")/> --> + <#assign contactList = contactListParty.getRelatedOne("ContactList", false)?if_exists /> + <#assign statusItem = contactListParty.getRelatedOne("StatusItem", true)?if_exists /> + <#assign emailAddress = contactListParty.getRelatedOne("PreferredContactMech", true)?if_exists /> + <#-- <#assign contactListType = contactList.getRelatedOne("ContactListType", true)/> --> @@ -538,8 +538,8 @@ under the License. ${uiLabelMap.EcommerceNewListSubscription}: @@ -564,7 +564,7 @@ under the License.
    ${content.contentId} ${content.contentName?if_exists} 
    ${contactList.contactListName?if_exists}<#if contactList.description?has_content> - ${contactList.description}
    <#list surveys as surveyAppl> - <#assign survey = surveyAppl.getRelatedOne("Survey") /> + <#assign survey = surveyAppl.getRelatedOne("Survey", false) /> diff --git a/specialpurpose/ecommerce/webapp/ecommerce/customer/viewreviews.ftl b/specialpurpose/ecommerce/webapp/ecommerce/customer/viewreviews.ftl index d17727b0ce..1cd9d13a7c 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/customer/viewreviews.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/customer/viewreviews.ftl @@ -37,7 +37,7 @@ under the License. - +
     
    ${survey.surveyName?if_exists} - ${survey.description?if_exists}
    ${review.productReview!} ${review.productRating} ${review.postedAnonymous}${review.getRelatedOne("StatusItem").get("description", locale)}${review.getRelatedOne("StatusItem", false).get("description", locale)}
    diff --git a/specialpurpose/ecommerce/webapp/ecommerce/order/checkoutpayment.ftl b/specialpurpose/ecommerce/webapp/ecommerce/order/checkoutpayment.ftl index 571cdd3964..2a8e48861f 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/order/checkoutpayment.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/order/checkoutpayment.ftl @@ -156,7 +156,7 @@ var issuerId = ""; <#list paymentMethodList as paymentMethod> <#if paymentMethod.paymentMethodTypeId == "GIFT_CARD"> <#if productStorePaymentMethodTypeIdMap.GIFT_CARD?exists> - <#assign giftCard = paymentMethod.getRelatedOne("GiftCard") /> + <#assign giftCard = paymentMethod.getRelatedOne("GiftCard", false) /> <#if giftCard?has_content && giftCard.cardNumber?has_content> <#assign giftCardNumber = "" /> @@ -184,7 +184,7 @@ var issuerId = ""; <#elseif paymentMethod.paymentMethodTypeId == "CREDIT_CARD"> <#if productStorePaymentMethodTypeIdMap.CREDIT_CARD?exists> - <#assign creditCard = paymentMethod.getRelatedOne("CreditCard") /> + <#assign creditCard = paymentMethod.getRelatedOne("CreditCard", false) />
    checked="checked" /> @@ -195,7 +195,7 @@ var issuerId = ""; <#elseif paymentMethod.paymentMethodTypeId == "EFT_ACCOUNT"> <#if productStorePaymentMethodTypeIdMap.EFT_ACCOUNT?exists> - <#assign eftAccount = paymentMethod.getRelatedOne("EftAccount") /> + <#assign eftAccount = paymentMethod.getRelatedOne("EftAccount", false) />
    checked="checked" /> diff --git a/specialpurpose/ecommerce/webapp/ecommerce/order/orderheader.ftl b/specialpurpose/ecommerce/webapp/ecommerce/order/orderheader.ftl index a10ed41131..4d43761593 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/order/orderheader.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/order/orderheader.ftl @@ -109,18 +109,18 @@ under the License. <#if paymentMethods?has_content> <#list paymentMethods as paymentMethod> <#if "CREDIT_CARD" == paymentMethod.paymentMethodTypeId> - <#assign creditCard = paymentMethod.getRelatedOne("CreditCard")> + <#assign creditCard = paymentMethod.getRelatedOne("CreditCard", false)> <#assign formattedCardNumber = Static["org.ofbiz.party.contact.ContactHelper"].formatCreditCard(creditCard)> <#elseif "GIFT_CARD" == paymentMethod.paymentMethodTypeId> - <#assign giftCard = paymentMethod.getRelatedOne("GiftCard")> + <#assign giftCard = paymentMethod.getRelatedOne("GiftCard", false)> <#elseif "EFT_ACCOUNT" == paymentMethod.paymentMethodTypeId> - <#assign eftAccount = paymentMethod.getRelatedOne("EftAccount")> + <#assign eftAccount = paymentMethod.getRelatedOne("EftAccount", false)> <#-- credit card info --> <#if "CREDIT_CARD" == paymentMethod.paymentMethodTypeId && creditCard?has_content> <#if outputted?default(false)> - <#assign pmBillingAddress = creditCard.getRelatedOne("PostalAddress")?if_exists> + <#assign pmBillingAddress = creditCard.getRelatedOne("PostalAddress", false)?if_exists>
    • ${uiLabelMap.AccountingCreditCard} @@ -139,7 +139,7 @@ under the License. <#if outputted?default(false)> <#if giftCard?has_content && giftCard.cardNumber?has_content> - <#assign pmBillingAddress = giftCard.getRelatedOne("PostalAddress")?if_exists> + <#assign pmBillingAddress = giftCard.getRelatedOne("PostalAddress", false)?if_exists> <#assign giftCardNumber = ""> <#assign pcardNumber = giftCard.cardNumber> <#if pcardNumber?has_content> @@ -162,7 +162,7 @@ under the License. <#elseif "EFT_ACCOUNT" == paymentMethod.paymentMethodTypeId && eftAccount?has_content> <#if outputted?default(false)> - <#assign pmBillingAddress = eftAccount.getRelatedOne("PostalAddress")?if_exists> + <#assign pmBillingAddress = eftAccount.getRelatedOne("PostalAddress", false)?if_exists>
      • @@ -238,7 +238,7 @@ under the License. <#assign groupIdx = 0> <#list orderItemShipGroups as shipGroup> <#if orderHeader?has_content> - <#assign shippingAddress = shipGroup.getRelatedOne("PostalAddress")?if_exists> + <#assign shippingAddress = shipGroup.getRelatedOne("PostalAddress", false)?if_exists> <#assign groupNumber = shipGroup.shipGroupSeqId?if_exists> <#else> <#assign shippingAddress = cart.getShippingAddress(groupIdx)?if_exists> @@ -277,7 +277,7 @@ under the License.
      • ${uiLabelMap.OrderMethod}: <#if orderHeader?has_content> - <#assign shipmentMethodType = shipGroup.getRelatedOne("ShipmentMethodType")?if_exists> + <#assign shipmentMethodType = shipGroup.getRelatedOne("ShipmentMethodType", false)?if_exists> <#assign carrierPartyId = shipGroup.carrierPartyId?if_exists> <#else> <#assign shipmentMethodType = cart.getShipmentMethodType(groupIdx)?if_exists> diff --git a/specialpurpose/ecommerce/webapp/ecommerce/order/orderhistory.ftl b/specialpurpose/ecommerce/webapp/ecommerce/order/orderhistory.ftl index bb0c5d1904..79639f8354 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/order/orderhistory.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/order/orderhistory.ftl @@ -34,7 +34,7 @@ under the License.
  • ${orderHeader.orderDate.toString()} ${orderHeader.orderId}
    ${porderHeader.orderDate.toString()} ${porderHeader.orderId} " class="linktext">${orderItem.productId} - ${orderItem.itemDescription?default("")} <#assign orderItemAttributes = orderItem.getRelated("OrderItemAttribute")/> @@ -138,23 +138,23 @@ under the License. [${uiLabelMap.OrderPieces}: ${product.piecesIncluded}] <#if (product.quantityIncluded?exists && product.quantityIncluded != 0) || product.quantityUomId?has_content> - <#assign quantityUom = product.getRelatedOneCache("QuantityUom")?if_exists/> + <#assign quantityUom = product.getRelatedOne("QuantityUom", true)?if_exists/> [${uiLabelMap.CommonQuantity}: ${product.quantityIncluded?if_exists} ${((quantityUom.abbreviation)?default(product.quantityUomId))?if_exists}] <#if (product.weight?exists && product.weight != 0) || product.weightUomId?has_content> - <#assign weightUom = product.getRelatedOneCache("WeightUom")?if_exists/> + <#assign weightUom = product.getRelatedOne("WeightUom", true)?if_exists/> [${uiLabelMap.CommonWeight}: ${product.weight?if_exists} ${((weightUom.abbreviation)?default(product.weightUomId))?if_exists}] <#if (product.productHeight?exists && product.productHeight != 0) || product.heightUomId?has_content> - <#assign heightUom = product.getRelatedOneCache("HeightUom")?if_exists/> + <#assign heightUom = product.getRelatedOne("HeightUom", true)?if_exists/> [${uiLabelMap.CommonHeight}: ${product.productHeight?if_exists} ${((heightUom.abbreviation)?default(product.heightUomId))?if_exists}] <#if (product.productWidth?exists && product.productWidth != 0) || product.widthUomId?has_content> - <#assign widthUom = product.getRelatedOneCache("WidthUom")?if_exists/> + <#assign widthUom = product.getRelatedOne("WidthUom", true)?if_exists/> [${uiLabelMap.CommonWidth}: ${product.productWidth?if_exists} ${((widthUom.abbreviation)?default(product.widthUomId))?if_exists}] <#if (product.productDepth?exists && product.productDepth != 0) || product.depthUomId?has_content> - <#assign depthUom = product.getRelatedOneCache("DepthUom")?if_exists/> + <#assign depthUom = product.getRelatedOne("DepthUom", true)?if_exists/> [${uiLabelMap.CommonDepth}: ${product.productDepth?if_exists} ${((depthUom.abbreviation)?default(product.depthUomId))?if_exists}] @@ -162,7 +162,7 @@ under the License. <#assign returns = orderItem.getRelated("ReturnItem")?if_exists> <#if returns?has_content> <#list returns as return> - <#assign returnHeader = return.getRelatedOne("ReturnHeader")> + <#assign returnHeader = return.getRelatedOne("ReturnHeader", false)> <#if returnHeader.statusId != "RETURN_CANCELLED"> <#if returnHeader.statusId == "RETURN_REQUESTED" || returnHeader.statusId == "RETURN_APPROVED"> <#assign displayState = "Return Pending"> @@ -252,12 +252,12 @@ under the License. <#if orderItemAdjustment.description?has_content>: ${orderItemAdjustment.description} <#if orderItemAdjustment.orderAdjustmentTypeId == "SALES_TAX"> <#if orderItemAdjustment.primaryGeoId?has_content> - <#assign primaryGeo = orderItemAdjustment.getRelatedOneCache("PrimaryGeo")/> + <#assign primaryGeo = orderItemAdjustment.getRelatedOne("PrimaryGeo", true)/> <#if primaryGeo.geoName?has_content> ${uiLabelMap.OrderJurisdiction}: ${primaryGeo.geoName} [${primaryGeo.abbreviation?if_exists}] <#if orderItemAdjustment.secondaryGeoId?has_content> - <#assign secondaryGeo = orderItemAdjustment.getRelatedOneCache("SecondaryGeo")/> + <#assign secondaryGeo = orderItemAdjustment.getRelatedOne("SecondaryGeo", true)/> (${uiLabelMap.CommonIn}: ${secondaryGeo.geoName} [${secondaryGeo.abbreviation?if_exists}]) @@ -278,8 +278,8 @@ under the License. <#assign orderItemShipGroupAssocs = orderItem.getRelated("OrderItemShipGroupAssoc")?if_exists> <#if orderItemShipGroupAssocs?has_content> <#list orderItemShipGroupAssocs as shipGroupAssoc> - <#assign shipGroup = shipGroupAssoc.getRelatedOne("OrderItemShipGroup")?if_exists> - <#assign shipGroupAddress = (shipGroup.getRelatedOne("PostalAddress"))?if_exists> + <#assign shipGroup = shipGroupAssoc.getRelatedOne("OrderItemShipGroup", false)?if_exists> + <#assign shipGroupAddress = (shipGroup.getRelatedOne("PostalAddress", false))?if_exists>
    ${uiLabelMap.OrderShipGroup}: [${shipGroup.shipGroupSeqId}] ${shipGroupAddress.address1?default("N/A")} diff --git a/specialpurpose/ecommerce/webapp/ecommerce/order/quickAnonOrderHeader.ftl b/specialpurpose/ecommerce/webapp/ecommerce/order/quickAnonOrderHeader.ftl index f9c72ed8ef..0402b100f2 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/order/quickAnonOrderHeader.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/order/quickAnonOrderHeader.ftl @@ -116,7 +116,7 @@ under the License. <#assign groupIdx = 0> <#list orderItemShipGroups as shipGroup> <#if orderHeader?has_content> - <#assign shippingAddress = shipGroup.getRelatedOne("PostalAddress")?if_exists> + <#assign shippingAddress = shipGroup.getRelatedOne("PostalAddress", false)?if_exists> <#assign groupNumber = shipGroup.shipGroupSeqId?if_exists> <#else> <#assign shippingAddress = cart.getShippingAddress(groupIdx)?if_exists> diff --git a/specialpurpose/ecommerce/webapp/ecommerce/order/requestreturn.ftl b/specialpurpose/ecommerce/webapp/ecommerce/order/requestreturn.ftl index 26d73d25f8..7ef3c07b84 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/order/requestreturn.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/order/requestreturn.ftl @@ -67,7 +67,7 @@ under the License. <#-- need some order item information --> - <#assign orderHeader = orderItem.getRelatedOne("OrderHeader")> + <#assign orderHeader = orderItem.getRelatedOne("OrderHeader", false)> <#assign itemCount = orderItem.quantity> <#assign itemPrice = orderItem.unitPrice> <#-- end of order item information --> @@ -119,7 +119,7 @@ under the License. <#list shippingContactMechList as shippingContactMech> - <#assign shippingAddress = shippingContactMech.getRelatedOne("PostalAddress")> + <#assign shippingAddress = shippingContactMech.getRelatedOne("PostalAddress", false)> <#list quoteList as quote> - <#assign status = quote.getRelatedOneCache("StatusItem")> + <#assign status = quote.getRelatedOne("StatusItem", true)> <#list requestList as custRequest> - <#assign status = custRequest.getRelatedOneCache("StatusItem")> - <#assign type = custRequest.getRelatedOneCache("CustRequestType")> + <#assign status = custRequest.getRelatedOne("StatusItem", true)> + <#assign type = custRequest.getRelatedOne("CustRequestType", true)>
    diff --git a/specialpurpose/ecommerce/webapp/ecommerce/order/splitship.ftl b/specialpurpose/ecommerce/webapp/ecommerce/order/splitship.ftl index 31c5b1eaf8..2793f55b9f 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/order/splitship.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/order/splitship.ftl @@ -78,7 +78,7 @@ function submitForm(form, mode, value) { diff --git a/specialpurpose/ecommerce/webapp/ecommerce/quote/QuoteList.ftl b/specialpurpose/ecommerce/webapp/ecommerce/quote/QuoteList.ftl index e2f79683bb..f069881f5b 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/quote/QuoteList.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/quote/QuoteList.ftl @@ -47,7 +47,7 @@ under the License.  
    diff --git a/specialpurpose/ecommerce/webapp/ecommerce/request/RequestList.ftl b/specialpurpose/ecommerce/webapp/ecommerce/request/RequestList.ftl index 148f7afc5b..6b729743f8 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/request/RequestList.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/request/RequestList.ftl @@ -51,8 +51,8 @@ under the License.  
    diff --git a/specialpurpose/ecommerce/webapp/ecommerce/request/requestRoles.ftl b/specialpurpose/ecommerce/webapp/ecommerce/request/requestRoles.ftl index 568fabfbb4..8fd1248aaf 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/request/requestRoles.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/request/requestRoles.ftl @@ -24,8 +24,8 @@ under the License. <#assign row = 1> <#list requestParties as requestParty> - <#assign roleType = requestParty.getRelatedOne("RoleType")> - <#assign party = requestParty.getRelatedOne("Party")> + <#assign roleType = requestParty.getRelatedOne("RoleType", false)> + <#assign party = requestParty.getRelatedOne("Party", false)>
     ${roleType.get("description", locale)?if_exists} diff --git a/specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl b/specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl index 7a97284584..297af912ca 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl @@ -224,7 +224,7 @@ under the License.
    ${uiLabelMap.EcommerceRecurrence}
    <#if recurrenceInfo?has_content> - <#assign recurrenceRule = recurrenceInfo.getRelatedOne("RecurrenceRule")?if_exists> + <#assign recurrenceRule = recurrenceInfo.getRelatedOne("RecurrenceRule", false)?if_exists>