customer_account:template_manager:template_manager_plugins

customer_account:template_manager:template_manager_plugins

Plugins for the template manager

With the newest templates html3.1.tpl or plenty2.tpl (plentyMarkets), FINDOLOGIC offers plugins to adapt the search result easily and as you desire.

You can continue to access smarty variables directly as usual. For the relevant documentation, please visit our documentation about the template manager.

At the moment we offer the following plugins to adapt the search result easier:

Name Description
{logo} Integrates the FINDOLOGIC logo in the desired color scheme.
{chosen_filters} Adds the filters currently selected by the user.
{promotion} Adds promotion image if triggered.
{filter name="FILTER"} Inserts the filter options corresponding to the parameters.
{not_found} Outputs the desired response if no products have been found.
{paginator} Outputs links to the navigation.
{results} Displays the products found.
{sort} Enables result sorting.
{generated_filters} Outputs the filers configured in the customer area.
{query_info_message} Generates a text that tells the user what they searched for and how many results were found.

The functions in detail

All parameters are optional, but some are required to obtain sensible results (for the “filter” function for example).


The {logo} plugin allows you to easily display a logo with a direct link to findologic.com.
The only thing you might need to do is to style the logo with CSS, in order to place the logo at the right side and above the search results.
If you want to know more about how to implement the FINDOLOGIC branding, see our documentation about FINDOLOGIC branding.

Example:

{logo color="findologic_logo_neg_grau_hg_en.png"}


Parameter Value Output
“no parameter”
color findologic_logo_neg_orange_hg_de.png
color findologic_logo_neg_grau_hg_de.png
color findologic_logo_neg_schwarz_hg_de.png
Transparent
color findologic_logo_neg_orange_transparent_de.png
color findologic_logo_neg_grau_transparent_de.png
color findologic_logo_neg_schwarz_transparent_de.png
For websites with dark background
color findologic_logo_neg_weiss_de_darstellung.png
color findologic_logo_neg_weiss_transparent_de.png 1)


Parameter Value Output
color findologic_logo_neg_orange_hg_en.png
color findologic_logo_neg_grau_hg_en.png
color findologic_logo_neg_schwarz_hg_en.png
Transparent
color findologic_logo_neg_orange_transparent_en.png
color findologic_logo_neg_grau_transparent_en.png
color findologic_logo_neg_schwarz_transparent_en.png
For websites with dark background
color findologic_logo_neg_weiss_en_darstellung.png
color findologic_logo_neg_weiss_transparent_en.png 2)


Parameter Value Output
color findologic_logo_neg_orange_hg_ru.png
color findologic_logo_neg_schwarz_hg_ru.png
Transparent
color findologic_logo_neg_orange_transparent_ru.png
color findologic_logo_neg_grau_transparent_ru.png
color findologic_logo_neg_schwarz_transparent_ru.png

The {chosen_filters} plugin allows you to easily display all chosen filters.


Examples:

{chosen_filters}
{chosen_filters name="color" remove_label="Klick Me!"}
{chosen_filters remove_all_only="1" remove_all_label="Please remove those filters."}


Parameter Value Description Default
“no parameter” Supplies all selected filters as a link to remove them.
name cat Supplies all selected category filters as a link to remove them.
name vendor Supplies all selected vendor filters as a link to remove them.
name price Supplies all selected price filters as a link to remove them.
name attribute-name3) Supplies all selected attribute filters as a link to remove them.
removeable 0 Supplies the selected filters as a text, not as a link for removal. 1
remove_label String The given value is submitted as a title to the link (appears with onMouseOver). “Remove filter”
remove_all 0 If used in order not to display the link “Remove all filters”. 1
remove_all_label String The given value is adopted as a text for the “Remove all filters” link. “Remove all filters”
remove_all_only 1 Only the link to remove all filters is displayed. 0
currency Currency that should be displayed for the selected price filter.
<Filtername> Desired title Title that should be displayed for a desired filter category4) Default is “manufacturer” for “vendor”, “category” for “cat”, otherwise the title of the filter category will not be directly adopted.

The {promotion} plugin allows you to easily display promotions set in the customer account. Here you can find how to set up a promotion.


Example:

{promotion}

The {filter} plugin allows you to easily display a certain filter.

Please note: If you use the {filter} plugin to load your filters, then the filter configuration in the customer account won't work. If you want to use these configuration, use {generated_filters} instead.

Examples:

{filter name="cat"}
{filter name="Farbe" type="color-picker"}
{filter name="price" type="range-slider"}


