Knowledge Base - Gateway for Sobipro
What is it
SobiPro is a leading Joomla content creation component with full business directory functionaility. Using Geocode Factory's SobiPro gateway plugin, you can associate one or more sets of coordinates to each of your SobiPro entries. This will allow you to collectively display the locations of your entires on a map, whether browsing by section, category or search view.
Note: In order to use Geocode Factory's SobiPro gateway plugin, you need to have Geocode Factory 5 component already installed.
The gateway plugin for SobiPro is not included in your Geocode Factory 5 package by default. It is the following file which is an optional extra:
- plg_geofactory_gw_sp.zip: gateway plugin
Access and Download
Please read the Download, install and update manual for more information.
The SobiPro Gateway plugin file "plg_geofactory_gw_sp.zip" is installed using the standard Joomla installer (please see the main GF5 documentation).
Gateway Plugin configuration
Inside the joomla “Plugin Manager” you will find the installed gateway plugin. To locate it more easily, you can use the filter by adding the text “geocode” for example, like in the following image (the 3rd one).
Configuring the SobiPro Gateway plugin you have the following options:
- Colors of the lines between owners and content markers: This option will draw lines between the markers between each owner and his/her SP entry. For these lines to be drawn on your map, you need to enable the “Connect my addresses” option, by setting it to yes, in your map’s settings. This specific option is found in the “Map Settings” tab of the “Map Manager”.
- To select the colors of the lines drawn in this case, click on the hexadecimal color code and select the color from the palette pop-up. Or alternatively, you can type in the hexadecimal color code of your choice in the field directly.
- Number of markers: You can configure how many markers to display after a Sobipro search has been conducted. Leave empty to display all markers.
Just installed SP Geomap field?: If you want to install the Sobipro Geomap field from Sigsiu.net and you already have geocoded entries, then set this to 'Yes'. This will update the database each time an entry is geocoded. In this case it is recomended that you do a global geocode (batch geocode) after installing the SP Geocode field and setting this to "Yes'. If you just installed the Sobipro Geomap field now or if you have never used it before you must select No.
Pattern manager and SobiPro
When you enter the pattern manager you will see that one default pattern for SobiPro is created automatically when you installed the plugin.
As we mentioned before you have two options available in geocoding entries with SobiPro.
a) If you have the Sobipro Geo-field installed you can select any configured Geo-field.
b) If you do not have the Sigsiu plugin, you can only select the -default- option.
In other words, one option is using the Sobipro geomap field to determine the coordinates. You can get one set of coordinates from Sobipro geocode field for each Sobipro section. The other is the default option where a Geocode Factory pattern and assign the SP fields to be used to geocode (to find the coordinates). You can create many patterns in this way, each one with it's own custom fields assigned from which to geocode and get the coordinate(read the main documentation section "Patterns"). In other words you have an unlimited number of custom fields to make available for determining addresses/locations.
See here how to configure the different fields:
- Latitude: Here you need to select one of the coordinates fields designed for latitude. Of course for advanced users, you can also use custom created field that contain a latitude.
- Longitude: Here you need to select one of the coordinates fields designed for latitude. Of course for advanced users, you can also use custom created field that contain a longitude.
- City: Select the field where you are storing the user's city. ususaly is the SobiPro_city field.
- Other address fields: Exactly like the city, select here any field that define the address.
Note: Like it is described in the main documentation, the more fields you set for the address, the more accurate marker position you will get.
Note: If you are using more advanced fields (non-textual), like a country-selector, and this field does not appear, you can go in theGeocode Factory settings and set the 'Use all fields' to YES.
The specific settings tab
The options on this tab are generated based on the currently selected pattern. In this tab you can select various different filters for the current markerset allowing you to further customise your data pool. You may also select some other options which are not filter related.
- Filter Generator: Here you can introduce SQL queries to filter out your results. The Geocode Factory query will be build with your optional filter. For instance, in the example above the condition is that the data in the field "SobiPro_listme" has to be equal to "Yes". This way, the SobiPro entries which meet this condition will be used only. The idea in this case is to have a checkbox field (SobiPro_listme) where the owners choose whether they want to have their entry displayed on the map "Yes", or not "No". Of course this field could be an administrative one instead, it's up to you and what you want to achieve.
Warning: The use of this feature is the most common source of errors that result in no markerset being displayed! Remember that here you are adding a clause/condition affecting the mysql database query. Each wrong or missing charter/quote will cause an error. Handle with care!
- Select sales area field: Here you can select the SobiPro field that will be used to calculate the "Sales Area". It has to be a numeric value/field. See the Geocode Factory advanced features article to better understand this concept.
- Categories to include: Here you can select the categories from which to choose the article markers to display on the map. You can enter many SobiPro categories.
- Draw Lines entry-owner: Select if you wish to Draw Lines between the markers.
- Enable Auto-Category: With the auto-category feature enabled, the markers that will be displayed will be entries belonging to the categories you are currently browsing only (and child categories as well). This option is used to get a functionality typically seen in directories, and is often used in Sobipro.
Aditional note about filters with Sobipro
There is 2 main types of filters in Sobipro, this is regarding the Sobipro database structure. The 'normal' type values (like text input box), and the 'list' type values (like list or check box). Because of this, we have created 2 main filters textarea (see above capture).
- The first type is to be entered in the 'Filter generator' textarea: (fid=2 AND baseData = '25'). The syntax is generated by the wizzard.
- The second type is to be entered in the 'Filter generator for list' textarea: (fid=2 AND optValue = '25'). The syntax can be generated by the wizzard, but in this case you need to copy it into the second textarea, and change the 'baseData' to 'optValue' term.
And in Sobipro gateway, you can use multiple filters: ( fid=2 AND baseData= '25' ) ## ( fid=3 AND baseData='red' ). The ##represents the 'AND' operator. This can be used in both 'Filter generator' and 'Filter generator for lists'. And if you are using both type of filter as same time, the AND operator is applied by default.
Note: if the list / checkboxes fields does not appear into the list, you have 2 choices: Manual: search the field ID into to Sobipro field manager Automatic: in Geocode Factory Control panel, go to component settings, and select 'Show all fields'
Geocode Factory 5