helloI'm using Outsystems to do a simple e-shop for plants and I want to make a filter for the catalog page
so I'm trying to do a menu and a submenu for that so when the user chooses the menu or the submenu the products table will filter based on the choice he made
the problem is that i don't have an entity for the category i want to use the aggregation filter but i don't know how to specify for the choice that the user made
any help and suggestions?
(tell me if you need more information)
Hi Rakan ,
I looked at your problem. How will you differentiate the products, product one should be in parent menu and product two should be in sub menu. If you don't use category entity. I suggest you to create an entity for category i.e.
Those attribute you need to add
-Category id
-name
-parent_id this should be identifier for subcategory into the same table.
Need to create aggregate
Category only with category
You will be able to do this this.
If it doesn't work then attach a screenshot of the entities and explain in detail
Thanks
Prince
i solved the problem by using if statements in aggregation like this
(also i dropped the image for the data model)
Hi @Rakan Alobailan ,
I don't think you solved any problem. if anything, you dug yourself deeper into an unholy rabbit hole.
The problem, as you stated already yourself, and also @Prince Aadil Khan Panwar pointed out, is that you have not modelled your categories. That's what you should solve.
Dorine
But now i can filter and go between pages using the aggregation what is the problem?
there is a difference between making something work and making something right.
This is horrible for maintenance. Just a little example, what if you want to change the name of one of your categories, you will have to change that in all your product records, and in all your code (such as this filter).
i know what you're saying and i agree with that but this GP is kinda simple, i want to make a fast and easy website because the deadline is close and i still haven't done the cart, order, and payment screen yet
and still, i don't know how to do them :)
Hi rakan,
It would be helpful if you can atleast attach some screenshots or if possible oml so that we can better understand your problem
But to start you need to have something in your aggregate that is related to the menu and sub menu only then you will be able to filter data based on menu and submenu.
Hope it helps
@Rakan AlobailanHi Rakan,Outsytems has an sample App called Product Catalog.You can install this app and check the code that will give you idea for a solution. :)