0

This sorts the items correctly but I am failing to pre-select the option they selected using a conditional.

What am I doing wrong?

<select name="orderby_sort">
    <option value="">Sort by</option>
    <option value="store:price|asc"{if low_search_store:orderby_sort == "store:price|asc"} selected{/if}>Price (low-high)</option>
    <option value="store:price|desc"{if low_search_store:orderby_sort == "store:price|desc"} selected{/if}>Price (high-low)</option>
</select>

1 Answer 1

2

The rule is name="foo" value="bar" => {low_search_foo} // bar.

So try {if low_search_orderby_sort == "store:price|asc"}.

Your Answer

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

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