Reading list Switch to dark mode

    Showing more product from same vendor shopify

    Updated 27 April 2018

    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

    Start your headless eCommerce
    Find out More


    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 }}" />
     {% endif %} 
    {% endfor %}
    From above three simple step you can able to show product related to specific vendor on product page.


    . . .

    Leave a Comment

    Your email address will not be published. Required fields are marked*

    Be the first to comment.

    Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home