ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aditya Sharma <aditya.sha...@hotwaxsystems.com>
Subject Re: How to Filter Out Identical Billing and Shipping Addresses?
Date Wed, 03 May 2017 05:13:20 GMT
Hi Prakhar,

I think you can use methods of EntityUtil class here. There are many useful
methods available there.


For example, One way can be that
1. You get contactMechId of all the address associated with given partyId &
with contactMechPurposeTypeId (Billing and Shipping location)
2. Filter them out according to its contactMechPurposeTypeId using
filterByCondition() or filterByAnd() for the first list
3. FilterOutByCondition() to remove all those already in first list for the
second one.

It will avoid multiple entity hits and may serve the purpose.

Though it is just an example, there may be some other possibility depending
upon your exact scenario.

Thanks & Regards,
Aditya Sharma
Enterprise Software Engineer
HotWax Systems Pvt. Ltd.


On Tue, May 2, 2017 at 12:29 PM, Nicolas Malin <nicolas.malin@nereide.fr>

> If you postalAddress creation respect the ContactMechPurpose partner, you
> have only one address with two purposes *billing* and *shipping*.
> So the problem would don't exist.
> :) please check you postal address creation
> Nicolas
> Le 28/04/2017 à 15:30, Prakhar Kumar a écrit :
>> My requirement is to display billing and shipping addresses of the
>> customer
>> during checkout. But I want to avoid identical addresses from getting
>> displayed. This can be simply achieved by putting some checks on the front
>> end but it's not that elegant. So, Is there any way to do it more
>> efficiently in Ofbiz?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message