VirtoCommerce / vc-storefront

Virto Commerce Storefront - ASP.NET Core 8.0
http://virtocommerce.com
Other
210 stars 211 forks source link

Two sort filters in StoreFront #283

Closed adminoren closed 4 years ago

adminoren commented 5 years ago

There are two sort filters in StoreFront.LiquidThemeEngine StandartFilters: public static IEnumerable Sort(object input, string property = null) ArrayFilters: /// Sorts the elements of an array by a given attribute of an element in the array. /// {% assign sorted = pages | sort:"date:desc;name" %} public static object Sort(object input, string sort)

When we use sort filter in theme, scriban engine takes the implementation from StandartFilters, which doesn't support sort direction and multiple sort fields. How can I use the version from ArrayFilters and do we really need two filters?

tatarincev commented 4 years ago

Seems this issue has been solved by this commit https://github.com/VirtoCommerce/vc-storefront-core/commit/e6af93bde0e45523870318ffdb1ff62e9198a365