hobbzilla Posted January 14, 2004 Share Posted January 14, 2004 This topic has been created to support my osCommerce Vendor Locator add-on. Please post your questions & suggestions. Description: ------------ Does your business rely on sales channel affiliates or have various retail locations that you would like your customer to be able to search for or be tied to? These modifications allow you to create and maintain a list of vendors in the admin section and present them to your customer. Vendors are presented to the customer by distance (in miles) using a latitude & longitude algorithm based upon the customers_default_address_id entry_postcode in the address_book table and limited by a maximum distance and/or maximum number of vendors. CURRENTLY U.S.A. ZIPCODES ONLY There are options in the admin side to control if a customer can checkout based if they have a vendor account tied to their customer account or not. Whereas if this setting is disabled the customer will be in a continual loop until they select a vendor while attempting to checkout. Quote Link to comment Share on other sites More sharing options...
hobbzilla Posted January 14, 2004 Author Share Posted January 14, 2004 Get v1.0 RELEASE 01/14/04. http://www.oscommerce.com/community/contributions,1787 Quote Link to comment Share on other sites More sharing options...
hobbzilla Posted January 17, 2004 Author Share Posted January 17, 2004 Curious if anyone will try out this mod and give me any feedback or suggestions or bug reports. Thanks! Quote Link to comment Share on other sites More sharing options...
jusmelmay Posted January 24, 2004 Share Posted January 24, 2004 Zilla- Excellent idea. I have party consultants and I wanted a locator. I am having a problem. I loaded my database with all gazillion zipcode files,lol. I also added myself as a vendor. Then I go to the store and enter my zipcode and I get a database error. *************** 1146 - Table 'melissa_newlyn.zipdata' doesn't exist select * from zipdata where zipcode='98503' [TEP STOP] ***************************** The only thing i can possibly think of is, since I am not a bis SQL person, is that it is case sensitive and my database is labeled melissa_newlyn.zipData and not **.zipdata . Do you know if this is the problem? I know the zipcode is in the database, I checked. I am going to try and rename it I think if it is possible and see if it works. If not then I'll beg you for the possible solution. Thanks alot for this contrib though!! Melissa ;) Quote Link to comment Share on other sites More sharing options...
jusmelmay Posted January 24, 2004 Share Posted January 24, 2004 OK maybe I am not going to rename it. I am using PHPMYADMIN, can I rename my database and if so HOW??! LOL Melissa Quote Link to comment Share on other sites More sharing options...
jusmelmay Posted January 24, 2004 Share Posted January 24, 2004 Problem Solved. It is the database file name. So maybe this is a little bug to fix. In the SQL file used to dump the data it is creating a table named zipData. BUT in the database_tables.php in the catalog/includes side it is named zipdata. It is like this in the admin side too. I changed it even though I hadnt gotten any errors in the admin side as of yet. So wither the SQL file needs to be changed to create a table named zipdata instead od zipData or the database_tables.php needs to be changed. HTH Melissa Quote Link to comment Share on other sites More sharing options...
jusmelmay Posted January 24, 2004 Share Posted January 24, 2004 Ok heres a question for you. In the install directions it makes it seem as if theres a configuration section in the admin which would allow me to make it so people can checkout without being asked about a local vendor or making it so they are forced to choose a vendor. I am not finding this.The only thing I find in the admin is the 'add a vendor' page. So if there is another section ,can you tell me where that is. Also since it appears as if this is what is supposed to happen I'll say that right now the only thing i can do with this (as a customer) is check for a vendor in my area. NOthing is happening in the create an account section, and when i check out as a customer with an account it makes no mention of vendors.I am hoping this is just because i have something 'turned off' in this msytery admin section. Thanks!! Am I getting on your nerves yet? Melissa Quote Link to comment Share on other sites More sharing options...
jusmelmay Posted January 24, 2004 Share Posted January 24, 2004 I found those config options. I'm going to play with them now. Thanks!! Quote Link to comment Share on other sites More sharing options...
jusmelmay Posted January 24, 2004 Share Posted January 24, 2004 OK. so that works good. I have one suggestion and thats just my 2 cents. I will change it for my store but maybe others wouldn't want it. If you are a customer who hasnt chosen a vendor and you go to buy something, you are brought to a page asking for you to select a vendor. Once you choose one you are taken to the account.php when I think you should be taken to the checkout_shipping.php. When they go to the account page they may get confused and not know what to do next. They are expectig to finish checking out. Just my experience not everyone is as smart as the next. I hope this is making sense. This is for customers who already have an account and are now checking out for the first time since i installed this mod. Also is there a place where either the admin or the customer can see who their vendor is? If not its a suggestion for future versions. There should be an admin screen with what customers are attached to what vendor and also on the account page they should be able to see their vendor and be able to change it. I am willing to help to the best of my abiliites to make these suggestions come to life :D Melissa Quote Link to comment Share on other sites More sharing options...
jusmelmay Posted January 24, 2004 Share Posted January 24, 2004 i found where the customer can view & change their consultant. I hadnt uploaded the new version of my account.php.DUH! I am looking for an admin feature to query the consultants and what customers have chosen them to be theirs .So I have either not found it or it doesnt exist. If it doesn't that would be awesome. It would help generate leads to send to the consultants. Thanks! Melissa Quote Link to comment Share on other sites More sharing options...
hobbzilla Posted January 27, 2004 Author Share Posted January 27, 2004 Melissa, Sorry I have been out of town for a few days. Thanks for the feedback and bug report. Perhaps it is just because my test platform is win32 system, but mine works fine no matter what the table is declared as.. but I have updated the database_tables.php in both admin & catalog (thanks!) In the install readme, there was a blurb about where to find those admin functions for checkout. I totaly agree with you on the functionality. I will work on the "next_page" functionality so if they are sent from checkout to select their vendor, it will go back to checkout, if from account back to account, if from account create ... to create account success. Watch for it in a future release. Quote Link to comment Share on other sites More sharing options...
jusmelmay Posted January 27, 2004 Share Posted January 27, 2004 No problem.This works great and I have another suggestion. I think it can be done. I think that there should be the following abilities. 1- Admin can see what customer has chosen what vendor. Perhaps an additional field on the vendors 'edit' page where it says the following cutomers have chosen vendor A. etc 2- when a vendor is chosen and email goes to that vendor so they can contact the customers. Sort of a lead generator without the requirement of admin intervention. I use this as a consultant locator. If someone in a particular conultants area chooses them then that consultant would be the contact for the customer to buy from on a "live and in person" basis. Also they can host a party as we are something like Tupperware. This is why this option would work out great for me! Let me know if I can help or if you think this can be worked out. I think it would make your mod in high demand! Melissa Quote Link to comment Share on other sites More sharing options...
darkangel Posted February 13, 2004 Share Posted February 13, 2004 Hi, I have install the contribution in my shop, but for some reason it is not working correctly. The catalog does show the infobox and but the administration side of the shop has this problem. If I take the code it works fine, but I still get an error on the configuration.php. Please have a look at it and I hope that this is fixable... BTW, nice contribution. :) Here is the problem that shows up: Fatal error: Call to undefined function: tep_get_languages() in /home/lglivart/public_html/catalog/admin/index.php on line 58 Code that I take out to make it work or basically the code on line 58: $languages = tep_get_languages(); $languages_array = array(); $languages_selected = DEFAULT_LANGUAGE; for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { $languages_array[] = array('id' => $languages[$i]['code'], 'text' => $languages[$i]['name']); if ($languages[$i]['directory'] == $language) { $languages_selected = $languages[$i]['code']; } } Can someone help me with that? Quote Link to comment Share on other sites More sharing options...
hobbzilla Posted February 13, 2004 Author Share Posted February 13, 2004 David, The vendor contrib makes no changes whatsoever to the admin index.php page. However it does make aan addition to admin/includes/functions/general.php (where tep_get_languages() is declared). Please double check your install. Quote Link to comment Share on other sites More sharing options...
darkangel Posted February 18, 2004 Share Posted February 18, 2004 Hobbzilla, I have fixed the problem with the general.php, I think there was something missing in the code. Now the problem is that I don't see the distance that the contribution says it does. Where I type in the zip code, I only get the store that I have programmed it with, but no distance. Any idea? Quote Link to comment Share on other sites More sharing options...
hobbzilla Posted February 18, 2004 Author Share Posted February 18, 2004 Hobbzilla, I have fixed the problem with the general.php, I think there was something missing in the code. Now the problem is that I don't see the distance that the contribution says it does. Where I type in the zip code, I only get the store that I have programmed it with, but no distance. Any idea? Okay for clarification, you have populated the vendor table with some data and are entering in a zipcode (within the miles radius defined in admin) and the result set displays the available vendors... BUT there is no distance displayed under each result list? I.E. you are wanting the result to look like: Vendor #1 101 W. Main Street Somewhere, ST 12345 1-800-123-123-1234 Distance: 12.2 miles Quote Link to comment Share on other sites More sharing options...
darkangel Posted February 19, 2004 Share Posted February 19, 2004 I would like that exactly as a result, but for some reason it doesn't show up that way.. How do I define the radius in the Admin? Any idea? I have all the zipdata in the sql, and the admin only has 2 options regarding the Vendor Contribution. I guess little by little it will work. :) Thanks for the support, Dark Quote Link to comment Share on other sites More sharing options...
ireader Posted February 20, 2004 Share Posted February 20, 2004 Hi I Like this mod a lot, could any one point me in the right direction to obtain the correct data for UK postcodes / distances? Thanks to all who work so hard and give to this project. regards Ian Quote Link to comment Share on other sites More sharing options...
darkangel Posted February 20, 2004 Share Posted February 20, 2004 Ian, I am not sure that this contribution is available for UK, at the moment it is only available for US only. What you could do is search if there is a .sql that will have zipcodes for UK in the link provided by the contribution to download the file. I am not sure if it is completely working since I am still having trouble showing the distance of a store. A WHOOPY for the creator of this contribution... :) Quote Link to comment Share on other sites More sharing options...
ireader Posted February 20, 2004 Share Posted February 20, 2004 Darkangel Thanks for info, If I find the data for UK distances/postcodes I will post here for others. Ian Quote Link to comment Share on other sites More sharing options...
darkangel Posted February 24, 2004 Share Posted February 24, 2004 Hobzilla, Okay for clarification, you have populated the vendor table with some data and are entering in a zipcode (within the miles radius defined in admin) and the result set displays the available vendors... BUT there is no distance displayed under each result list? I.E. you are wanting the result to look like: Vendor #1 101 W. Main Street Somewhere, ST 12345 1-800-123-123-1234 Distance: 12.2 miles I was wondering if that is possible for the distance. You refer to the radius in the admin, but I don't see anything like that. Is it possible to say were I could find that in the admin and what are the values? if any Thanks Quote Link to comment Share on other sites More sharing options...
hobbzilla Posted February 24, 2004 Author Share Posted February 24, 2004 darkangel, I am sorry for the delay, I have been pretty busy of late. I will try and get some work done on this tomorrow. I guess I didn't include the distance being output by the program, but will look at that tomorrow and add that functionality for the next release. I will post some code that will allow for that display. Quote Link to comment Share on other sites More sharing options...
hobbzilla Posted February 24, 2004 Author Share Posted February 24, 2004 Add this to vendor.php around line 257 if (DISPLAY_VENDOR_DISTANCE == 'true') { $string_vendor .= '<BR>' . TEXT_DISTANCE . number_format($vendors_array[$i]['distance'], 1) . TEXT_MILES; } And run this against the db INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Display Vendor Distance', 'DISPLAY_VENDOR_DISTANCE', 'true', 'Include vendor distance display in the search results', '1', '24', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now()); Quote Link to comment Share on other sites More sharing options...
hobbzilla Posted February 24, 2004 Author Share Posted February 24, 2004 Vendor Locator Add-on Version 1.1 Released Get it here. Quote Link to comment Share on other sites More sharing options...
darkangel Posted February 24, 2004 Share Posted February 24, 2004 Thanks you for the help Hobbzilla, I understand being under a lot of work, don't stress your self... Thanks for everything... I will set this up and see if everything works... Once Again Thanks... :) Dark Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.