Just wondering how I can get to order products in Expresso Store by Price (High to Low and Low to High) using a drop down.
I've got sort working by using Dynamic Parameters but can't work out how to do this with Price?
ExpressionEngine® Answers is a question and answer site for administrators, end users, developers and designers for ExpressionEngine® CMS. It only takes a minute to sign up.
Sign up to join this communitySilly me with a little more thought I just need to orderby "price" and then use sort "asc or desc"
Using Mo Variables to select the correct option from my drop down.
<form method="post" action="{path='shop/category/{segment_3}{if current_query_string}?{current_query_string}{/if}'}">
<input type="hidden" name="csrf_token" value="{csrf_token}" />
<select name="sort">
<option {if post:sort == "desc"} selected="selected"{/if} name="sort" value="desc">Descending</option>
<option {if post:sort == "asc"} selected="selected"{/if} name="sort" value="asc">Ascending</option>
</select>
<select name="orderby">
<option {if post:orderby == "price"} selected="selected"{/if} name="orderby" value="price">Price</option>
<option {if post:orderby == "title"} selected="selected"{/if} name="orderby" value="title">Name</option>
</select>
</div>
<div class="small-2 columns">
<input role="button" aria-label="Submit" name="submit" type="submit" class="button postfix submit" value="Go" />
</form>