The Endless Aisle app supports integrating with a third party address
verification service (AVS). In addition to enabling AVS in Business
Manager, you modify the server-side and app code and enable AVS in
Business Manager. To enable Address Verification, see Specifying
General Endless Aisle App Settings in Business Manager.
To modify the server-side code:
- Open the file
int_ocapi_ext_core/cartridge/scripts/requests/AddressValidationRequest.ds.
- Edit the code in the try/catch block. The code that is included in
the Endless Aisle server-side code is a hard coded example.
- In AddressValidationRequest.ds, you pass the results from the
address verification service to formatResults. When you handle the
results, you might have to make modifications to the response so that it
is in the format expected.
- If verification fails (due to invalid or alternate addresses), set
status to PIPELET_ERROR.
To modify the app code:
- Make modifications to the customer, shippping and billing address in
Endless Aisle to support the change in address display.
- Edit the following files as appropriate to adjust the display of the
address coming back from AVS.
- app/lib/EAUtils.js - for addressVerification
- app/models/recommendedAddress.js – for getCityStateZip
- app/controllers/components/avsPopover.js