Solved

shop.vendors not pulling all vendors from inventory

tdeering
Tourist
4 1 0

Hello Shopify community ! This will be my first post 🙂 Hope someone can help me out here.

Im trying to setup a page where I can render a list of vendors. Pretty simple.

I used this code below:

 

<ul>
    {% for vendor in shop.vendors %}
      <li>{{ vendor }}</li>
    {% endfor %}
</ul>

 

This only renders one of my vendors which is actually a placeholder as we update more. Ive added multiple vendors to different products and it still only pulls the one vendor. I think this may be an issue with the way im setting vendors up and not the code itself?

Thanks for any help 🙂

Accepted Solution (1)
tdeering
Tourist
4 1 0

This is an accepted solution.

Figured it out after reuploading, the majority of my inventory was labeled unavailable, once I switched them all on my vendors started showing up. Thanks for the help! appreciate it 🙂

View solution in original post

Replies 7 (7)

drakedev
Shopify Partner
685 148 230

At the a first sight the code seems correct.

Are you sure that the code is ok and that there are not liquid errors?

Try this

Vendors: {{ shop.vendors.size }}

 

If my answer was helpful click Like to say thanks
If the problem is solved remember to click Accept Solution
Shopify/Shopify Plus custom development: You can hire me for simple and/or complex tasks.
tdeering
Tourist
4 1 0

thanks for your response!

Tried that and it definitely is only showing 1 vendor in my vendor's object. I'm really stumped as to where all my other ones are.

drakedev
Shopify Partner
685 148 230

That's so strange. Did you assign vendors to products?

If yes, try to create a collection called All with all products inside and test this code

 

{% assign all = collections['all'] %}

<h2>Total Vendors: {{ all.all_vendors.size }}</h2>

{% for v in all.all_vendors %}
<div style="margin-bottom: 5px;">
	{{ v }}
	(<a href="{{ frontend }}/collections/vendors?q={{ v | url_param_escape }}" target="_blank">View</a>
</div>
{% endfor %}
If my answer was helpful click Like to say thanks
If the problem is solved remember to click Accept Solution
Shopify/Shopify Plus custom development: You can hire me for simple and/or complex tasks.
tdeering
Tourist
4 1 0

Yeah I am almost certain they are assigned correctly. Still no luck, been at for a while now. I might export inventory and reupload 

 Screen Shot 2020-10-01 at 4.40.49 PM.png

tdeering
Tourist
4 1 0

This is an accepted solution.

Figured it out after reuploading, the majority of my inventory was labeled unavailable, once I switched them all on my vendors started showing up. Thanks for the help! appreciate it 🙂

drakedev
Shopify Partner
685 148 230

Ah ok great! 😛

If my answer was helpful click Like to say thanks
If the problem is solved remember to click Accept Solution
Shopify/Shopify Plus custom development: You can hire me for simple and/or complex tasks.
drakedev
Shopify Partner
685 148 230

Sorry, but I have no idea what could be the problem there.

If my answer was helpful click Like to say thanks
If the problem is solved remember to click Accept Solution
Shopify/Shopify Plus custom development: You can hire me for simple and/or complex tasks.