- JA K2 Filter requires K2 component to be installed
- Fully compatible with Joomla 2.5 and Joomla 3
- PHP version 5.3
- MySQL version 5.x
- Apache version 2.2
- We provide an installation package that includes all elements of the extension: K2 filter module, K2 filter component and K2 filter plugin. When you install the package, you have all extensions listed above installed.
- The JA K2 Filter Component has only one option - Update Indexing. This option is to update the total number of items for each Extra field.
- The module settings are self explanatory but one can still hover over the various settings to view the help tooltips.
- The module can be copied and used for different settings / layouts on different section of your site using menu assignment option.
- The K2 filter plugin is automatic to update indexing whenever you customize, add content, edit or add k2 extra field...
JA K2 Filter Component Configuration
2.1 Update Indexing
Once you install the package successfully, you need to update indexing. This option is to update total items for each extra field faster.
To update Indexing, just go to: Component >> JA K2 Filter component then click on "Update Indexing".
Click on the button "Option" to open the configuration pop-up of the component.
2.2.1 Search Configuration
- Minimum Keyword Search : set minimum number of keywords for searching.
- Maximum Keyword Search : set maximum number of keywords for searching.
2.2.2 Indexing Data
- Update indexing event :
- Cron job private key: this key is used in case you want to update indexing immediately. You should update this key with your own private word.
- Update indexing cron: update indexing data recurring depends on interval that is defined in the interval field.
- Indexing data interval: set the time (in minutes) before the component updates indexing data.
2.2.3 Search Result Item Layout
This is the configuration for the list page of result when filtering with JA K2 Filter.
- Select template: set the template for the layout. You can add new template then customize it (more detail in Section V).
- Leading Count: set the number of leading items in the item list page.
- Columns for leading: set the number of columns to display leading items.
- Image size for leading items: set the image size of leading items.
- Primary count: set the number of primary items to be displayed in one page.
- Columns for primary: set number of columns to display primary items.
- Image size for primary items: set the image size of primary items.
- Secondary count: set the number of secondary items to be displayed in one page.
- Columns for secondary: set number of columns to display secondary items.
- Image size for secondary items: set the image size of secondary items.
- Links count: set the number of items to display as links.
- Columns for links: set the number of columns to display link items.
- Columns for links: set the number of columns to display link items.
Other Layout Options
- Item ordering: set the order option to order items in front-page.
- Pagination: select to show or hide the pagination if there are many items when filtering.
- Pagination results:
2.2.4 Item View Option
This is the configuration for items displayed in the list page when filtering with JA K2 Filter module.
- Title: select to display item's title or not.
- Link on title: select to make item's title linked or not.
- "Featured" notice (next to title): select to display the feature notice of item. If enabled, it will be displayed next to item's title.
- Author: select to display item's author or not.
- Rating (voting): select to display item's voting or not.
- Introtext: select to display item's introtext or not.
- Introtext word limit: set the maximum words of item's introtext.
- Extra fields: select to display extra fields or not.
- Hits: select to show item's hits or not.
- Category: select to display item's category or not.
- Tags: select to display item's tags or not.
- Item modified date and time: select to display item's modified date or not.
- Read more ... link: select to show Readmore link or not.
- Anchor link: select to show or hide item's anchor link.
- Enable K2 plugins: select to enable K2 plugins for the items.
3.1 Basic Settings
- Set ItemID: assign an item ID that will display the search results.
- Module layout: set the layout for the module: Horizontal or Vertical.
- Columns: set the number of columns to display the module. In case there are too many extra fields for filtering, you can set the module to display in more than one column to save space.
- Display item counter: select to display the counter in each filtering options.
- Filter by keyword: select whether to enable the Searching with keyword option or not.
- Filter by category: select whether to enable the Filtering by category option or not.
- Select Categories: select the categories that will be displayed in the Filtering by category option.
- Filter by Author: select to enable option Filtering by author or not.
- Display Author By: when you enable option Filtering by author, you can set to display author by name or username.
- Filter by tags: enable or disable the option Filtering by item's tags.
- Auto filter: if enabled, it will auto submit form when you changing filtering values.
- Auto populate: (for textfield type only) if enabled, when you typing in search field, there will be suggestions based on what you typed.
- Fetch items from children categories: if you select "No" then only the items belongs to a category will be retrieved. If you select "Yes" then item's from all sub-categories will be retrieved.
3.2 Extra Field Settings
This is the configuration for Filtering options with extra fields.
Tick on the extra fields you want to enable on the module. The selected extra fields will be available in front-page for filtering.
You can set the type for extra fields.Front-end Appearance
Create Extra Fields
4.1 Create Extra Field Group
From back-end of your site, navigate to: Components >> K2 then open the tab: Extra Fields Group.
Click on the "New" button to create new group.
4.2 Create Extra Field
When open the tab: Extra fields you will see the list of all created extra fields. Click on the "New" button on the top right.
Enter the information of the extra field you want to create.
Add New Layout and Customize Layouts
- Step 1: Download the package of K2 Filter Theme
- Step 2: Extract the downloaded package
- Step 3: Copy the extracted folder to: components/com_k2/templates
- Step 4: Set the new created template as the template for K2 filter
From back-end of your site, go to: Components >> JA K2 Filter then open Option settings panel. In this panel, please select tab: Search Result Item Layout and select the new added theme in the field: Select a template.
When you want to upgrade any JA Product, we suggest you to use JA Extension Manager to upgrade. This extension will prevent you from losing data and your configuration the upgraded extension. The extension is free.
After upgrade the extension successfully, you have to update indexing, it is required step every time you upgrade the extension.
From back-end setting, go to: Component >> JA K2 Filter then click on Update Indexing button.
Please check our upgrade instruction to make sure your upgrade is processed correctly.
Version 1.2.3 - new feature: Depend Filter
The new feature - "Depend Filter" means when you select first option, corresponding options in the second dropbox will be shown. For example, you have 2 fields: Country and City, when you select "England" country, city list of England will be shown in the City select box field.
Steps to create Depend Filter
In order to create Depend Filter, you need to create a Multi-level Fields Data:
Step 1: go to "Components » JA K2 Filter >> Multi-level Fields Data" and create new category. Here is a sample category tree. The root category is "Location" and its sub-categories are location names.
Step 2: go to "K2 » Extra Field » Add new Extra Field", please make sure the extra field type must be "Text Field" and the alias must match with alias in step 1 - "location".
Step 3: access "Extensions » Modules" and create JA K2 Filter Module. In the "Filter By Extra Fields" setting panel, enable the "Location" extra field and select the "Depend Range".
- Auto Filter from: this setting only works if you set Auto Filter to Yes. For all levels, add "All" to the field.
- Sub Select box level: Name of each Sub Select box, each title is separate by a comma.
- On front-end, each level will be displayed as Select box.
The version has 3 new feature: Update to display multi-select field in search form.
Feature 1 - Multi Columns Ordering
You have lots of fields to filter but previously, the result page is ordered based on 1 field so sometimes, user can not get best relevant result. The new feature Multi Columns Ordering allows you to order items in result page more flexibly based on multiple fields.
Settings - The setting for the new feature is quite easy, open the setting page of JA K2 Filter module, select the fields to order items with.
Select the fields you want to order items with.
Drag and Drop to change the priority of orders for the fields.
For each field, you can order result by ASC or DESC to make the result match with what you want.
The feature is to give users a page with pre defined filters on first load of JA K2 Filter page.
Open JA K2 filter module, open the Pre-Filter setting tab and enable the setting: Use Pre-Filter then select the value for filters that the pre-filter page will use.
In the first load of K2 Filter page that has the K2 filter module, user will be in a search result page with pre defined filters.
The type of each field depends on the type of that field on tab Module. For example: Extra Field name Size has type is Checkbox, Magic Selection, or Multi Select box >> on Tab Prefilter we can choose more than two value for this field, but if the type is Radio button or Drop down box, we can choose only one value.
Each time we change for Multi Select List to Single Select List or vice versa, value of that field will be reseted.
Filter sub-category (parent category is not included)
The features is to help you saperate the result page of parent category and sub-categories. It means that, each time you choose sub-categories, the parent category will not be included to follow the structure and the result page just shows items of sub-categories.
Open the setting panel of JA K2 filter module and disable the option: Filter Full structure Category then select the sub-categories
In front-page, the Category field displays selected sub-categories only, no parent category.
The version has 1 new feature: Update to display multi-select field in search form. This new feature is to implement the location filter in JA Directory.(Demo)
Imagize that you have multi level data like location where you have Country > City > streets. In this case, you can not use K2 extra fields as it does not support multi-level fields. In this documentation, we will use location as sample and guide you how to create multi-level field for location and display it in the JA K2 Filter module where you can filter items with location.
Step 1 - Create Multi-level field data "Location"
From your site back-end, go to: Component > JA K2 Filter and you will find the "Manage Multi-level Fields data", hit the button to manage your multi-level fields.
In the working panel of "Multi-Level fields data", create a field named "location" with alias: "location". The alias is very important as it is to map with K2 extra field that we will create in the second step. Create other fields under the "location" field, you can have city > streets like:
The alias of the "Location" Multi level field must be the same with K2 extra field so they can be mapped and the K2 extra field can load the multi-level fields.
Step 2 - create extra field "Location"
Go to Components > K2 > Extra fields and create new extra field: "Location" with same alias of "Location" multi-level field - "location". Extra field type must me Text Field.
Once done, the "Location" K2 Extra field will load all the multi-level fields under the "Location" (sub-field of multi-level field "Location") we created in step 1. Go to K2 Item editing page that you want to assign "Location" extra field, assign the location you want for the item.
Step 3 - Create JA K2 Filter module
The module allows you to search k2 items with keywords or filter items with extra fields.
Feature 1: Dynamically load fields of active categories
You have some categories on site, each category use different Extra Field Group. On front-end, you have created some pages to display items from certain category.
As before, for each K2 category you have to create a module. That means you may have to create a lot of instances. The new feature will help you solve the inconvenience. You can create one module for all K2 categories, the module automatically load fields of the category in the page only.
To resolve this issue, we have added new feature called “Dynamic Mode” in new version (1.1.8), that helps to use one instance of Filter module for all pages by automatically updating values/options of form field.
For detail, the module will dynamically detect whether or not you are on a K2 Category view/JA K2filter view and will display only options that replated with categories that selected for a page.
The form fields will be updated/affected if you turn on Dynamic mode are:
- Category field
- Tag Field
- Order By Field
- All Extra Fields (display only extra fields in groups that assigned to Categories accordingly.
Sample of use
For example, our site has two categories are Laptop and Fashion, each category use different Extra field group. We have created 3 pages on front-end, one will display items from all categories, one will display items from Laptop category only, and one display items from Fashion only.
We will create one instance of JA K2 Filter module (with dynamic mode) and assign it to displayed on all page. Now to see how module will be displayed differently on each page.
1.1 Enable the option in JA K2 Filter Module back-end
1.2 Select Default for "Menu ItemID" and the Ordering Fields
- Menu Item ID: since module is assigned to many pages, so you need set Menu ItemID to default to get it display search result on current page.
- Select all options for “Ordering Fields” setting, included options order by extra fields from both extra field groups
1.3 Select all categories
1.4 Select extra fields from 2 groups
In front-end, JA K2 Filter Module will display the extra fields based on K2 Category the page's loading. With Pages that don't load K2 category, all extra fields will be displayed. With this feature, you don't need to create multiple instances, 1 module can do all for you.
Feature 2: Sort search result by text field
The feature is to order search result page with text fields. Here are the steps to enable the feature.
2.1. Select extra field data type
Go to back-end > JA K2 Filter > Option > Extra Field Values Sorting Mode > select option Extra Field Data Type: String or Numeric Data type depends on Data type of the input you fill in Text Field
2.2. Select ordering fields
Go to back-end > Module Manager > JA K2 Filter > Ordering Fields
Feature 3: Sort search result by date
K2 Extra field type Date
If you want to order search result page by Date, Extra Field Data Type must be set to String in the JA K2 Filter Module setting panel.
Feature 4: Search in whole range
This setting is used in case the range start point and range end point are set to some value for default, not the minimum and maximum value, and when searching, user haven’t change the value of the range.
- If Yes, JA K2 Filter module will search in whole range (from minimum value to maximum value)
- If No, it will ignore this in the search condition
The Range value is from 0 - 2500, and sub-range default value is 200 - 1000
If Search in whole range set to Yes, then JA K2 Filter will search in whole range, from 0 - 2500.
If No, JA K2 Filter only search in sub range, from 200 - 1000
NOTE:This setting will not work if Form contains extra fields from many different groups.
Released date: 29th, August, 2014
Feature 1. Ordering search result by relevance
Ordering search result by relevance is to sort search result based on the relevance to keyword. Each item in search result will be scored based on predefined scores for element in your K2 item (e.g: title, intro text, full text, meta data, …), thus the highest relevance item will be put on top of the search result.
There are 2 steps in the configuration in order to get the feature active in your site.
Step 1: Setting scores for each element
To define scores for each searching field, From your back-end, goto: Component → K2 filter → Option → Relevance Settings
Score value must be integer, the larger value you set, the higher relevance it has once keyword search match that field.
Step 2. Display on front-end
Go to JA K2 filter module back-end, add Relevance to the "Ordering Fields" field.
Score value must be integer, the larger value you set, the higher relevance it has once keyword search match that field.
2. Using the feature
To use this feature, fill keyword or a search query in the search box and select Relevance order.
For example, if you search with the advanced keyword:
intitle:"Laptop" sony OR dell "HD Graphics 4000"
If one item with a title contains all 4 keywords "Laptop" and "sony" and "dell" and "HD Graphics 4000", that item will have 4 * 10 = 40 points (10 is the relevance value defined in step 1), if it contains 3 keywords, it will have 30 points, etc. This rule will be applied the same for other fields: Meta description, meta keyword, etc.
And item’ score is total score of all above.
Item with the highest score will be given first.
Improvement: New option for sorting extra field value
Sorting Extra field value already support 2 options: sorting by Ordering, and Alphabetical. Now we add one new option: Sorting by number.
1. Ordering: follow the default order of Extra Field in K2
Go to go to backend → Components → K2 Filter → Options → Search Configuration → Extra Field Values Sorting Mode, select Ordering for Extra Field.
2. Order by Character
- Set Extra field Data type to String: backend >> Component >> K2 filter >> Option >> Search Configuration >> Extra Field Values Sorting Mode >> in one Extra Field, select String.
- Set the Sorting Mode follow Alphabetical:
3. Order by Number
- Set Extra field Data type to String: backend >> Component >> K2 filter >> Option >> Search Configuration >> Extra Field Values Sorting Mode >> in one Extra Field, select Numberic.
- Set the Sorting Mode follow Alphabetical or Reverse Alphabetical. Alphabetical means the array will be sorted by ASC and Reverse Alphabetical the array will be sorted by DESC
Released date: 25th, July, 2014
Feature 1. Sort search result by Extra fields
The feature allows to sort search results by extra fields. Here is how to enable and use the feature:
1. Select extra field data type
From your site back-end setting panel, go to: "Components >> JA K2 FILTER >> Options >> Search Configuration", find the "Extra Field Data Type" configuration, select the data type for extra fields. This extra fields type is used for sorting.
There are 2 sorting modes: String and Numberic. For example, we have value list of:
1, 3, 2, 4, 12, 11. If you select String sorting mode, the result is:
1, 11, 12, 2, 3, 4 while it's is
1, 2, 3, 4, 11, 12 if you select numberic sorting mode.
2. Select ordering fields
Open the back-end setting of "K2 Extra fields Filter and Search" module, in the setting panel "Search Result Settings", select the ordering fields that user can select to sort search results.
The feature supports the following field type:
- Single Select
- Multiple Select
- Searchable Label
Feature 2. Add setting for sorting values of each extra field
This feature is to sort values of extra field in the JA K2 Extra fields Filter and Search module. To configure this feature, please go to: "Components >> JA K2 FILTER >> Options >> Search Configuration", in the "Extra Field Values Sorting Mode" setting, select sorting mode for each extra field.
There are 2 sorting mode: by Ordering and by Alphabeta. The Ordering sorting mode is the sorting method based on the extra field ordering in K2. The Alphabeta sorting mode is the sorting method based on extra field alphabeta.
Feature 3. Add setting to show or hide keyword tooltips
The new setting is to show or hide the tooltips in front-page. To configure this feature, please open the back-end setting of "K2 Extra fields Filter and Search" module, find the setting "Keyword Tips" and configure: show or hide, it's your call.
Check the tooltip in front-page
Released date: 4th, June, 2014
1. Keyword Search Improvements
Improvement: Remove search mode field, and use advanced keyword instead of (can use operators in keyword search to define many different search modes, it's alike the way Google does)
Refer to Google Search Operators: https://support.google.com/websearch/answer/136861?hl=en
Operator supported suggestion:
|"search"||Search for an exact word or phrase||Use quotes to search for an exact word or set of words on a web page. This is helpful when searching for song lyrics or a line from a book. But only use this if you're looking for an exact word or phrase, otherwise you'll exclude many helpful results by mistake.
"imagine all the people"
|-search||Exclude a word||Add a dash (-) before a word or site to exclude all results that include that word. This is especially useful for words with multiple meanings, like Jaguar the car brand and jaguar the animal.
jaguar speed -car
|*||Fill in the blank||Add an asterisk within a search as a placeholder for any unknown or wildcard terms. Use with quotation marks to find variations of that exact phrase or to remember words in the middle of a phrase.
"a * saved is a * earned"
|Search for either word||If you want to search for pages that may have just one of several words, include OR (capitalized) between the words. Without the OR, your results would typically show only pages that match both terms.
world cup location 2014 OR 2018 OR 2022
|intitle:||Searches for a single word or phrase in the title of the search result.||There are 2 notes when using the operator.
Find information about the use of robots in the production of Toyota vehicles.
assembly line robots intitle:Toyota
Find information about RSS feeds provided by the MIT Libraires.
intitle:"MIT Libraries" intitle:"RSS feeds"
|intext:||search in introtext, fulltext field||the same rules with intitle: operator|
|inall:||search in all fields||Available from version 1.1.5|
|inmetadata:||search in meta keywords and meta description data||the same rules with intitle: operator|
|inmedia:||search in listed fileds below:
||the same rules with intitle: operator|
Example of complex sample search keyword:
intitle:"laptop dell" - intext:"corei3"
2. Highlight search term
This new feature is to highlight the search keyword in the search result page. The following image shows you how it works.
To enable this option, open JA K2 Filter component setting panel, in the Search Result Item Layout tab, find and enable the setting Hightlight Search Term.
3. Issues with site using JoomFish to setup multilingual
The issues below are only occured in sites that use JoomFish component to setup multilingual, and with pages that are not default language.
- Support search with advanced keyword in JoomFish content if user switch to language that is not default language.
- If search by keyword does not return any item (in specific language), then it will ignore Search by keyword term. It means return all item that matches with other search term (category, tag, extra fields), and do not care “Keyword” term.
- If extra fields does not display in search result and item detail view, please use solution that mentioned at: https://code.google.com/p/getk2/issues/detail?id=491#c5
Released date: March, 28, 2014
Feature 1: add search mode for Multi select and searchable extra field types
For multi select and seachable extra field types, it can be assigned to Match any or Match All search mode. To configure this option, go to Components >> JA K2 Filter >> Options. In the setting panel, Multi-select extra fields will be auto loaded to the "Extra Field Search Mode" field. Set search mode: Match any or Match all for multi select extra fields.
In front page, when filtering with multi select extra field or searchable extra field, the result returned can match all or match any with selected values.
Feature 2: add Search by date option (standard filter field)
This option allows user to search items by created and modified date. To enable the option, open JAK2 Extra fields Filter and Search module, enable Search by date field.
Let's check front-page
Released date: November, 27, 2013
Feature 1: separate search results templates
If you use number of JA K2 filter modules, those modules now can be assigned to different themes (the templates of result page). To do this, open module setting panel then select theme for the module.
Feature 2: order K2 extra fields alphabetically
This feature is hard coded, that means there is no setting for the feature. The new feature orders your extra fields displayed in JA K2 filter module alphabetically.
Feature 3: set order for K2 Extra Field Groups<
You can change the displaying order of K2 Extra field groups. Open back-end setting of JA K2 Filter, change the order of K2 extra field groups then hit Save.
Feature 4: add new field types for standard search fields
Now you can select the field types for "Filter by Author" and "Filter by Tags". This will make the filter with those fields more effective and flexible.
Feature 5: set default mode for keyword search
If you want your keyword search to be set to "Exact Phrase", "All Keywords" or "Any Keyword, it's now available for you with one click. Please open JA K2 Filter module setting panel then select the default mode for "Filter By Keyword".
Feature 6: Share link of results page Ajax filter
When enable Ajax filter, you will see the URL when filtering is not changed.
You can get the URL of result page by enabling "Result link" option in JA K2 Filter module setting panel.
Now you can see a "Link" button in the bottom of JA K2 Filter module, click on that button, you will be navigated to the result page with FULL URL.
Released date: October, 03, 2013
Feature 1: add K2 extra field type: Searchable label
Step 1: create extra field with Type is Searchable Label
Step 2: Add extra field to products
Step 3: open K2 Filter module then enable "Searchable Label"
Let's check front-page
Feature 2: add "Search by date" option
The new search option allows user to search product based on product creation date
Step 1: enable this option from back-end of K2 module
Step 2: in front-page, open the K2 filter module you will see the searching by date is available
Feature 3: add params to show feed icon on the result page
The new feature is to display FEED icon on the result page.
To enable this option, navigate: Components >> JA K2 Filter >> Options >> Search Result Item Layout then enable options of Feed icon.
Feature 4: AJAX search feature
The Counter will be auto inactive when AJAX feature is enabled.
Implement Ajax search feature (this feature will be provided as optinal in module's setting form)
Released date: July, 11, 2013
Feature 1: show extrafield group dropdown
This option allows you to get a dropdown selection of extra field groups.
In back-end, tick on the extra fields to enable them on their group
Feature 2: adding setting for displaying ordering box in search form
You can enable ordering box in search page with configurable Order By values.
To enable this option, from back-end of JA K2 Filter module, enable option: Display Ordering Box then select Order By.
Feature 3: new mode for Keyword search
Provide new modes of keyword search:
- Match all words
- Match any word
- Match exact phrase
All you have to do is to enable option Filter By Keyword in the back-end setting of module JA K2 Filter.
Feature 4: adding option to enable Reset button for search form
You can enable the Reset button on search form or not.
In the back-end of module JA K2 Filter, enable option Enable Reset Button.
Feature 5: can I select which "Extra Fields" to show in results page
This version allows you to show selected extra fields in result page.
In the back-end of component JA K2 Filter, open tab Extra-fields View Options then select to display all extra fields or display selected extra fields.
Released date: July, 11, 2013
Feature 1: Add Search mode: Extra field only
This option allows you to disable all Standard Fields filtering: Filter by keyword, Filter by category, Filter by author,... And now, search mode is extra fields only.
Feature 2: update item counter for each value of form field depend on what user selected
This is also called Dynamic Counter. When the option is enabled, counter of each value from filtering fields will be updated based on what user selected.
Example: In this example, we show 2 cases:
In the first case, you can see that no category is selected then look down to see the counter in extra fields values. Now, when we select a category, the counter of extra fields is updated based on selected category.
Feature 3: filter by rating
A new Standard Fields is added named: Filtering by Rating. This option allows users to filter items based on item rating. Slide to change rating level to filter.
Feature 4: new filter form field: range slider
This is a great additional filtering type. User can filter items based on a range of defined value in back-end. They can slide to change the range value to filter.