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
Parameter | Values | Description | Required |
---|---|---|---|
term | string | The 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
Parameter | Values | Description |
---|---|---|
responce[0] | int | The count of items found |
response[1] | html | The actual items with their markup |
Available Smarty Variables
Usage of variables:
- templates/example.com/quicksearch/index-ajax.tpl.html
Parameter | Values | Description |
---|---|---|
items | Array | Contains all the items found for given result type |
items_count | int | Count 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
Parameter | Values | Description |
---|---|---|
items | Array | Contains all the items which are found from the search |
item.id | int | Identifier of the item |
item.name | string | Name of the item |
item.type | string | Name of the result type |
item.url | string | URL of the item |
item.object | logical | |
item.data | string | Planned for additional fields. Not in use. |
Closest Products
Parameter | Values | Description |
---|---|---|
items | Array | Contains all the items which are found from the search |
item.id | int | Identifier of the item |
item.name | string | Name of the item |
item.type | string | Name of the result type |
item.url | string | URL of the item |
item.object | logical | |
item.data | Array | Product with extended fields. More information here. |
Closest Product Categories
Parameter | Values | Description |
---|---|---|
items | Array | Contains all the items which are found from the search |
item.id | int | Identifier of the item |
item.name | string | Name of the item |
item.type | string | Name of the result type |
item.url | string | URL of the item |
item.object | logical | |
item.data | Array | Planned for additional fields. |
item.data.product_count | int | Number of the products under that category. |
item.data. complete_category_string | string | The 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
Parameter | Values | Description |
---|---|---|
items | Array | Contains all the items which are found from the search |
item.id | int | Identifier of the item |
item.name | string | Name of the item |
item.type | string | Name of the result type |
item.url | string | URL of the item |
item.object | logical | |
item.data | Array | Contains all categories, which match the Popular Search Term |
item.data.id | int | Identifier of the category. |
item.data.category_complete_url | string | Complete URL of the category. |
item.data.category_name | string | Name of the category. |
item.data.category_parent | int | Category parent ID. It will contain "0" if this is only one level. |
Updated over 2 years ago