Solved

Insert 'Add to cart' Button on Search Results

JourneysMade
Visitor
2 0 1

Hi, I want to add the 'Add to cart' button on my search results page but I can't seem to find a way of doing it. I'm using the Dawn theme. 

 

It shows on the collection pages but not on the search results page. 

 

JourneysMade_0-1666866637032.png

 

JourneysMade_1-1666866683552.png

 

 

Accepted Solution (1)

Litos
Globetrotter
688 169 143

This is an accepted solution.

Hi @JourneysMade,

Please go to main-search.liquid file and follow these steps:

- Step 1: Please add code here:

Screenshot.png

Code:

<link rel="stylesheet" href="{{ 'quick-add.css' | asset_url }}" media="print" onload="this.media='all'">
<script src="{{ 'quick-add.js' | asset_url }}" defer="defer"></script>
<script src="{{ 'product-form.js' | asset_url }}" defer="defer"></script>

- Step 2: Please add code here:

Screenshot.png

Code:

show_quick_add: true,

Hope it helps!

Litos - Shopify Development Service Provider
Need to develop or customize your Shopify store, feel free to contact us here.

View solution in original post

Replies 3 (3)

Litos
Globetrotter
688 169 143

This is an accepted solution.

Hi @JourneysMade,

Please go to main-search.liquid file and follow these steps:

- Step 1: Please add code here:

Screenshot.png

Code:

<link rel="stylesheet" href="{{ 'quick-add.css' | asset_url }}" media="print" onload="this.media='all'">
<script src="{{ 'quick-add.js' | asset_url }}" defer="defer"></script>
<script src="{{ 'product-form.js' | asset_url }}" defer="defer"></script>

- Step 2: Please add code here:

Screenshot.png

Code:

show_quick_add: true,

Hope it helps!

Litos - Shopify Development Service Provider
Need to develop or customize your Shopify store, feel free to contact us here.
JourneysMade
Visitor
2 0 1

Thank you so much, this worked and is exactly what I was looking for. 

Victor-Joey
Visitor
1 0 0

I tried this but didn't work for me. I am using the spotlight Theme