How to Build an Online Business Directory using Drupal

The Fort Langley BIA (Business Improvement Association) requested that we redesign their existing business directory website built with HTML. They wanted to be able to edit the site content and add new listings themselves.  They have 100 businesses in their BIA who needed User Accounts and Business Listings. Some non-BIA members also need Business Listings.

I used Acquia Drupal bundle to set up a basic Drupal website. (www.acquia.com) - It consists of Drupal core as well as a group of modules including Views and CCK.

A. Modules used
1. CCK
2. Views
3. Content Profile (http://drupal.org/project/content_profile)
4. User Import (http://drupal.org/project/user_import)
5. Node Import (http://drupal.org/project/node_import)
6. User Protect (http://drupal.org/project/userprotect)

1. I used CCK to create custom content type called Business Listing

2. I used Content Profile module to create custom user registration form by assigning Business Listing content type to be the Content Profile

3. Client gave me MS Excel spreadsheet with contact info for all BIA members. I saved it as .CSV format.
- Then I used User Import module to do a bulk import and created many User accounts with attached Business Listing at one time.

4. Used Node Import module to import non-BIA members info into Business Listing. These don’t have User accounts.

5. Used Views to create Business Directory page with Taxonomy term filter exposed to add search functionality.

6. User Protect module – protects your Super User account from being deleted by mistake.  I needed to update all the User accounts. So I deleted all the current users and ended up deleting my Super User account by mistake. So the User Protect module will prevent this from happening again.

B. How to:
1. Set up Business Listing content type with these fields:
First name, last name, address, phone, fax, email, website, hours of operation, description, image.

2. Go to settings for Business Listing
Enable: Use this content type as a content profile for users
Click on Content Profile tab and enable these two items:
- Use on Registration
- Use on administrative user creation form

3. Set up Taxonomy with the 14 business categories as terms.
- Add vocabulary called Business Categories
- Add terms eg. Accommodations, Attractions: General, Attractions: Historic

4. Set up BIA member role and permissions

5. Set up User Import module to import list of BIA member contact info in .CSV format and set up multiple user accounts. You have the options of turning off the ‘Notify User about account” and update user accounts.
- set First + Last name with space in between as User Name
- map the fields in your spreadsheet to the fields of Business Listing
- you can assign BIA member role to all Users
- you can customize the Welcome email message here or Notify Users of new account later on after training

6. If you look at the Business Listing node, you will see the User Name as the node title.  we want the Company Name to be seen as the Title.  So I needed to edit the Title field and replace the User name with Company name. I need to go in and edit each Business Listing anyways.

When you view the User Account, you see the User Name as title
Now, when you view the Biz Listing, then you see the Company Name as the title.

7. Edit each Business Listing to add image, hours, description, replace title with company name and choose the business category.

8. Not all Business Listings are BIA members so import them using Node Import module. These businesses will not have User account. With the Node Import module you can map the Company name to be the node Title.

9. Set up View to display Content type Business listing.
- Expose the filter for taxonomy term to use for searching the directory
- Company name – link to node


Summary:
1. I used CCK to create custom content type called Business Listing

2. I used Content Profile module to create custom user registration form by assigning Business Listing to be the Content Profile

3. Client gave me with MS Excel spreadsheet with contact info for all BIA members. I saved it in .CSV format.
- Then I used User Import module to do a bulk import and create many User accounts with attached Business Listing at the same time.

4. Used Node Import module to import non-BIA members info into Business Listing. These don’t have User accounts.

5. Used Views to create Business Directory page with Taxonomy term filter exposed to add search functionality.

6. User Protect module – protects your Super User account from being deleted by mistake

Comments

Nice tutorial but i need help

I have a question for you, i am currently working on something similar and i have a challenge. I hope you would help me. I created content type in drupal. Then i added a terms eg. Accommodations, Attractions: General, Attractions: Historic to the content type. But before you go to the term, the user of the website should first see the cities list, which would then bring them to the term, then the content. So how do i link the this 3 things together. puting in mind that a city like new york may not have an Accommodations that is found in new jersey. The first page is Cities, when you open a particular city, you would see, list of places in the city, like the term you listed out above, then the third one is the content. how do i do this. I hope you understand my question.

I am very interested in web

I am very interested in web designing. But I didn’t get a chance to study it. This site is very helpful for me to know more about web designing. Thanks for sharing details about how to build an online business directory using drupal. 

Thanks

thats really helpful

Good information

Making business directory with Drupal has never been so easy and I have actually tried it. It works extremely easy and I am happy to have got my hands on this feature.

Views of Directory - alpha listview ?

Is it possible to view the directory just sorting alpha order, as a list?

design

That is a great way to build a business directory with the Drupal. Thank you for these fantastic steps to make the business directory. I am so much thankful to you for this. Not only me the other readers also.

1 import success, others fail

"This user already has a content profile of this type. You can only create one profile per user." Anyone had this error. Only the first listing is created. Thanks!

Great article

It is very useful information. Thank you for sharing this. Now a days there are so many business directories to list businesses. Listing business in online directories help to improve the businesses. So it is very important to make a good online listing directory. For that it is very useful information. Here you explained detailed informations about building an online business directory using drupal. 

this way was perfect to do

this way was perfect to do business listings in Drupal 6.You have done a brilliant job. Your article is truly relevant to my study at this moment, and I am really happy I discovered your website. 

Drupal is great for small

Drupal is great for small business directory creation. I did it and I have been using Drupal for 11 months now. 

Useful guide

Hi Katy, Great stuff.. I've never built a Business directory site with Drupal before, but it seems easier than I thought. I actually published something similar as well, although it's more focused on beginners who are trying to build his/hers first Drupal 7 site. It's located here: http://websitesetup.org/build-website-drupal/ Would love to get some feedback from you. Cheers, Robert

www.seascapewebdesign.com is awesome!

I love to read www.seascapewebdesign.com

Very valuable information

I will develop edirectory using drupal. thank you . this is very useful.

Business Directory

very Helpful for web designers. Thanks www.MicroEdges.com

Used to be good in Drupal 6...

Shame that this way was perfect to do business listings in Drupal 6, but now with Drupal 7 not using the Content Profile module, and replacing it with Profile2 instead, it is not so good anymore. I wish that if it 'aint broke they wouldn't try and fix it.

Thanks a lot for sharing valuable information

Thanks a lot for sharing valuable information

Thanks a lot for sharing. You

Thanks a lot for sharing. You have done a brilliant job. Your article is truly relevant to my study at this moment, and I am really happy I discovered your website. However, I would like to see more details about this topic.

Only one Problem with Content Profiles

There is just one problem with content profiles, and I am finding it out late in the game: You cannot restrict access to content profile, I am trying to set up a paid directory, and, while I can create a system that restricts access to the ability to of a role create a node content type (which makes it nicely integrate with ubercart's role access node), you cannot restrict access to the content profiles.

Content profiles is also difficult to theme, you do not get a standard list of arrays as you would when you do a print_r with a more traditional node.

Maybe I missed something big, but I'm not sure I did.

Not to take away from your write-up, which is excellent. Didn't know about User Protect module -- good one!

Thanks much.

Try using Node Access module

You can try using Node Access module to restrict access to content by node type. Let me know how it works out.

Thanks for the info on how

Thanks for the info on how you did this. I too and wanting to create a business directory that includes both members and non-member users. One question though, if you use Content Profile for the Business Listing type, wouldn't that need to be associated with a registered user? You mention that you created user accounts for members with linked Business Listings and also created Business Listings for non-members but since Content Profile is used for user account profiles, wouldn't you have needed to create accounts for non-members as well? I would like to be able to create all the listing myself as an administrator but then my account would be associated with each Business Listing and I believe Content Profile only allows one profile per user unless I'm wrong so how did you create Business Listings for non-members? Thanks for any help!

Thanks for posting your question on my blog

Thanks for posting your question on my blog. I used the Node Import module for Drupal 6 to import non-members info into the Business Listing content type. These are non-members who don’t have User accounts.   The Node Import module is used to do a bulk import of business listings from a MS Excell spreadsheet or CSV file.

To add individual non-member Business Listings, go to Content Management > Create Content > Business Listing and create a new node for the Business Listing content type.