Hello , i have a bunch of categories and products , the products are displayed in a repeating group with text above the repeating group displaying the category how do i get the repeating group to only display products from a certain category?
Add the relevant constraints on your search.
by “text above” I assume you have your categories as clickable titles and use those to filter the RG? in that case just make the category a custom state of the products list and filter your items by that. here, like this.
What do you mean it doesn’t work?..
What did you do (what category did you specify), and what happened?
@adamhholmes i dont even get the option to choose which category i want to display, the repeating group just displays all the products in the database.
It’s right there in your screenshot…
Category =
Then you have to define which category you want to constrain the search by…
Obviously how you do that depends on where that category is defined on your page or in yore database…
But, seeing as your page has a content type of Category, I’d guess that you want to constrain the Product search by the category of the current page? yes?
In which case you just use: category = Current page Category
@adamhholmes maybe im doing something wrong because when i choose current page category the repeating group is just blank like this
and also im building a single page application so i want to display multiple categories in one page.
@hanan1 hello
i have not made them clickable yet , but i want only the products of a specific category to be displayed. Whats happening right now is the repeating group is just displaying all the products in the database in the same category and im not able to figure out how to get it to display what i want.
For example
Even though the category is paint its displaying other products.
Most probably, either the page doesn’t have a valid category, or there aren’t any Products in your database within the current page category (Or possibly privicy rules are getting in the way).
and also im building a single page application so i want to display multiple categories in one page.
Well then it does’n make any sense to have a page content type of Category…
How should i proceed then?
I could totally be wrong but I think you’re overcomplicating things. If it’s a one page application, you just need a vertical RG of categories with an embedded RG of products for each category, scrolls horizontally. And if a category has no products, just add some text that appears in that case.
Source for the categories RG is do a search for: categories
Source for products RG is do a search for: products: where category is current cell’s category
Something like this, though I had categories as an option set in this example so the source is slightly different.
This topic was automatically closed after 70 days. New replies are no longer allowed.