AbanteCart Community

AbanteCart Development => API Development => Topic started by: Rawinder Dhillon on January 06, 2021, 10:41:24 AM

Title: Sord (for Sorting) not working in API
Post by: Rawinder Dhillon 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 
Title: Re: Sord (for Sorting) not working in API
Post by: abolabo 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
Title: Re: Sord (for Sorting) not working in API
Post by: Rawinder Dhillon on January 19, 2021, 12:47:33 PM
 Thx Bro , Its working this way
Title: Re: Sord (for Sorting) not working in API
Post by: Rawinder Dhillon 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 ?
Title: Re: Sord (for Sorting) not working in API
Post by: abolabo on January 21, 2021, 05:23:42 AM
Can you check this fix? https://github.com/abantecart/abantecart-src/commit/4e36614b5ae2aa4fa2ce09f0e846b9ec10731016