2

This may seem like an easy question, but i have tried a number of things, none which work.

I want to use a custom modifier in Store to show a color, and this code needs to be in a template, but not every item needs the color input, only the entry which needs it.

How would I wrap this in a conditional {if}{/if} so that it only appears when needed?

Many thanks in advance.

input:size="Color"

Green Yellow

2

A conditional based on an entry's ID might look like this:

{exp:store:product}    
    {if entry_id == "XXX"}
            <select name="color">
                <option value="Green">Green</option>
                <option value="Yellow">Yellow</option>
            </select>
        {/if}
{/exp:store:product}

Replace XXX with the entry_id.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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