Developer forum

Forum » Ecommerce - Standard features » Override group in index

Override group in index

Thomas Schroll
Reply

Hi

I'm setting up a productlist with products from different groups. I use the new index. I have a parameter named groupid, and if I input a single group id in the 'Override default parameters' it only shows products from that group. If I input multiple groups seperated by ',' no products is shown.

Does anybody know how to limit the index to multiple groups when using the 'Override default parameters' on module settings?

regards Thomas


Replies

 
Nicolai Høeg Pedersen
Reply

If your parameter is of type system.string[] - an array, you are able to add more groups in ,-seperated manner. If not, it will not work.

Can you give us some dumps of your query + parameter setup in repositories?

 
Thomas Schroll
Reply

Thanks Nicolai

My parameter was just a string. Even though I've changed the parameter to system.string[] the page do not show any products. Enclosed you see the repository setup to the left and the paragraph setup to the right.

Regards Thomas

Skærmbillede_2016-05-09_13.19.46.png
 
Nicolai Høeg Pedersen
Reply

Hi Thomas

Does it work if you do not use the default values, but add it to the querystring instead? &groupid=group1,group2

I think not, so it is not to do with setting the default value.

Your search says "Group IDs" contains "array of group ids" - which means, give me all products that is member of GROUP13 and GROUP44. You should change your contains to a Match Any, meaning give me all products that is member of GROUP13 or GROUP4

 
Thomas Schroll
Reply

Thanks Nicolai, but it is still not working. I have changed to 'Match Any' and removed the default group id's. &groupid=GROUP13 and &groupid=GROUP44 in the querystring is working, but &groupid=GROUP13,GROUP44 is not?

Regards Thomas

 
Nicolai Høeg Pedersen
Reply

Hi Thomas

Attached my setup and it works like a charm. You have to check again...

Capture.PNG Capture1.PNG Capture2.PNG
 
Thomas Schroll
Reply

Thanks Nicolai

My bad: When changing the parameter from system.string to system.string[] in the repository I need to reset the default parameter in the paragraph settings - Facepalm

Regards Thomas

 
Nicolai Høeg Pedersen
Reply

Ah, that explains it! Good to know...

 
Mikkel Toustrup Olsen
Reply

Hi Nicolai,

I have a similar issue.

I have a top navigation where most of my navigation items represent a top category. E.g. "Living Room" Note, that "Living Room is not a ecom group, just a menu item. Living Room consists of multiple subgroups from ecommerce. In my case I want to restric the groups the Living Room page should show to a specific amount.

I've setup the exact same query as you and on my Living Room page attached a ecom module which utilizes the index and said query. However, even if I default the group ids seperated by a comma (,) in the override default parameters it does not render the groups when I view the page. However, it renders them perfectly, when I, as you, parse them tothe querystrinng like:

http://someurl.dk/products/livingroom?groupid=GROUP445,GROUP461 ...

Any ideas of what I am doing wrong? :)

BR. Mikkel

 
Nicolai Pedersen
Reply

Nope... Will need to see your setup. Screendumps or link.

 
Mikkel Toustrup Olsen
Reply

Hi Nicolai, 

I've attached some screendumps :)

ecomSS1.PNG ecomSS2.PNG indexSS.PNG ssNoQueryParams.PNG ssWithQueryParams.PNG
 
Nicolai Pedersen
Reply

It looks right, and it "works on my machine" with a similar setup... But remove the "Groups" checkbox. Thtat might be it. This is a product list - setting that checkbox means that you will render the subgroups to the current group, and that is not what you want.

Nicolai

 
Mikkel Toustrup Olsen
Reply

Hi Nicolai,

Yes, I am rendering my products based off of their group ids, however I would like to show the groups and then the products so you have a setup like..

Living room

- Group 1 -> product list for Group 1

- Group  2 -> productlist for Group  2

I could use ecom navigation for this, I guess. Does that utilize the index as well ?

Mikkel

 

 

 
Nicolai Pedersen
Reply

Hi Mikkel

You are mixing apples and pærer as man says in Denmark...

A search returns a list of products - you cannot group that byt the group in this way.

 
Mikkel Toustrup Olsen
Reply

It certainly seems so :-)

However, does the ecom navigation utlize the ecom index? - if so I think I would be able to use that in my case.

If not I guess there will be no other way around it to select the groups directly via the "Product Groups" function on the ecom module and not utilize the index :(

 
Mikkel Toustrup Olsen
Reply

Hi Nicolai,

So to follow up, what would your suggestion be in this case. Have two ecom modules, one rendering the selected ecom groups I need and another ecom module which renders the productlist (from the index) ? 

BR Mikkel

 
Nicolai Pedersen
Reply

The navigation simply adds &groupid=group1 to the querystring, so if your search reacts on that parameter, it also works.

I do not understand what you are trying to accomplish, so not sure I can help you out... Do you have a screendump?

 
Mikkel Toustrup Olsen
Reply

Hi Nicolai.

Yes, take a look at the attached image which is a dump of the design.

Basically Soveværelse is my main category, when clicking Soveværelse the user should be presented with the x amount of subcategories which themselves can have subcategories.

BR Mikkel

ss.PNG
 
Nicolai Pedersen
Reply

Ok, that is a list of groups and subgroups - I see no products. Only products are in the index - groups are not...

 
Mikkel Toustrup Olsen
Reply

Yeah, which I found out yesterday (that groups arent present in the index).

However, given this structure what would be the appropriate way to handle this. Should it utilize the ecom navigation, should it be pages with ecom modules attached on each to speficy the specific groups rendered?

BR Mikkel

 

You must be logged in to post in the forum