Skip to Content
0
Former Member
Jul 07, 2016 at 09:52 PM

How to Differentiate Delivery Address from Billing Address When the Same

270 Views

I would like to display the billing address on the order summary page only if it is different than the delivery address. However, even if you have only one address and select to use your delivery address for billing, the cartData.deliveryAddress.id is different from the cartData.paymentInfo.billingAddress.id.

So, what is the best way to differentiate the delivery address from the billing address? An equals check using the primary AddressData fields - i.e. first name, last name, line1 etc?