Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Show Table of Contents

Set up product search for affiliate products

affiliate-toolkit supports two types of product searches for your visitors. You can set up a search using a search term directly on an interface or a search using several fields in the local products.

To use the product search, you need the Frontend Search & Filter extension. Without this extension, the following options are not available.

Insert search form

We already provide two search forms for possible forms. These can be used directly or your own forms can be created.

Simple text search

[atkp_searchform template='searchtext' targetpage='123'][/atkp_searchform]

This shortcode outputs a simple text box with a search button on the web page.

The "targetpage" parameter must either be removed (redirect to the same page) or replaced with the ID of the search results page.

This form can be used for an internal product search and also for a product search on the interface.

Advanced product search

[atkp_searchform template='searchform' targetpage='123'][/atkp_searchform]

This shortcode outputs an advanced search form. However, this search form only works for a search within the product database.

The "targetpage" parameter must either be removed (redirect to the same page) or replaced with the ID of the search results page.

How to find the Targetpage ID?

This is the post ID of a page or post.

Insert shortcode for search result

This shortcode is necessary for displaying the products on the landing page of your search.

Important: Product search works only in combination with the shortcode for a search results page. Without it you will not see any products displayed.

This shortcode can be generated using Shortcode Generator. It is important that "Parse parameters" is checked.

You can fill in all fields as you wish when creating the dynamic filter. The search fields from the search form and the predefined filters via the generator will complement each other in the end.

For example, you can create a full-text search using the form and filter the category in the predefined filter. Thus, the visitor ends up seeing results only from a certain category.

[atkp_list filter='productstatus=publish' template='grid_3_columns' parseparams='yes' itemsperpage='25'][/atkp_list]

The above shortcode has "parseparams" active and thus can receive parameters from the search form.

  • filter
    Allows you to set a filter for the output of products by criteria. This filter only allows the output of published products. If you want to output all of them, just pass "publish,draft" as a filter.
  • template
    This template is used to display the search results.
  • parseparams
    This option is necessary for the support of search forms.
  • itemsperpage
    If the search result exceeds a number of products, a paging with 25 entries per page is automatically generated.

A missing "parseparams='yes' is mostly the reason why the filter does not work.

Insert shortcode for search result (on interface)

This shortcode is necessary for a search on the interface. A request is executed directly on the interface and output on your page.

Important: Product search works only in combination with the shortcode for a search results page. Without it you will not see any products displayed.

Search result without store headings

In this case the search is done by AJAX request and you don't get a headline. The search is performed in parallel in all available stores.

[atkp_livelist template='simple_live' livetemplate='secondwide'][/atkp_livelist]

Search result with store headings

This search is identical to the search without a heading, but the store name is also shown here.

[atkp_livelist template='default_live' livetemplate='secondwide'][/atkp_livelist]

Live search parameters

  • template
    Here are the templates "default_live" and "simple_live". The differences to this have already been explained above.
  • livetemplate
    Here you can give the usual templates for products. All system templates and also custom templates are supported.
  • shop_ids
    This allows you to narrow down the search to specific stores. For example, you can only perform one search on Amazon. Multiple stores can be separated via comma (123,456).
  • limit
    This can be used to limit the product search. Some APIs already have a maximum and cannot be increased.

Redirect WordPress Search

You can redirect the WordPress search as you like. There is a suitable setting for this in the settings.

To do this, select the forwarding mode from the list. You can use the following options:

  • No forwarding
    Forward
    ing is disabled.
  • Redirect if no result.
    If no posts are found in WordPress search, redirects to the search results page.
  • Always forward.
    No matter if a result is found in the WP search, it will be forwarded in any case.

Either the shortcode for internal product search or the shortcode for live search must be implemented on the search results page.

Create your own search form templates

If you want to create the search forms in your own style or if you want to use your own custom fields as search field, you should create your own template. Alternatively, you can of course copy an existing template.

The "Search form" type is available only if the "Frontend Search & Filter" extension is installed and activated.

You can also create a template here using HTML & CSS.

Updated: 6. February 2023
Still not using affiliate-toolkit?
Setup takes less than 5 minutes and you can start to import first products!
Learn more about the packagesDownload FREE Version
Still need help?
Submit Your Question
Please give us the details, our support team will get back to you.
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram