URL query parameters

URL query parameters consist of key-value pairs that help customize the content. This can be the sorting and type of products displayed on collection pages or articles on blog pages, allowing for more specific requests. Also the language and currency can be modified through query parameters. The queries are added after the URL starting with a questionmark, ?.

https://mydomain.com/book/pippi-langstrump?lang=en

Language and currency

URL query parameters can be used for fetching language and currency variations.

Note that most themes contain language and currency switchers and that the slug /en/ will show content from the translations as well.

Query key Description
lang=<langcode> Language query using the two letter languagecode
currency=currencycode Currency query using the three letter currencycode in caps

Including the language code into a URL query ?lang=en will fetch the content from the language code, in this case English.

Language and currency queries can also be combined, for example lang=sv&currency=SEK will show content in Swedish (if there is any added) and prices in SEK.

Search options

Option Operators Description
tags {“equals”, “contains”, “starts_with”, “ends_with”} product or article tagged with
type {“equals”, “contains”, “starts_with”, “ends_with”} product type
title {“equals”, “contains”, “starts_with”, “ends_with”} product or article title
vendor {“equals”, “contains”, “starts_with”, “ends_with”} product vendor
variant {“equals”, “contains”} product variant
price {“equals”, “greater_than”, “less_than”} product price
compare_at_price {“equals”, “greater_than”, “less_than”} compare at price on product
price-min {“equals”} price_min >=
price-max {“equals”} price_max <=
sale {“equals”} on sale (compare_at_price > price)
onsale same as sale=true

For example /collection/our-versions?type=software&vendor=Cradle&price=>100&tags=cms&sort=price-asc will show products with the product type equal to software that has vendor Cradle and a price over 100 a tag cms with the list shown with price in ascending order.

Price range example

The following query will display products with a price between 4 and 5.

 https://mydomain.com/collection/shirts?price-min=4&price-max=5

Operators

"contains": "%",
"equals": "=",
"not": "!",
"greater_than": ">",
"less_than": "<",
"starts_with": "^",
"ends_with": "$",

For tags

"and" : ",",
"or" : "+"

Example with “and” and “or” for tags

tags=a+b,c+d : “(a OR b) AND (b OR c)”

Sorting options

The sort option will show the list of items (products or article) in a specified order, for example, adding sort=price-asc will order products by price, lowest price first.

https://mydomain.com/collection/shirts/?sort=price-asc
Values Description
alpha-asc Title ascending alphabetically A-Z
alpha-desc Title descending alphabetically A-Z
title-asc Title ascending alphabetically A-Z
title-desc Title descending alphabetically A-Z
price-desc Products displayed in order by price, highest to lowest
price-asc Products displayed in order by price, lowest to highest
created-desc Creation date newest to oldest
created-asc Creation date oldest to newest
published-desc Publish date newest to oldest
published-asc Publish date oldest to newest
updated-desc Update date newest to oldest
updated-asc Update date oldest to newest