Shopify Sort cart.items array using Liquid script
问题 I want to sort the cart.items array in the cart.liquid file. And then I can display the times in the table in my expected order. {% for item in cart.items sort_by:item.line_price %} <div class="row"> <div class="span12"> <h1>Your cart</h1> <form action="/cart" method="post" id="cartform"> <table> </table> </form> </div> </div> {% endfor %} But the code doesn't work since I can't use sort_by:item.line_price in for statement. How can I sort an array using built-in features? The other problem is