Join Free
+ Reply to Thread
Results 1 to 5 of 5
  1. #1

    'sortBy' => 'price_sale asc'

    This 'sortBy' => 'price_sale asc'
    should work in conjunction with a regular product call, with a query right?

    when i do price it works fine, the sale price is getting me

  2. #2
    I think we found the issue. Often times a sale price isn't provided, so that ends up returning a NULL value. When you filter DESC, this isn't a problem, but going the other direction and filtering ASC ends up giving you all of the null values first. We will take care of that by replacing the nulls with another value when we run into them. We should have a fix shortly.

    (edit: we found a better solution. Brandon will detail it in the next post)

  3. #3
    So since null values are ending up at the top of you list thus distracting from the lower sale prices. All you will need to do is pass in

    'filterPriceSale' => '0.01,'

    This will filter the price sale values starting at the lowest possible value and ascending from there. Thus eliminating the null values.

    You can change the range too if you'd like.

    This works well for any sorts that have a special value that may have a null value.

    For string filters you can pass in '!null' for example 'filterCity' => '!null', sortBy => 'city asc'

    Other floats/integer filters such as filterPriceSale you can use the ranges '0.01,' and '0,'

  4. #4

  5. #5
    OK, what about a sort not a filter. I want the sale items to show first. So i wanted to 'sortBy' => 'price_sale asc' then show regular priced items after that

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
coupons | coupons and deals