Put images on vendor page with vendor name

cacao123
New Member
2 0 0

Hello Everyone

I am creating my shopify multi-brand store and I wanted to add a page where all the vendors are listed. 
But with the code I used only vendor names appear.
The idea is for the names AND images to be present on the vendor list page. I already created collections for all my vendors where the products appear automatically. I would like for each Vendor collection image to appear on my vendor list page.
Example : https://www.ohmycream.com/pages/marques ( but simpler :') )  

I used this code :

<div class="grid">
 
  <div class="grid-item large--two-thirds push--large--one-sixth">
 
    <h1>{{ page.title }}</h1>
 
    <div class="rte">
          {% assign page_content = page.content %}
          {{ page_content | replace: '[shop_email]', shop.email | replace: '[shop_domain]', shop.domain | replace: '[shop_address]', shop.address.summary | replace: '[shop_name]', shop.name }}
    </div>
 
  </div>
 
</div>
{% assign counter = 0 %}
{% for vendor in shop.vendors %}
{% assign counter = counter | plus: 1 %}
{% endfor %}
 
{% assign counter_divided_by_3 = counter | divided_by: 3 | floor %}
<div class="page-width" style="column-count:4;">
  
  
  {%comment%}
  <div class="content-block">
    <div class="rte rte--indented-images">
      {{ page.content }}
      <div class="grid grid--no-gutters grid-uniform">
          <div class="grid__item small--one-half medium-up--one-fifth">
 
  {%endcomment%}
 
{% for product_vendor in shop.vendors %}
{% assign its_a_match = false %}
{% capture my_collection_handle %} {{ product_vendor | handleize | strip | escape  }} {% endcapture %}
{% assign my_collection_handle_stripped = my_collection_handle | strip | escape %}
 
{% for collection in collections %}
{% if my_collection_handle_stripped == collection.handle %}
{% assign its_a_match = true %}
{% endif %}
{% endfor %}
 
{% if its_a_match %}
<li class="vendor-list-item block-grid"><a async href="/collections/{{ product_vendor | handleize }}">{{ product_vendor }}</a></li>
{% else %}
<li class="vendor-list-item block-grid">{{ product_vendor | link_to_vendor }}</li>
{% endif %}
{% endfor %}
</ul>




I am new to coding so thank you in advance for your help !!!!

Replies 0 (0)