VTEX has two search options: Legacy Search and Intelligent Search. This article is about Legacy Search. To learn more about the Intelligent Search application, see this track.
When making a search on VTEX, there are different options for URLs. The URLs of departments and categories are formatted as follows:
In the category tree above, the links are the following:
The URL will always contain the term entered in the search field:
The browsing filters also have specific URLs defined by certain parameters in the URL. The parameters are:
- C:[DepartmentId/CategoryId/SubcategoryId]: Shows products of a specific category based on the IDs indicated for the department, category, and subcategory. This code appears next to category names in Products > Catalog > Categories.
The category ID can also be found on your edit page at the end of the URL.
- B:[BrandId]: Shows products from a specific brand based on the indicated ID. This code is shown at the end of the URL, on the page used for changing the brand, inProducts>Catalog>Brands.
- H:[CollectionId]: Shows products of a specific collection based on the indicated ID. This code is indicated when editing a collection inStore setup > CMS > Layout > CMS > Product Clusters (Collections).
There are two ways to configure collections: through the CMS or the Collections module (Beta). This article explains how to configure collections through the CMS.
- spec_fct_[ProductFieldId/Sku]:[SearchValue]: Shows products whose product or SKU field value, with the indicated ID, is equal to the entered value. This code can be found on the page for changing a product/SKU field at the end of the URL.
Below is an example of how to use this field:
In the example above, all products whose Voltage(ID 1) field is 110v would be displayed.
- ft=[SearchTerm]: This parameter represents a full-text search (for example, searching a specific term in the search field) of the specified term based on the other indicated parameters.
The parameters above can be matched in many ways. However, note that the search order will follow the order of the indicated parameters. In other words, when you use a category parameter followed by a brand parameter, the category will be searched first. Then, a second search will be made for the brand among the category results.
For stores hosted in VTEX IO, Default 2 should be used as default.
/[CategoryName]?map=c: Displays products whose category is specified by the name indicated in the URL.
/[BrandName]?map=b: Displays products whose brand is specified by the name indicated in the URL.
/[CollectionId]?map=productClusterIds: Displays products whose collection is specified by the ID indicated in the URL.
[SearchValue]?map=specificationFilter_[ProductFieldId/Sku]: Displays products whose product/SKU field value, with the indicated ID, is equal to the entered value.
The parameters above can also be matched among them. The order of the values indicated in the
map parameter will define the interpretation of each value present at the beginning of the URL (between
For best performance results in your store, we recommend using Default 2.