Parameter Value Description Default
“no parameter” Yields an empty box; at least the parameter “name” is required for a sensible output
name cat Supplies all selectable category filters
name vendor Supplies all selectable vendor filters
name price Supplies all selectable price filters. Possible as slider
name Attributsname Supplies all selectable attribute filters
type color-picker Places a symbol of the selectable colour in front of the names of the selectable colours (learn more) Filter name display
type select Displays the filters in a drop-down field Filter name display
limit Integer Sets the maximum number of filters to be displayed “infinite”
offset Integer Sets the position of the first filter to be displayed 0
action_url String Specifies an absolute path prefix
show_frequency Boolean The number of associated hits is not displayed 15)
not_found String The given value is displayed if no further filters have been found No further filters available
sort String relevance ⇒ sort acc. to relevance, count ⇒ Sort acc. to number of results, numeric ⇒ Sort numerically6) Alphabetically
currency String The unit of currency (only usable for the price filter)
separator String The decimal separator for prices (only usable for the price filter) ,


Display with dropdown-menu

If you have already grown fond of your former template display, you can recreate it in the following way amongst others:

{filter name="vendor" limit="5"}
{filter name="vendor" offset="5" type="select" not_found=""}

If required, an empty initial option can be added in this way:

<script>
	jQuery(".flSelectorBox select").prepend('<option value="#">Please select</option>');
	jQuery('#flMainFilterBalken select option[value=#]').attr('selected','selected');
</script>


Displaying prices with sliders

It is possible to display prices using a slider in price areas. This is supported with type=“range-slider”.

{filter name="price" type="range-slider"}


If you wish to have the corresponding vendor logo displayed alongside the name, you can achieve this quickly and easily. See our documentation about manufacturer logos for further informations.


Configuring single filters / hiding filters with no further filter options

If you wish to specify values for particular filters (e.g. sorting), insert the following code for the filter display (in this case, “size”). In this way, you can also hide filters, for which no further filter options are available.

{assign var="filter" value="Size"}
{if $FILTERS.$filter.filters}
    <div class="flFilterBox">
	<strong style="font-size:12px;">{$filter}</strong>
	<div class="flFilterBoxFilters">{filter name="Size" sort="numeric"}</div>
    </div>
{/if}


Hiding particular filters

If you do not wish to display particular filters, insert the following code:

{assign var="filter" value="Size"}
{if $FILTERS.$filter.filters}
	<!-- {filter name="Size"} -->
{/if}


Showing particular filters under certain circumstances only

In order to display a filter, for example if a particular GET parameter is set (&test=true), insert the following code:

{if $smarty.get.test==true}
    {filter name="Size"}
{/if}


Displaying a filter independently of the category

If you only wish to display a filter if a certain category is selected, you can achieve this as follows:

{if $PARAMETER.attrib.cat[0]=="Category_Path"}
    {filter name="Special filter"}
{/if}


Filter order

By default, the filters for category, vendor and price range are always displayed in the templates. Further filters are displayed according to availability and relevance:

		<div id="flMainFilters">
			<div class="flFilterBox">
				<strong style="font-size:12px;">Category</strong>
				<div class="flFilterBoxFilters">{filter name="cat"}</div>
			</div>
 
			<div class="flFilterBox">
				<strong style="font-size:12px;">Vendor</strong>
				<div class="flFilterBoxFilters">{filter name="vendor"}</div>
			</div>
 
			<div class="flFilterBox">
				<strong style="font-size:12px;">price range</strong>
				<div class="flFilterBoxFilters">{filter name="price"}</div>
			</div>
		</div>
 
{if $MORE_FILTERS_COUNT > 0}
		<div id="flExpandMoreFilters"><a href="#">More filters</a></div>
 
		<div id="flMoreFilters" style="display: none;">
	{foreach from=$FILTERS key=category item=categoryFilters name=categories}
			<div class="flFilterBox">
				<strong style="font-size:12px;">{$categoryFilters.name}</strong>
				<div class="flFilterBoxFilters">{filter name=$category}</div>
			</div>
	{/foreach}
		</div>
{/if}

If you wish to have certain filters always displayed, insert a corresponding entry for this filter in the template. Take a filter for the attribute “color” for example:

...
 
			<div class="flFilterBox">
				<strong style="font-size:12px;">price range</strong>
				<div class="flFilterBoxFilters">{filter name="price"}</div>
			</div>
 
			<div class="flFilterBox">
				<strong style="font-size:12px;">Color</strong>
				<div class="flFilterBoxFilters">{filter name="color"}</div>
			</div>
 
...

You can use the {not_found}-plugin, to display individual message if a query has no results on the search result page.


