Products sortby="f:fieldname" not working

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
americanlotus

Products sortby="f:fieldname" not working

Post by americanlotus »

I can't seem to get the summary list from the Products module to sort based on a custom field I created. Basically, it's a list of horses that are going up for auction, and we want to sort the list by lot number. I placed the following code in the {content} block on my page:

Code: Select all

{Products sortby="f:LotNumber"}
However, the list only sorts based on the default setting in the Products module itself. I get no errors; all the items display as they should... just not sorted the way I want them to.

Any suggestions are greatly appreciated. Thanks!

CMSMS 1.11.9
Products 2.20.1
CGEcommerceBase 1.4.3
CGExtensions 1.38.1
CGSimpleSmarty 1.7.1
User avatar
thomahawk
Power Poster
Power Poster
Posts: 312
Joined: Fri Jul 25, 2008 10:13 am

Re: Products sortby="f:fieldname" not working

Post by thomahawk »

Hi
Did you get this solved?

I also have that problem. I have all the recent versions of CMSMS and plugins installed.

I tried
{Products sortby="f:sku" sortorder="desc"}

but it always only shows products listed in the order of ID.

Thom
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Contact:

Re: Products sortby="f:fieldname" not working

Post by paulbaker »

@americanlotus, this rang a bell with me, I had trouble with this initially. I think it's to do with CaSe of the field. I have just checked one of my Products installs which sorts perfectly and the sortby field is all lower case. Try that?

@thomahawk, I believe sku is a standard field so you don't need the "f:" bit - that is only required for custom fields.
User avatar
thomahawk
Power Poster
Power Poster
Posts: 312
Joined: Fri Jul 25, 2008 10:13 am

Re: Products sortby="f:fieldname" not working

Post by thomahawk »

Thanks, Paul

Yes I thought so, but I tried {Products sortby="sku" sortorder="desc"} and it did not make any difference. I could not find a solution to this, so I changed all 25 items product ID (in MySQL) into the right order and I let frontend product list sort by ID now.
Locked

Return to “Modules/Add-Ons”