Showing more product from same vendor shopify

If you want to show product related to vendor on product page then you can show it by adding some simple line of code in your liquid file. please follow step bellow.

STEP 1:

You need to create a smart collection with condition price greater than 0. Means this collection contains all of your store product.

see screen shot bellow

 

STEP 2

Now go to shopify admin panel, open theme and then click on edit code see screen shot bellow

 

STEP -3

Now open  product-template.liquid file appears in section and paste this code

{% assign vendor = product.vendor %}
{% assign product_handle = product.handle %}
handel is {{ product.vendor }}
{% assign counter = '' %}
<div class"grid grid--uniform grid--view-items">
{% for product in collections['all'].all_products %}
 {% if vendor == product.vendor and counter.size < 30 and product_handle != product.handle %}
 {% capture temp %}{{ counter }}*{% endcapture %}
 {% assign counter = temp %}
 <div style="float:left;width:30%;padding:1%;">
 <a href="{{ product.url | within: collection }}" title="{{ product.title }}">
 <img src="{{ product.images.first | product_img_url: 'medium' }}" alt="{{ product.title }}" />
 </a> 
 </div>
 {% endif %} 
{% endfor %}
</div>

From above three simple step you can able to show product related to specific vendor on product page.

 

. . .

Comment

Add Your Comment

Be the first to comment.

css.php