Product image not showing under collection in menu

Hi, I’m a newbie on Shopify.

Under this route /admin/menu, I’ve created a new menu, and inside of this menu is a list of collections. All of them inside this menu is a collection except for the Gift-Test which is a product. I wanted the customer to click directly on the Gift-test as a product and not as a collection. It works fine but the problem is, the image is not showing. The Product Gift-test has an image already. I’m not sure how to do this.

I’ve tried checking on the sections/collection.liquid but I don’t think there is a problem with the codes. Does anyone try this concept? Any help is appreciated.

Thanks in advance!

Hi @your_song ,

Since it is a problem related with liquid code, so can you please share the access for checking the theme liquid code.

Thanks

{%- if section.settings.show_collection_nav -%}> {% if section.settings.collection_custom_nav_list != blank %}> {% assign custom_nav_list = section.settings.collection_custom_nav_list | handleize %}>
{% for link in linklists[custom_nav_list].links %}> - > {{ link.title }}> > {% endfor %}>
{% elsif collections.size > 1 %}> > {% for collection_link in collections %}> {% if collection_link.handle != ‘frontpage’ and collection_link.handle != ‘all’ %}> - > {{ collection_link.title }}> > {% endif %}> {% endfor %}>
{% endif %}> {% endif %}

Hello @Anonymous

Based on the inspect element, that should be it.

As per the shared code there is no img tag which is responsible for showing the image within nav.

DUPLICATE response

dduk.gif

Sorry for the late reply.

UPDATE:

I’m updating my response since we’ve got a little bit of progress.

{% if section.settings.collection_custom_nav_list != blank %}> {% assign custom_nav_list = section.settings.collection_custom_nav_list | handleize %}> > > {% for link in linklists[custom_nav_list].links %}> - > > {{ link.object.image | img_url: ‘330x’ | img_tag }}> ### {{ link.title }}> > > {% endfor %}>
{% elsif collections.size > 1 %}

This is the original code that has an img_tag filter. I wanted to dump the link or linklists[custom_nav_list].links but I don’t think it’s working. It’s returning json not allowed for this object. So I’m kinda confused about how should I do this.

My plan is to dump either of these variables to check if the object is either a collection or a product so that if the object is a product, then I have to retrieve the product image but I’m not sure how to do that too but google might help.