Ajax Quick Search

This guide describes what can be accessed by way of Aurora's Search and how.

By using this guide, you should be able to make use of Aurora's Search methods.

Index

Overview

Permission Required: None

Method Call: /ajax/Ajax_Frontend_QuickSearch/search/

Aurora Demo Example URL: https://demo.auroracommerce.com/ 

Aurora Demo Example JavaScript:

  • templates/example.com/_js/quicksearch.js

 Related Aurora Demo Templates:

  • templates/example.com/quicksearch/index-ajax.tpl.html
  • templates/example.com/quicksearch/_includes/item.tpl.html
  • templates/example.com/quicksearch/_includes/item-content-news.tpl.html
  • templates/example.com/quicksearch/_includes/item-content-page.tpl.html
  • templates/example.com/quicksearch/_includes/item-popular-search-term.tpl.html
  • templates/example.com/quicksearch/_includes/item-product.tpl.html
  • templates/example.com/quicksearch/_includes/item-product-category.tpl.html
  • templates/example.com/quicksearch/_includes/item-unknown.tpl.html

Method Description

Request Parameters

ParameterValuesDescriptionRequired
termstringThe search term which will be used for searching through the result blocks.

If term is not provided, results will be from the Popular Searches type.
No

Response Variables

ParameterValuesDescription
responce[0]intThe count of items found
response[1]htmlThe actual items with their markup

Available Smarty Variables

Usage of variables

  • templates/example.com/quicksearch/index-ajax.tpl.html
ParameterValuesDescription
itemsArrayContains all the items found for given result type
items_countintCount of all returned items
Result types

All result types can be enabled via the aurora back-end. To enable the desired type result, or to reorder them, you need to visit Merchandising > Search Settings > Quick Search > Result Block.

Closest Content/Blog Pages
ParameterValuesDescription
itemsArrayContains all the items which are found from the search
item.idintIdentifier of the item
item.namestringName of the item
item.typestringName of the result type
item.urlstringURL of the item
item.objectlogical
item.datastringPlanned for additional fields. Not in use.
Closest Products
ParameterValuesDescription
itemsArrayContains all the items which are found from the search
item.idintIdentifier of the item
item.namestringName of the item
item.typestringName of the result type
item.urlstringURL of the item
item.objectlogical
item.dataArrayProduct with extended fields. More information here.
Closest Product Categories
ParameterValuesDescription
itemsArrayContains all the items which are found from the search
item.idintIdentifier of the item
item.namestringName of the item
item.typestringName of the result type
item.urlstringURL of the item
item.objectlogical
item.dataArrayPlanned for additional fields.
item.data.product_countintNumber of the products under that category.
item.data. complete_category_stringstringThe complete path of the category and its parent categories, returned in the form of the names of all said categories, separated by the pipe character |.
Closest Popular Search Terms
ParameterValuesDescription
itemsArrayContains all the items which are found from the search
item.idintIdentifier of the item
item.namestringName of the item
item.typestringName of the result type
item.urlstringURL of the item
item.objectlogical
item.dataArrayContains all categories, which match the Popular Search Term
item.data.idintIdentifier of the category.
item.data.category_complete_urlstringComplete URL of the category.
item.data.category_namestringName of the category.
item.data.category_parentintCategory parent ID. It will contain "0" if this is only one level.