Speak to our experts today 0333 004 0333
Speak to one of our experts today
User Guides

EKM Tag: [ekm:searchbox]

This tag is used to output a search box on your shop. It can be used to output either a basic name search or advanced search.

  • Tag Information
Basic Use
In it's basic use the tag will output the search box with the default HTML and CSS.

[ekm:searchbox][/ekm:searchbox]
								
Advanced Use
In it's advanced use you can specify your own surrounding HTML and CSS enabling you to fully customise how the search box looks.

[ekm:searchbox]
    show_search_term='yes';
    search_field_placeholder='Search for products...';

    output_start='<div class="search-box">';
    layout='[search-field][search-button]';
    output_end='</div>';
[/ekm:searchbox]
								
Tag Attributes
Show Search Term?
show_search_term='yes';

Specify whether, when a search is performed, you'd like this search box to display the search term in the text box.

Value
Description
yes
Will display the search term in the text box.
no
Will leave the search box blank during a search.
Search Parameters
search_parameters='productname, productdescriptions';

Specify which parameters you would like to be included in the search. By default, only the product name is searched for matches that contain all the words within the search term. If you use any other parameters, the search will look for matches that contain any of the words within the search term. This can be a comma separated list of the available values.

Value
Description
productname
Searches product names
productdescriptions
Searches product descriptions
productshortdescriptions
Searches product short descriptions
productcode
Searches product codes
brand
Searches product brands
condition
Searches product conditions
gtin
Searches product GTINs
mpn
Searches product MPNs
categoryname
Searches category names
categorydescription
Searches category descriptions
incategory
Searches incategory descriptions
variant
Searches product variants
Search Field Placeholder Text
search_field_placeholder='Search for products...';

Allows you to define your own placeholder text to be output in the search box text field.

Value
Description
{user defined}
Specify your own placeholder text.
Search Field Attributes
search_field_attributes=' style="color: red;" ';

Specify HTML <input /> tag attributes to be placed on the search field.

Value
Description
{user defined}
Specify your own attributes.
Search Field Additional Class
additional_field_class='new-class';

Specify any additional classes to be added to the search field.

Value
Description
{user defined}
Specify your own class.
Search Button Value
search_button_value='Search';

Specify the text to be used on the search button.

Value
Description
{user defined}
Specify your own search button text.
Search Button Attributes
search_button_attributes=' style="background-color: red;" ';

Specify HTML <input /> tag attributes to be placed on the search button.

Value
Description
{user defined}
Specify your own attributes.
Search Button Additional Class
additional_button_class='new-class';

Specify any additional classes to be added to the search button.

Value
Description
{user defined}
Specify your own class.
Search Button Source
button_src='';

Specify an image path to be used as the search button

Value
Description
{user defined}
Specify your own image path.
Output Start
output_start='<div class="search-box">';

Specify any HTML you want to be output before the search field and button.

Value
Description
{user defined}
Specify your own HTML.
Layout
layout='[search-field][search-button]';

Specify the layout of the search box content. Use this to output any HTML you want to wrap the text box and button.

Value
Description
{user defined}
Specify your own HTML.
[search-field]
Outputs the search field.
[search-button]
Outputs the search button.
Output End
output_end='</div>';

Specify any HTML you want to be output after the search field and button.

Value
Description
{user defined}
Specify your own HTML.