Hi, i'm trying to get all defined addresses for a customer using the AdminCustomer class method "getAddresses". but it always return "null". I'm sure that the customer has more than one addresses stored in the db table address_book.
Can you help me?
Regards,
G
You should use the AdminApi call
public AdminAddressSearchResult getAddresses(String sessionId, AdminAddressSearch search,
int offset, int size) throws KKAdminException;
Hi, yes i've tried in this way:
AdminAddressSearch aas = new AdminAddressSearch();
aas.setCustomerId(customer.getId());
AdminAddressSearchResult aasResult = adminEng.getAddresses(sessionId, aas, 0, 100);
AdminAddress[] addresses = aasResult.getAddresses();
but the result is the same: empty array.
How can i solve the problem?
The solution is to set this fields as null:
aas.setZoneId(-1);
aas.setProductId(-1);
aas.setManufacturerId(-1);
aas.setCountryId(-1);
aas.setId(-1);
Now i can get the addresses.
I think that is better if someone add this part to konakart documentation ;)
G