Examples:

{not_found}
{not_found message="No matching results have been found. Please don't hesitate to contact us by phone under 123/456 or by E-mail under <a href='mailto:support@xy.com'>support@xy.com</a>!"}
{not_found message="<script type='text/javascript'>window.location = 'http://www.shop.de/no-result.html';</script>"}
Parameter Value Description Default
“parameterless” Returns the message “No products have been found”
message String The given value is displayed if no products have been found No products have been found
If quotation marks are used in the “not_found message” (e.g. for a link), simple quotation marks must be used (see code example above)!

You can use the {paginator}-plugin for configuring the pagination of the search result pages.


Examples:

{paginator}
{paginator type="pageSize" sizes="10|20|50|100"}
Parameter Value Description Default
“parameterless” Indicates the paginator with the preset product numbers.
type pageSize Forces the paginator with the submitted product numbers to display
sizes Int|Int|Int|Int The inserted numbers are made available for selection
label String Serves for the description of the selection ''

If you are using type=“pageSize”, you must indicate the corresponding “sizes”!
Ensure that the label is only taken into account when defining type=“pageSize”.


You can use the {results}-plugin for customization of the search result pages.

Examples:

{results type="plenty"}
{results items="Artikelnummer: %ORDERNUMBER%|%TITLE%|%IMAGE%|<span class='preis'>%PRICE%&euro;</span>|inkl. %TAX_RATE% %PERCENT% Ust." cols="4" price_from="ab" show_overridden_price="1" img_width="100" img_height="100"}
Parameter Value Description
type plenty, websale, id If you only wish to output the ID's of the products, select a corresponding “type”. (Default: items)
items String Will be explained in the following table.
cols Int Number of lines of results
price_from String Prefix for “from” prices
show_overridden_price Bool If it is an “instead” price, it is displayed with a “1”.
img_width Int Maximum image width
img_height Int Maximum image height
img_url String Specification of a prefix for all image URLs

By specifying the “items” parameter, you can customize the individual result. To do so, the submitted string is split by a “|” and the identifier resolved within the % character.


Possible identifiers:

Identifier Description
ORDERNUMBER Item number
TITLE Content of the title
IMAGE Image URL
URL URL of the item detail page
PRICE Price
TAX_RATE Tax rate
SUMMARY Content of the summary
PERCENT % sign


Output of IDs

It is also possible to output only the IDs of the results in the template. The display is then adopted by the shop system, guaranteeing that the item display in the navigation and the search is consistent:

{results type="id"}

Output example:

<flProductID>896</flProductID>
<flProductID>898</flProductID>
<flProductID>984</flProductID>

Other values from the product information can still be output as well. In this case, the value PROPERTIES.plenty_id is being output in the tag PLENTY_ID. Because unique=“1” is set, each ID is output exactly once:

{results type="id" tag="PLENTY_ID" value="PROPERTIES.plenty_id" unique="1"}

The output then resembles the following:

<PLENTY_ID>1</PLENTY_ID><PLENTY_ID>2</PLENTY_ID>

This automatically adds a combo-box with sorting options. This plugin has no options.

Example:

{sort}

This plugin outputs the filters configured in the customer login.

Filter Response HTML 3.0/3.1:

Filterconfiguration 3.0/3.1

Filter Response HTML 2.0:

Filterconfiguration 2.0

You can access the filter configuration in the customer area under Settings → filter configuration.

See our documentation of the filter configuration for further information.


Embedding into the template

In order to display the manually configured filters in the template, you must perform the following adaptation.

To output the configured filters, embed the following code at a suitable location:

{generated_filters}


Conversion of old templates

If your template does not yet use the {generated_filter} plugin, please perform the following steps:

1. Remove the following section in your template:

<div id="flMainFilters">
   [...]
</div>	
{if $MORE_FILTERS_COUNT > 0}
   [...]
{/if}

2. Insert the following code:

{generated_filters}

This plugin is only available for template version >= HTML 3.1

The {query_info_message} plugin generates a text that tells the user what they searched for and how many results were found.
Including special handling for

  • selecting a category
  • selecting a brand
  • showing Shopping Guide results
  • showing Smart Did You Mean value
Example: Search results for myquery (1234 hits)

Parameters

All parameters are entirely optional,
and used to customize messages for different scenarios, in case the defaults are insufficient.

In all texts, the placeholder %HITS% is available for the total number of results.


cat_searched_text

