Author Topic: Sord (for Sorting) not working in API  (Read 4947 times)

Offline Rawinder Dhillon

  • Newbie
  • *
  • Posts: 24
  • Karma: +5/-0
    • View Profile
Sord (for Sorting) not working in API
« on: January 06, 2021, 10:41:24 AM »
Hi,
while fetching products
im using these two options
first is keyword
2nd is category_id

with rt=a/product/filter

when i search with keyword
sidx=price
sord=DESC or ASC
it is working perfectly
 
but when instead of keyword i use category_id
with same options

then there will no sorting by price.
products are sorted by product id

im i doing something wrong ?
Thx 

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2046
  • Karma: +318/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Sord (for Sorting) not working in API
« Reply #1 on: January 11, 2021, 05:07:41 AM »
try to use
sidx=p.price
instead sidx=price.
We made improvement in current dev version and it will works both way
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline Rawinder Dhillon

  • Newbie
  • *
  • Posts: 24
  • Karma: +5/-0
    • View Profile
Re: Sord (for Sorting) not working in API
« Reply #2 on: January 19, 2021, 12:47:33 PM »
 Thx Bro , Its working this way

Offline Rawinder Dhillon

  • Newbie
  • *
  • Posts: 24
  • Karma: +5/-0
    • View Profile
Re: Sord (for Sorting) not working in API
« Reply #3 on: January 20, 2021, 04:32:26 AM »
A similar problem ith pto & pfrom

while fetching products with keyword pto & pfrom works
means shows products from this range

 
but when instead of keyword i use category_id
with same options

then there will no filtering based on price range .


will you plz check this one ?

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2046
  • Karma: +318/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

 

Powered by SMFPacks Social Login Mod