Joomla! Discussion Forums



It is currently Mon Nov 23, 2009 9:44 pm (All times are UTC )

 


Forum rules

Global Rules
Additional Rules for this forum <------- Please read before posting



Post new topic Reply to topic  [ 12 posts ] 
Author Message
Posted: Wed Sep 23, 2009 4:13 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Sep 23, 2009 3:06 pm
Posts: 7
This is a store/dealership locator component. It is a simple component that allows you to link to it from a menu item, and then visitors can access it and enter their zip code and a search radius and it will return a list of stores or dealerships (locations) within the radius including some basic information about each location ( phone number, address etc). The admin side allows you to edit your stores/dealerships, and upsert them (very basic capability) from a .csv file. You can do the same with postal code/Geo data. One note is that you will need to import zip/geo data to get any functionality from the extension unless you plan on having just a small number of zipcodes/postal codes supported.

Its pretty much beta since I have only tested it myself, but it seems to be working enough for me to be using it on a couple of public web sites. I have only tested it with joomla 1.5.7 native. You install it via the standard universal installer in the admin area of joomla.

This is my first component, and i think it could still be cleaned up a lot, but I hope folks can find it useful. Its under a standard GPL license.

you can download it at http://www.onweald.com/downloads/com_locator991.zip


Top
  E-mail  
 
Posted: Wed Sep 23, 2009 5:41 pm 
Joomla! Guru
Joomla! Guru
Offline

Joined: Thu Aug 18, 2005 10:51 pm
Posts: 674
Location: Austria
To be useful, it should be multilingual - now all vars are 'hard coded'.

_________________
http://www.joomx.com - custom extensions and development
http://www.joomlasupportdesk.com - support, migration, training and consulting
Member of the German Joomla Translation Team


Top
  E-mail  
 
Posted: Wed Sep 23, 2009 7:05 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Sep 23, 2009 3:06 pm
Posts: 7
mic wrote:
To be useful, it should be multilingual - now all vars are 'hard coded'.

Yes, I did consider that, but didnt have enough time to include muti-lingual support. I agree, that it wont be useful the way it is. Perhaps someone could contribute the necessary additions.


Top
  E-mail  
 
Posted: Thu Sep 24, 2009 6:27 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu May 28, 2009 9:30 pm
Posts: 14
It sounds like a bitchin' component, but I'm receiving an error.

I've uploaded the zipcode.csv file, but I keep receiving the error:

"Error! could not move uploaded file."

I downloaded the file from the suggested location:

http://www.boutell.com/zipcodes/

Any help would be greatly appreciated.


Top
  E-mail  
 
Posted: Thu Sep 24, 2009 7:29 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Sep 23, 2009 3:06 pm
Posts: 7
im afraid the zipcode source on that site will require some manupilation before it can be imported. For example, you will need to open up the .csv file in excel (or other spreadsheet program), and remove the city, state, timezone, and dst columns completely.

Then, remove the header row.(zip,city,state,latitude,longitude,timezone,dst)

Sorry, but the import routine is as simple as they come, so you will then need to switch the order of the longitude and latitude columns as it expects the data in the exact order zip,lon,lat.
So, at this point you will have 3 columns, zip,longitude, latitude ( in that order)

Next you will need to format he zipcode column. In excel, select the entire column (click on column header cell), then right-click, then choose format cells. Look through the types of formats to special, and frmo that list on the right choose zipcode. (not zipcode+4). This will pad all of the zipcodes to have exctly 5 digits. This is necessary for the zipcodes listed in the source data like 501 instead of 00501.

Then, save the file as a tab delimited text file and make sure it saves the file without any string delimiters like double or single quote marks. As an example, one row in the retulsting .csv file (if you open it up with a text edirtor like notepad) should look like:

10260 -73.977182 40.780751


Also, the upload of they entire 43k rows will take too long on most systems and will time out, so I suggest breaking the file up into 5k chunks (or even 1k chunks if it times out)

let me kow if these instructions help in dealing with that data. You might want to consider going to a commercial source of the data for updated information and more formats.


Top
  E-mail  
 
Posted: Thu Sep 24, 2009 7:32 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Sep 23, 2009 3:06 pm
Posts: 7
misterc wrote:
It sounds like a bitchin' component, but I'm receiving an error.

I've uploaded the zipcode.csv file, but I keep receiving the error:

"Error! could not move uploaded file."

I downloaded the file from the suggested location:

http://www.boutell.com/zipcodes/

Any help would be greatly appreciated.


Oh, I'm not sure if the preceeding will solve your specific error. It could also be that you dont have write access to the joomla temp directory which, if i remember, must be 777 on unix systems. The temp directory is specified in global site configuration in joomla.


Last edited by onwealdandy on Thu Sep 24, 2009 8:26 pm, edited 1 time in total.

Top
  E-mail  
 
Posted: Thu Sep 24, 2009 8:26 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu May 28, 2009 9:30 pm
Posts: 14
I chmod'd the entire components directory as well as sub-directories to 777.

Is there a way that I can manually install the zipcode file?

Thanks.


Top
  E-mail  
 
Posted: Thu Sep 24, 2009 8:29 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Sep 23, 2009 3:06 pm
Posts: 7
misterc wrote:
I chmod'd the entire components directory as well as sub-directories to 777.

Is there a way that I can manually install the zipcode file?

Thanks.


sorry, i edited my last response too late. I think it has to do with your temp directory which is defined via global site configuration. You need to make sure it is 777 as well I believe. Basically the upsert process takes the .csv file from your local directory, and then put it in the temp directory for processing by the import routine.

As for getting the zip data installed manually, it should be relativly easy to populate the table directly using sql the table name is [joomladb].jos_locator_zipdata


Top
  E-mail  
 
Posted: Thu Sep 24, 2009 9:12 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Sep 23, 2009 3:06 pm
Posts: 7
after further review, i looked at that code and it was using the environment temp folder instead of the joomla temp folder. I changed it so it would use the joola temp folder instead of the environment temp folder and reposted the zip at the download site. If you want, you can re download and install the component to see if using the joomla temp folder works for you. I dont have a linux environment to test on, or I might have caught that before. wIndows is so squishy about directory permissions. heh.


Top
  E-mail  
 
Posted: Mon Oct 19, 2009 12:17 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Mon Oct 19, 2009 12:11 pm
Posts: 1
This looks like a great component however I am getting an error with Upsert Postal Colde.

Error with Record having account name: .
Error is:Column count doesn't match value count at row 1

Data:
postcode lon lat
00200 149.120489 -35.27637
00221 149.137033 -35.314348
00800 130.841904 -12.461334

Please help!


Top
  E-mail  
 
Posted: Wed Nov 04, 2009 2:21 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Wed Nov 04, 2009 1:53 am
Posts: 2
Any idea why it might not be working in 1.5.14?

Everything seems to be in the right places but all my frontend searches return "We are sorry but no results were found. Please try again. "

I've got zip codes and locations loaded correctly. I've been taking a look at the controller.php but I'm pretty new to Joomla so I don't know if there are any major changes between 1.5.7 and 1.5.14 that would require rewriting your code.


Top
  E-mail  
 
Posted: Wed Nov 04, 2009 2:28 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Wed Nov 04, 2009 1:53 am
Posts: 2
Oh, I'll also add this as far as the error for Postal Code Upsert. It didn't like the first tab-delimited .csv file I exported from Excel on my Mac. Instead of the Text(Tab-delimited) option I had to use the Text(Windows) option under save-as and that file did work. Both look exactly the same to me but apparently something is different under the hood.


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 30 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group