Hello, I’m having a problem ordering products by price. It is in a custom text field ‘best_price’ (or ‘field_id_10’) but when I use the orderby parameter it does indeed change the ordering but not correctly.. e.g. the prices would be 125, 149, 99, etc. Here is my code (Note, I’ve tried orderby=”field_id_10” as well):
{exp:channel:entries channel="products" search:category="shirts" orderby="best_price" sort="asc" dynamic="off"}
{best_price}
{/exp:channel:entries}-EE version: 2.1.3
Just had a similar question a few days ago actually! What you need to do is change the field content to a ‘number’, (or decimal/integer), so EE knows to sort it numerically. Its down the bottom under ‘field content’ when you go to add/edit a custom field 😊 Also set formatting to ‘none’
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.