Best Practices - Metafields for Product Attributes?

New Member
1 0 0

Hi All,


I have a puzzle I want to use metafields to solve - but before doing so, I thought I'd ask for input on whether this is a good strategy or will just cause us bigger headaches down the road.


Each of our products has different values for the same set of attributes (for example, dimensions like width, height, and length). We'd like to include a list those attributes on product pages so customers can see that information at a glance.


All of this is separated into individual fields in the data we get from our vendors, but we're currently concatenating into a single field in Excel before we upload. For example, the description field in the CSV file I upload would read:



Width: 6.5"<br>
Height: 13"



We have 12 different vendors with different data formats, and this has been super time consuming to set up and maintain. After doing some research, I think I'd like to make each of these attributes a metafield, for example: 


Namespace: "product_attribute" 

Key: "Width"

Value: "6.5"


Then it seems like I could call each of those with Liquid in the product template, something like:


{% unless product.metafields.product_attribute.Width == blank %}
Width: {{ product.metafields.product_attribute.Width }}
{% endunless %}

{% unless product.metafields.product_attribute.Height== blank %} Height: {{ product.metafields.product_attribute.Height}} {% endunless %}


But - we have 4K products currently loaded into our catalog, and we want to upload at least another ~15K-20K more products over the next few months. Many of those products will likely have different values for each metafields since we're talking about dimensions.


Am I going to run into any performance issues or other headaches? Is there anything glaringly obvious that I'm missing?


Any insight would be helpful. Thanks so much!