In case a category is the single selected filter (e.g. via Smart Suggest) and no query is given, this is shown.

  • Available placeholders:
    • %FILTER_NAME% name of the category filter (e.g. Category, Kategorie).
    • %CAT% value of the selected category (e.g. Kitchen, Küche).
    • %HITS% amount of products found (e.g. 38).
  • Default (en):
    Search​ ​results​ ​for​ ​%FILTER_NAME% <strong>%CAT%</strong>​ ​(<strong>%HITS%</strong>​ ​hits)
    • Example output:
  • Default (de):
    Suchergebnisse​ ​für​ ​%FILTER_NAME% <strong>%CAT%</strong>​ ​(<strong>%HITS%</strong>​ ​Treffer)
    • Example output:


vendor_searched_text

In case a brand is the single selected filter (e.g. via Smart Suggest) and query is not given, this is shown.

  • Available placeholders:
    • %FILTER_NAME% name of the vendor filter (e.g. Vendor, Hersteller).
    • %VENDOR% value of the selected vendor (e.g. Nike, Puma).
    • %HITS% amount of products found (e.g. 38).
  • Default (en):
    Search​ ​results​ ​for​ ​%FILTER_NAME% <strong>%VENDOR%</strong>​ ​(<strong>%HITS%</strong>​ ​hits)
    • Example output:
  • Default (de):
    ​ Suchergebnisse​ ​für​ ​%FILTER_NAME% <strong>%VENDOR%</strong>​ ​(<strong>%HITS%</strong>​ ​Treffer)
    • Example output:


shopping_guide_text

In case the results are shown in response to a Shopping Guide session, this is shown.

If a single category or vendor is selected in the Shopping Guide, this still has precedence.
  • Available placeholders:
    • %SHOPPING_GUIDE% name of the shopping guide (e.g. Scarf Guide, Produktberater für T-Shirts).
    • %HITS% amount of products found (e.g. 38).
  • Default (en):
    Search​ ​results​ ​for <strong>%SHOPPING_GUIDE%</strong>​ ​(<strong>%HITS%</strong> hits)
    • Example output:
  • Default (de):
    Suchergebnisse​ ​für <strong>%SHOPPING_GUIDE%</strong>​ ​(<strong>%HITS%</strong> Treffer)
    • Example output:


query_searched_text

In case the results are based on a search term, this is shown. This has the highest precedence. If Smart-Did-You-Mean is used, the effective query is used automatically.

  • Available placeholders:
    • %QUERY% searched search term (e.g. shoes, schuhe).
    • %HITS% amount of products found (e.g. 38).
  • Default (en):
    Search​ ​results​ ​for​ ​<strong>%QUERY%</strong> (<strong>%HITS%</strong>​ ​hits)
    • Example output:
  • Default (de):
    Suchergebnisse​ ​für​ ​<strong>%QUERY%</strong> (<strong>%HITS%</strong>​ ​Treffer)
    • Example output:


default_text

In case none of the scenarios above match, e.g. in case of an empty query with our without multiple selected filters, this is shown.

  • Available placeholders:
    • %HITS% amount of products found (e.g. 38).
  • Default (en):
    Search​ ​results​ ​(<strong>%HITS%</strong>​ ​hits)
    • Example output:
  • Default (en):
    Suchergebnisse​ ​(<strong>%HITS%</strong>​ ​Treffer)
    • Example output:

All values that replace the placeholders are already escaped, so it doesn't have to be done by the user.
Feel free to use simple HTML in override texts for emphasis.

Currently, texts for other languages are not available by default, please use the parameters above to override them with different language equivalents.

Usage

  1. For default use, place the plugin inside of .fl-query-info > span, but it can be used anywhere. because it doesn't rely on specific styles.
  2. Optionally override messages as desired (see Parameters and Examples).

Examples

Here are two simple code examples that shows the usage of this plugin.

Simple

<div class="fl-medium-12 fl-columns fl-query-info">
    {if $TOTAL_RESULTS > 0 }
        <span>
            {query_info_message}
        </span>
    {/if}
</div>

Overriding some texts

<div class="fl-medium-12 fl-columns fl-query-info">
    {if $TOTAL_RESULTS > 0 }
        <span>
            {query_info_message cat_searched_text='%HITS% products match filter %FILTER_NAME% with value %CAT%.' query_searched_text='Found %HITS% results for %QUERY%'}
        </span>
    {/if}
</div>
1) , 2)
White logo on white background.
3)
e.g. vendor, price, color, width
4)
vendor=“brand” displays the “brand” title for selected filters of the “vendor” category; several sequential special signs are replaced by _ (underscore): this_that=“other” shows the title “other” for selected filters of the “this & that” category
5)
For the price filter: 0
6)
sensible for size indications, so that 38 comes before 100