I'm creating a product feed using XML + Liquid and I'm trying to send color and size info in the format shown below:
Ex. <color>
Blue</color>
<size>
M</size>
The liquid code below successfully retrieves and outputs the option name but it displays all of its values instead of the current variant one.
Here is my current code for review:
{% for variant in product.variants %}
{% for product_option in product.options_with_values %}
<{{ product_option.name }}>{% for value in product_option.values %}{{ value }}{% endfor %}</{{ product_option.name }}>
{% endfor %}
{% endfor %}
Here is an example of the output I am getting
Screenshot of the feed as it outputs the values
Any feedback would be greatly appreciated!