Solved

Search for customers in Magento

Posted on 2013-01-16
2
212 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
ID: 38782980
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
ID: 38783156
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Find out what you should include to make the best professional email signature for your organization.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

929 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

9 Experts available now in Live!

Get 1:1 Help Now