What's your biggest current challenge? Have your say in Community Polls along the right column.

Product title and price hidden in list view when compare-at-price used

Product title and price hidden in list view when compare-at-price used

missjo13
Tourist
19 0 1

When I include the "compare-at-price" field like this within a product:

Screenshot 2024-11-12 at 9.57.30 PM.png

 

As a result, the product name and price does not appear in the list view. Only the image appears only it's own (which is not clickable), and no other product detail appears.

Screenshot 2024-11-12 at 9.54.58 PM.png

 

It is definitelty the "compare-at-price" field that causes this, because when I remove the "compare-at-price", the product detail appears in the list view:

Screenshot 2024-11-12 at 10.05.43 PM.png

 

Does anyone know how to fix this?  I would like to show the original "compare-at-price".

 

Replies 4 (4)

Asad-Mahmood
Trailblazer
211 37 43

Hi @missjo13 ,
We need to show compare at price by modifying the theme code.

If my solution has been helpful, you can consider supporting me via Buy Me a Coffee.
Hire me: asadmahmood8470@gmail.com
WhatsApp





missjo13
Tourist
19 0 1

It's not shown by default?  What code do you suggest I try?

Asad-Mahmood
Trailblazer
211 37 43

Every theme has unique file structures and naming conventions, making it challenging to pinpoint the exact file to update without reviewing your theme's code. Generally, the file you're looking for might be named something like product-info.liquid. You can search within this file for the section that displays the product price and add the following variable to display the compare-at price: {{ product.compare_at_price | money }}.

If my solution has been helpful, you can consider supporting me via Buy Me a Coffee.
Hire me: asadmahmood8470@gmail.com
WhatsApp





missjo13
Tourist
19 0 1

Hi @Asad-Mahmood , I'm using the Dawn theme.  In what template or section should I find this "compare_at_price"?