Problem with: Liquid error - Could not find asset snippets/icon-cart-empty

Solved

Problem with: Liquid error - Could not find asset snippets/icon-cart-empty

Lucas00000
New Member
5 0 0

When I downloaded App name PageFly. (I think it have some connect with it because when i uninstall it, some of assets are still here.) I wanted to hide cart icon so I started to deleting some of assets. It's telling me there's a problem. I found where is the problem in website but I cannot find it in code in Shopify. When I deleted it in Google explorer, it was ok. 

This showing me up right now on my website:

Liquid error (sections/header line 725): Could not find asset snippets/icon-cart-empty.liquid

 Snímka obrazovky 2023-05-20 162452.png

 

Anyone help please ? I will be so grateful!

Accepted Solution (1)

NomtechSolution
Astronaut
1245 113 160

This is an accepted solution.

The error message you're encountering indicates that there is a problem with the header section in your Shopify theme's Liquid code. Specifically, it mentions an issue on line 725 related to the asset snippet icon-cart-empty.liquid.

To address this issue, you can follow these steps:

  1. From your Shopify admin, go to Online Store > Themes.

  2. Find the theme you're currently using and click on the "Actions" button.

  3. Select "Edit code" from the dropdown menu to access the theme's code editor.

  4. In the code editor, navigate to the sections directory and locate the header.liquid file.

  5. Open the header.liquid file and go to line 725 to find the problematic code related to the icon-cart-empty asset snippet.

  6. Either remove or modify the code causing the issue. If you want to hide the cart icon, you can comment out the code by adding {% comment %} at the beginning and {% endcomment %} at the end of the code block. For example:

 

{% comment %}
{% include 'icon-cart-empty' %}
{% endcomment %}

 

View solution in original post

Replies 5 (5)

Akibhusen
Shopify Partner
715 121 149

Hi @Lucas00000 ,

 

I can help you with this. But for that, I need to check your theme code to solve this error.

Lucas00000
New Member
5 0 0

How can I give you access ? Do you mean that I need to give you access on my Shopify Store to edit theme code ?

 Or do you need some of screenshots for it ?

NomtechSolution
Astronaut
1245 113 160

This is an accepted solution.

The error message you're encountering indicates that there is a problem with the header section in your Shopify theme's Liquid code. Specifically, it mentions an issue on line 725 related to the asset snippet icon-cart-empty.liquid.

To address this issue, you can follow these steps:

  1. From your Shopify admin, go to Online Store > Themes.

  2. Find the theme you're currently using and click on the "Actions" button.

  3. Select "Edit code" from the dropdown menu to access the theme's code editor.

  4. In the code editor, navigate to the sections directory and locate the header.liquid file.

  5. Open the header.liquid file and go to line 725 to find the problematic code related to the icon-cart-empty asset snippet.

  6. Either remove or modify the code causing the issue. If you want to hide the cart icon, you can comment out the code by adding {% comment %} at the beginning and {% endcomment %} at the end of the code block. For example:

 

{% comment %}
{% include 'icon-cart-empty' %}
{% endcomment %}

 

Lucas00000
New Member
5 0 0

Hi, its such a helpful tip but where I need to paste this code ? 

Julianabraz
Visitor
1 0 0

"Thank you so much for providing the correct solution with clear step-by-step guidance! Your detailed explanation made everything easy to understand, and I truly appreciate your help."