I want get shipping address of customer by name, city, company, or postcode. How to do it? Please help me.
I tryed this code but it get shipping address of all order.
$addressCollection = Mage::getModel('sales/order_address')->getCollection(); $addressCollection->getSelect()->where("address_type = 'shipping' and lastname like '%$customerName%' and company like '%$customerCompany%' and city like '%$customerCity%' and postcode like '%$customerCode%'");