How can i change default sort by option on search result

How can i change default sort by option on search result

Aixent
Visitor
2 0 2

I want to change default sort option on search result.

from A to Z to created ascending.

 

my theme is dawn ver 4.0.0

 

here's search.json code

{
"sections": {
"main": {
"type": "main-search",
"settings": {
"columns_desktop": 4,
"image_ratio": "adapt",
"show_secondary_image": false,
"show_vendor": false,
"show_rating": false,
"enable_filtering": true,
"enable_sorting": true,
"collapse_on_larger_devices": false,
"article_show_date": true,
"article_show_author": false,
"columns_mobile": "2",
"padding_top": 36,
"padding_bottom": 36
}
}
},
"order": [
"main"
]
}

Replies 4 (4)

LitCommerce
Astronaut
2860 684 760

Hi @Aixent,

Shopify does not support sorting alphabetically for search results. You can only sort by price, refer: https://shopify.dev/themes/navigation-search/search#query-parameters , go to 'sort_by'

Screenshot.png

If you want to add this you can just install app, refer https://apps.shopify.com/product-filter-search or https://apps.shopify.com/product-filter-and-search

Hope it helps!

LitCommerce - The Most Simple & Affordable Multi-channel Selling Tool.
Effortlessly sell on biggest marketplaces like Amazon, Etsy, eBay, Facebook etc with bulk listing tool, real-time sync & smart order management. Use LitCommerce free for 1-year now!
chad0x001
Explorer
63 3 18

So it's $19 to be able to sort search results alphabetically? Thats absolutely nuts! Its a basic requirement of any site.

pahrumpmike
Tourist
4 0 3

I am amazed that this could happen. 

Zer0786
Shopify Partner
6 0 0

Nearly 3 years later - Shopify's search API is still unacceptable.