I'm trying to create a custom collection template on our Shopify store. Our business, every month, does a promotional update to our existing collections that ends up becoming a laborious chore with the manual collection curation of selecting individual SKUs. On our Wordpress/Woocommerce site, it's all easily handled with a comma separated list of of SKUs and the [products] shortcode.
I am trying to write a for loop with Liquid to loop through an array of SKUs, and display the product tile per SKU. The only thing is, I cannot for the life of me figure out how to target a specific product by product.variant.sku.
How I envision it from a simplistic view:
{% assign product_skus = "1234,5678,9101,1121" | split: ',' %}
{% for product_sku in product_skus %}
{% if product.variant.sku == product_sku %}
{% include "product-tile" %}
{% endif %}
{% endfor %}
I know the above will not work, but I cannot find the proper direction in the documentation (or I'm just not understanding it correctly) to make this sort of thing work. I feel like it should be possible. Any help would be greatly apprecaited!
I think you need to utilize the default input types to create a backend editor settings panel using input type
product_listdocumentation link.and loop them using liquid one front end easily. add code
settings_schema.jsonit appears in the editor like this
Choose products
get the same into using liquid code like this sample
Read more about product object in Shopify here