1

Trying to sort products by price.

{% set products = craft.commerce.products({
  type:  'footwear',
  limit: shopSettings.productsPerPage,
  order: 'defaultPrice asc',
}) %} 

It works fine.

Please tell me how to sort products by Sale price?

Thanks.

  • I presume you have you tried just order: salePrice asc? – Jeremy Daalder Aug 3 '17 at 2:17
  • Using "order: salePrice asc" I get an error: CDbException CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'salePrice' in 'order clause'. link – Oleg Aug 3 '17 at 5:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.