0

I'm not sure if this is a problem with Matrix or Store.

With the following code:

{modifiers}
{if modifier_name=="Linen"}
{modifier_options}
<input type="radio" name="{modifier_input_name}" id="{modifier_input_name}-{option_id}" value="{option_id}">
<label for="{modifier_input_name}-{option_id}" class="swatch-label">
  {product_fabric_swatches search:product_type="=Linen" search:product_swatch_name="={option_name}"}
  <img src="{exp:ce_img:single src='{product_swatch}'">
  {/product_fabric_swatches}
</label>
{/modifier_options}
{/if}
{modifiers}

I get this output:

<label for="modifiers_13-61"> "}
    <img src="…/1-0003-0001_60_60.jpg" data-src="…/1-0003-0001_800_533.jpg">

You can see it outputs the label and associated image but it's not filtering on the {option_name} and there's a stray "} after the label which appears to be the closing of the Matrix tag.

If I replace {option_name} with one of the values entered into Matrix, then I get the output I expect, but obviously only for a single row.

1 Answer 1

0

Managed to solve this with an embedded template.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.