Developer forum

Forum » Ecommerce - Standard features » Sort productlist by customfield from querystring

Sort productlist by customfield from querystring

Lars Larsen
Reply

Hi,
With version 8.3 it is possible to sort a productlist on customfields in the paragraphsettings of a cart module. That's great. But I want to sort a productlist dynamically by adding the sortfield and sortdirection to the querystring on a productlist page. This works with the standard productfields but I can not make it work on custom product fields! Shouldn't this be possible?


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Lars

 

I'll have a developer look into this. Will get back.

 

Nicolai

 
Dmitriy Benyuk
Reply

Hi Lars,

It should be possible. Are you using the query string for sorting with SortBy and SortOrder parameters like:
"?SortBy=Price&SortOrder=Desc"
where "Price" is the System Name of the custom field?
Do you have a problem with sorting by custom field or calculated field?

Kind regards,
Dmitrij

 
Lars Larsen
Reply

Hi Dmitrij,

Yes I am using the query string for sorting with SortBy and SortOrder parameters. I have a custom product field of type decimal and have set the paragraphsetting "Sort by" to "None" and giving the query string: ?SortBy=PaOpenArea&SortOrder=Desc

"PaOpenArea" is my custom product field. But eCom does not sort the productlist on my custom product field when I give the query string above. But eCom sorts the list correctly if I choose the custom product field "PaOpenArea" in dropdownlist in the paragraphsetting "Sort by"!! I have tried with different custom product fields and of different field types, but with no luck!

 

/Lars

 
Dmitriy Benyuk
Reply
This post has been marked as an answer

Hi Lars,
it looks like a bug in 8.3 version.
Could you try to change the settings of your product catalog module to use "" option and see if it works?
Thanks,
Kind regards,
Dmitrij
 

option.jpg
Votes for this answer: 1
 
Lars Larsen
Reply

Hi Dmitrij,

The setting "Enable optimized product retrieval" was already disabled, so I tried to enable (use) the setting but still no luck!

 

/Lars

 
Dmitriy Benyuk
Reply
This post has been marked as an answer

Hi Lars,
I can't find any other workaround for that, it is a bug.

Could you please submit a case to support and we'll take it from there?

Thank you,
Regards, Dmitrij

Votes for this answer: 1
 
Lars Larsen
Reply

Hi Dimitrij,

Thanks for your help. I will submit a case to support.

 

/Lars

 

You must be logged in to post in the forum