Search Drawer
Elevate Navigation: Customize the Search Drawer in your shopify theme
To customize the Search Drawer and Search Recommendations for your Shopify theme, you can adjust the following settings to optimize how your search results and product recommendations appear. Here's a breakdown of the options you provided:
Color scheme
Purpose: Adjust the color scheme for the search drawer to ensure it matches your store’s branding and visual identity.
How to enable
In the Theme Customizer, locate the Colors or Theme Settings section.
Under Search Drawer Colors, choose Scheme 6 or any other color scheme that fits your design.
This will update the color of the search input field, background, text, and any other elements within the search drawer to match your store's branding.
Search popular searches
Purpose: Display popular search terms to help customers find products more easily.
How to enable
In the Search Drawer settings, you may have an option to display popular search terms or recent searches.
Add keywords such as:
Tenacity
Tenacity Heat
Amplify Shorts
Flex Short
These can be pre-defined in the search settings or linked to your store’s most searched products.
You can also enable the feature to display search terms dynamically based on your customers' browsing behavior.
Search recommendations products
Purpose: Show recommended products based on the user’s search query.
How to enable
In the Search Drawer or Search Results settings, enable Search Recommendations Products.
This feature dynamically shows products related to the search query. For example, if someone searches for mens shorts, the drawer can show products like mens shorts or other related categories like Flex Shorts or Amplify Shorts.
You can also configure the number of products to display, ensuring it offers a helpful set of recommendations.
Center gap
Purpose: Adjust the space between search recommendation products in the drawer.
How to enable
In the Theme Customizer under the Search Drawer or Product Grid settings, find the Center Gap setting.
Set the gap to your desired value (for example, 10px), ensuring the products are spaced evenly within the drawer.
Products to show
Purpose: Define how many products will be shown in the search drawer recommendations.
How to enable
In the Search Drawer settings, look for an option to control the number of products shown.
Set Products to Show to 12 or your preferred number, ensuring enough options are visible without overwhelming the customer.
Desktop columns
Purpose: Customize the layout of the search results on the desktop.
How to enable
In the Search Drawer settings, locate the Desktop Columns setting.
Set it to 4 to display four columns of recommended products, ensuring a clean and organized layout on larger screens.
Tab columns
Purpose: Customize how many columns appear in a tabbed layout, useful if you have different product categories or filters.
How to enable
In the Search Drawer settings, find the Tab Columns option.
Set this to 2 to display two columns under each tab, ensuring the search results and recommendations are easy to navigate.
Mobile columns
Purpose: Adjust the layout of the search results on mobile devices.
How to enable
In the Search Drawer settings, locate the Mobile Columns setting.
Set it to 2 to display search results in two columns on mobile, ensuring the content remains legible and easy to browse.
Additional customization via liquid and javaScript
If you want to further customize how the search drawer operates or how search recommendations are generated, you can edit the theme’s Liquid and JavaScript code:
Search drawer liquid template
Go to Online Store > Themes > Actions > Edit Code.
Locate the search-drawer.liquid or similar file.
Customize the HTML, CSS, or JavaScript to adjust the layout, behavior, or filtering of the search results.
Search recommendation logic
Shopify's search uses the Search API to fetch product data. You can further enhance recommendations by integrating with apps or using a custom API.
If using dynamic recommendations based on search terms, you can customize the results by writing JavaScript that fetches related products.
Last updated