Developer forum

Forum » Ecommerce - Standard features » Sort products as in eCom groups

Sort products as in eCom groups

Aki Ruuskanen
Aki Ruuskanen
Reply

Hi,

I know this has been discussed in various posts before. But for some reason the frontend does not want to sort the products as they are placed in the eCom groups. 

I have done this:

1. I have set the navigation provider to eCommerce on the page where the Product Catalog is placed. 

2. The sort order on the product catalog is set to "Sort (primary key)". 

3. The "Use group sort in grop context" is set on the product catalog 

4. I have set the Primary Groups for to the eCom group for the products in this group : http://industrilas.stage.mindflower.se/en-us/products/hinges/butt-hinges

5. I have done a full index update.

6. There are no subscribers that affects the sort order. 

The sort order in the eCom groop

The sort order in the group in the frontend

http://industrilas.stage.mindflower.se/en-us/products/hinges/butt-hinges

I cannot see what more could be done? Am I missing 

Regards / Aki

 

 


Replies

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Aki,
Please check the sorting on your Query.

It is possible you have sorted by Score by default.

Adrian

 
Aki Ruuskanen
Aki Ruuskanen
Reply

Hi Adrian, 

Thanks for you inpit. The sort on the query was set to sort by Score. Shouldn't the sort on the product catalog override that?

Anyway, I tried to set it to "Sort (primary group)". No change. I removed it completely, no change.  

Regards / Aki

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

You might want to remove this setting on the paragraph:

The sort by group sort overrides the sorting specified in the query - unless the search it self has sorting specified - i.e. if the user (or here the paragraph) overrides the sort order.

 
Aki Ruuskanen
Aki Ruuskanen
Reply

So what could be the problem? Here is the settings for the app. 

Feel free to take a look. Its a staging environment. 

http://industrilas.stage.mindflower.se/Admin/

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

I did look at your settings - that is where the dump came from.

You have to remove the custom sort in "Sort by" as it takes over the "Use group sortin group context"

You also have to check if the Group sort fields are in the index - there is a setting to disable group sortings to be indexed.

 
Aki Ruuskanen
Aki Ruuskanen
Reply

Looks lite something had happend to that specific group. When I did a reorder of the products in that group and indexed the sort order changed to the right one.

/Aki

 
Aki Ruuskanen
Aki Ruuskanen
Reply

But still, when I'm trying to fix the problem on the live site the sorting seems random. 

All the settings are set as discussed above. The field for sorting is in the index. "SkipGroupSorting" is set to false. There is a group context.  

Frontend:

https://industrilas.com/en-us/products?GroupID=GROUP584

Backend:

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

How are the products coming in? Integration?

They need a sort value in the groupproduct relation table.

 
Aki Ruuskanen
Aki Ruuskanen
Reply

This solution does not have any integration so they are created in the PIM and published to eCom. 

The sortorder for the "New Products" group looks good: 

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply
This post has been marked as an answer

Hi Aki,

Did you solve this?

The sorting looks fine to me on the products page you have linked to with GroupID=GROUP584.
Maybe I'm just blind :)
If you are still having problems related to this then please provide an example of two products which are listed in an unexpected order (after full index build).

/Morten

Votes for this answer: 1
 
Aki Ruuskanen
Aki Ruuskanen
Reply

Hi Morten,

Unfortunately not yet. 

For example the first product is not the same in frontend as backend. 

 

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply
This post has been marked as an answer

That has nothing to do with the sort order.

The frontend doesn't render all of the products, because some of the products are excluded by the index query.
You have several products in that group (GROUP584) which has values in the "AllowedUsergroups" custom field and those values are used in the query to exclude these products.

/Morten

Votes for this answer: 1
 
Aki Ruuskanen
Aki Ruuskanen
Reply

OK, here is a better example witth just four products in the product group.

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

The products are not sorted within that group. They all have 0 as GroupProductRelationSorting.
Try to sort them and then rebuild the index.

 
Aki Ruuskanen
Aki Ruuskanen
Reply

OK, thanks for your help Morten. I didn' think that doing an actual sorting in evry group was neccesary. 

I just need explain to the customer the they need to do a sort in a ecom group in order to get the frontend to sort the products the way they are displayed in eCom. 

I understand now that the GroupProductRelationSorting is only set when actually doing a sort. Which is kind of logical. I also understand that from the customers point of view it appears that there is a sorting set alredy because the products are in a list. :)   

I also understand that if you choose to use group context for sorting then you actually would have done some sorting in the backen groups. :) 

Case closed. :) 

Regards / Aki

 

You must be logged in to post in the forum