SearchJetEngine

Advanced Features & Customization

Using the Liquid Drop

SearchJet provides a Liquid drop object (searchjet) for advanced theme developers to have full control over the integration.

Example: Accessing Search Data in a Template (e.g.,Ā search.liquid)

liquid

{% if searchjet.performed %}
  

Search Results for "{{ searchjet.terms | escape }}"

Found {{ searchjet.results_count }} results.

{% for product in searchjet.results %} {% endfor %} {% if searchjet.pagination.pages > 1 %} {% endif %} {% endif %}

Key Liquid Objects:

  • searchjet.performed: ReturnsĀ trueĀ if a search was performed.
  • searchjet.terms: The user’s search query.
  • searchjet.results: The array of product results.
  • searchjet.results_count: The total number of results.
  • searchjet.pagination: Handles pagination links.

Theme Integration (Manual)

If the automatic injection doesn’t work perfectly with your theme, you can manually replace your theme’s search form.

  1. Locate your theme’s search form.Ā This is typically in a file likeĀ sections/header.liquidĀ orĀ layout/theme.liquid.
  2. Replace the existing form.Ā Find theĀ 
    Ā tag withĀ action="/search"Ā and replace it with the form structure provided in the SearchJet documentation or admin panel, which typically points to the SearchJet-handled search route.

Example Manual Search Form:

html


  
  

(Note: The exactĀ actionĀ URL may vary; refer to the app’s instructions).