Solved

Search for customers in Magento

Posted on 2013-01-16
2
217 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

737 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