Skip to product information
1 of 1
Published:2024.09.18

Example of how to switch between "partial match" and "exact match" in Shopify's search form

Example of how to switch between "partial match" and "exact match" in Shopify's search form

Applications

  • Store search management and editing

How to implement

  • HTML/CSS
  • Javascript
View full details

Just like Google, Shopify's site search allows you to search for an exact match by enclosing your search term in double quotation marks ("). This is an example of how to set up the header search modal for the theme "Rise/Dawn" to search for partial or exact matches (assuming the search suggestions function is turned off).


Example of setting to implement "Partial Match"/"Exact Match" switching in the search form


[(For the Riae/Dawn theme) How to set it up] Add a customized Liquid section to the header section group and insert the code.


Explanation of behavior patterns after a search is performed: The search term is carried over to the search results screen, so you can switch from partial match to exact match with one tap. When specifying "exact match," even if you delete the search term and search with a different term, it will automatically be set to exact match.


After making a purchase (all items are ¥0), you will be able to view the sample code.

If you have already made a purchase, please login here.

Sample Codes

Test Theme :Dawn/Rise 15.2.0

Add a customized Liquid section to the header section group and insert the code.

Related Post