Solved

Search for customers in Magento

Posted on 2013-01-16
2
211 Views
Last Modified: 2016-03-02
This may seem like a silly question but here goes:

I need search for customers based on the first and last line of their address. the current search in Magento doesnt retrieve data based on address so I was wondering if there is way to modify the search to include addresses.

Based on the results I would like to populate a form field with customer details* <== I hope

Does anyone know of a good extension or are willing to share some ideas...?
0
Comment
Question by:rafique12
2 Comments
 
LVL 42

Accepted Solution

by:
sedgwick earned 500 total points
Comment Utility
you can do something like:

$customerAddressId = Mage::getSingleton('customer/session')->getCustomer()->getDefaultBilling();
if ($customerAddressId){
       $address = Mage::getModel('customer/address')->load($customerAddressId);
if(strpos($address->getData(), 'address-you-are-looking')){

}
}

Open in new window


Magento customer address
0
 

Author Comment

by:rafique12
Comment Utility
Thanks for the reply^

Where would I include this? I'm still learning Magento as you can probably tell but I need to have a form with name, address, email etc fields that I can fill with the result of the search query...

I guess I need a starting point to build from if you can help?
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now