EComposer blank friday campain

Show Product list from Metafield in EComposer

Author: Jade Abit 994 views

This Metafiled type allows you to create different product list to different products, display additional information about products in Shopify. You don’t have to build many many product templates in the Ecomposer app or in your Theme, then assign each template to every single products. That would be waste of time

With just one template and one metafileds, the Product list turns into be dynamic and customizable.

Note: Product list is a list of clickable product links, it can not show Product Images here

1. Generate the Metafield definitions

  1. From Shopify Dashboard > Settings > Custom Data
  2. Then choose Products type

Click to Add definition button -> Fill out the information such as Name, Namespace and Key

click Select Type button -> Product

Choose List products -> Don’t forget to enable the Storefronts checkbox -> Save

Copy the Metafiled code here

2. Adding values to metafields to every single product page

  1. Go to Shopify Admin > Products > All Products > Select a certain product that you want to display on the metafields content.
  2. Scroll down to the bottom to see the Metafields option

Find the correct Metafield name that you’re just created in Setting -> Select some products to have a list

3. How to showcase variant metafield on the Product page?

Please copy and use the SAMPLE CODE below:

{%for product in product.metafields.custom.NAMESPACE.KEY.value %} 
<a  YOUR STORE DOMAIN/collections/{{product.handle}}" target="_blank">{{product.title}}</a><br>
{% endfor %}

Note: You can get the NAMESPACE.KEY value from Variant metafield which is set here

We need to customize a bit of code.

For example, in this instruction the true code is:
{%for product in product.metafields.custom.product_list.value %} <a href=”https://ecomposer.com/collections/{{product.handle}}” target=”_blank”>{{product.title}}</a><br> {% endfor %}

Use Metafield element to paste the Metafield code:

Result:

2 Comments

  • Matt

    February 1, 2024

    Hello,
    I’d like to had the product image on the top of the link in the product list, i use {{product.title}} for the title, do you have a code for product image please ? Like {{product.image}} or somethnig :)
    My goal is to display the list of products of a specific collection to be able to click on other product of this collection with clickable thumbnail and clickable link as is the case.
    Thank you in advance, your plugin is great :)

    Reply
    • Anna Nguyen

      February 17, 2024

      Hi Matt,
      I’m so sorry for my late reply. May I know you are working on which page type? It is a product, collection or a landing page?

      Reply

Leave a Comment

Enjoy a free 3-day trial. Then get your first month for $1. Try Now.