I am thinking about pulling the user's zip code in their account information into the initial value of the zip code text field when creating a new listing. I think this would need to be done in the hook.php within the us_zipcode folder.......anyone else try doing this, or have any thoughts?
So this probably isn't the best way to do it...but would there be any major integrity issues with running a cron job against my db that more less does this:: UPDATE paclistings, pacusers SET paclistings.zipcode = pacusers.zip WHERE paclistings.owner = pacusers.id AND paclistings.zipcode = ''; every 5 minutes perhaps...? I would then make the zipcode text box a hidden field when creating a new ad.
This sounds good in theory, however one issue that you may not have considered and the exact reason why the module creates a separate field is that the seller's zip code may be different then the zip code of the item. Examples of when it is typical that these would be different is categories or users that sell Real Estate, Boats, Vehicles, etc. More specifically, Let's say you have a Realtor as a seller. Their office is located in 12345 zip code. Their listings, however may and will have different zip codes based on where the actual property is located. It would be a disservice to both your sellers and your end users to change the zip code in the listings to the sellers zip code, because then when an end user wants to search for a property in xxxxx zip code it will only find the listings in the sellers zip code and NOT the zip code that the end users wants the property to be in. ALSO, You posted this as a "Postal Codes Module" question, but it seems as though this is actually a "US Zip Codes Module" question. These are two different products have differences in features offered. I offer the Postal Codes Module which is for international use outside of the US 68 Classifieds offers the US Zip Code Module which is for use in the US.
I understand what you are saying Mike. The site will be car dealers in PA. It is illegal in the state of PA for a car dealer to list a vehicle that is not on their registered lot...we just figured we'd save them a step, and take out the zip entry. We are not dealing with real estate at all... Good point though, will continue thinking.
To me the easiest option would be to just run another query during the place an ad step and auto fill the zip code with what they used when registering.
OK, wendel18. I was just ensuring that you understood how it worked so you could make an educated decision without having any negative results. In your case that seems fine and I would recommend following Eric's advice.
I don't know if this helps but we do have an alternative address module as part of our system. With a bit of work you could strip it out if you did not want to use the templates and other modules themselves, although you could of course. This module works nicely in situations where the object for sale is not located in the same place as the advertiser. A good example is a boat for sale. The owner lives in town but the boat is located in a marina somewhere else.
This alternative address module. You mention stripping it out of the template set it comes with. Would I be able to use this with the purple template, and if so, how hard would it be to "strip it out"? Also, would it work with v4.1.3 Developer? Thanks Seymour
It depends how good your programming skills are. In general it would be a relatively big spend to gain one module. I would not in reality suggest stripping it out as such but just use that module and leave the supplied template idle etc. The other modules may be useful as well however - it depends. There is nothing to stop you stripping code out although to be fair we could not support it. Its not an ideal thing to do. Unfortunately this module is only supported on version 4.1.4 and above so for you it would be a non-starter anyway unless you upgraded.
Hmmm, I haven't checked to see what variables are available at that point for the template, but it would be worth checking, because if the seller's zip code variable is available to the template already then the simplest solution would be to put the variable in the post code field form {$sellers zip variable} ala smarty. Then it would automatically be filled in, but could still be changed IF the seller wished too.
I can confirm Richard that the address module will work in isolation to the templates themsleves. Just tested it on the default template without bother. Many of the other modules will work too (however you would need to style them to your needs).