Knowledge Base - Gateway for K2

 

K2 Preparation

To geocode your K2 items using the Geocode Factory K2 gateway plugin you have a few options.

1
To get location data from your K2 custom fields.

    a) These can be either address fields like street, postcode, city, etc.

    b) Or they can be coordinate fields (latitude and longitude).

2
To get the coordinate data from the 3rd party extension "StyleWare K2 Google Maps".

 

If you use the "StyleWare K2 Google Maps" plugin you can skip the K2 preparation

 

K2 Custom Fields

k2 xtra fields

If you use K2 custom fields follow the following steps to create the fields before configuring the K2 gateway plugin:

Once inside your K2 component, click on the "Extra Fields" option from the left sidebar.

Then click on the "New" button from the top of the screen.

new extra field

In this tutorial we will be using address fields for street, postal code, city and country. If you choose to use coordinates fields instead, the process is very similar but you only need to create two fields in this case: latitude and longitude.

 

First custom field: Street

 1st extra field

Name: Give a name to your field.

Group: Choose the "Create new group" option and enter a name for your new group, ex: "Location Fields"

Required: Select the "Required" settings as you like.

Type: In our case the field type is a simple text field.

Finally, save your new field.

 

 

Second custom field: Postcode

2nd extra field

Name: Give a name to your field.

Group: Select the group you created in the previous step, in the 1st custom field, ex: "Location Fields".

Required: Select the "Required" settings as you like.

Type: In our case the field type is a simple text field.

Finally, save your new field and repeat this last step for as many fields as you like (ex: city, state, country, etc).

If you chose to use the coordinate fields of latitude and longitude you are done at this point.

 

 

k2 cat menuK2 Field Group Assignment

The K2 component allows you to assign different custom field groups to different categories. This gives us extra flexibility as each category can have it's own set(s) of custom fields.

So the final step of the K2 preparation is to assign the custom field group you created (ex:"Location Fields") to the category or categories you want to use it with. 

 

Once inside your K2 component, click on the "Categories" option from the left sidebar.

Then click on the category you wish to assign the new field group.

 

associate k2 cat

Select your custom fields group in the Associated "Extra Fields Group" option like in the image above and save. Repeat this for every category of K2 items you wish to use the same group of fields to geocode.

In our demo there is only one category

k2 cat associated

 K2 is now ready!

Applies To

Geocode Factory 5