Help

Only one product by category

Topic Labels: Views
3196 9
cancel
Showing results for 
Search instead for 
Did you mean: 
Belgana_France
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello,
I would like to have only one product from each category.
image
There are two lit in stock but I want only the first one in the grid

Thx for helping

9 Replies 9

I don’t quite understand what you’re trying to achieve. Could you go into greater detail about the setup of your base, and what you wish to accomplish?

Yes,
image
This is the complete list and I would like a list of products, in stock, by Type (I know how to do it) and only one product by category.

I have 2 products in the category lit. I would like to filter the second product if the first product are in stock, the right type.

I hope I am clearer

So If I want a lit from chambre, the result will be Lit A

If I understand you correctly, you only want to see the first in-stock item in each given category. In your example, you only used two, but let’s say you’ve got 10, and items 1 through 4 are out of stock. In that situation, item 5 is the first in-stock item, so you only want to see Item 5, and hide 6-10. If Item 5 gets used and goes out of stock, then Item 6 should be shown as the next available item, and 7-10 should remain hidden. Is that correct?

Yes it’s exatly that ! :grinning_face_with_big_eyes:

I have an idea of how to pull this off, but I don’t fully understand the purpose of the table in your screenshot. You have a [Products] table where each product is listed, and another table where you’re tracking the stock status of each product. What’s the purpose of the table you’re displaying? It seems to me that you can get the result you want directly on the [Products] table. Also, why is the stock status kept on a different table than the products themselves?

I think there may be a way to clean up your base design while also giving you this filtered view that you want, but it would help to know more about all of your tables and have a clearer picture of what data you’re storing and what you wish to do with it.

Belgana_France
5 - Automation Enthusiast
5 - Automation Enthusiast

I unterstand why you don’t understand the purpose.

I use “in stock” if the product is available from my providers

I am working with intergromat et woocommerce to import product but intergromat doesn’t handle plugins so I cannot import bundle products via intergromat (i have to use CSV).

I created a excel files to generate the csv but I need the list of the SKU of each product from bundles products.

Thanks for the clarification. I still don’t understand everything you’re trying to do, but for now let’s focus on this individual task. Here’s how I set up my test. I used a checkbox field to represent your status lookup field, but it should still work the same. I also added a lot more examples just to make sure the process works with large quantities. I named this table [Main] for this test:

Screen Shot 2020-08-04 at 9.52.07 AM

Over on the [Products] table, I first added two lookup fields, both using the links from the [Main] table. One looks up the stock status, the other looks up the {Product Position} value.

Screen Shot 2020-08-04 at 9.54.33 AM

Jumping over to the [Categories] table, I added a rollup field named {Smallest In Stock}:

Screen Shot 2020-08-04 at 9.55.41 AM

That gave me the position number of the smallest item that’s in stock:

Screen Shot 2020-08-04 at 9.56.46 AM

Back in the [Products] table, I added a similarly-named rollup field to pull in that value, and compare it against each item’s position value. This will return a 1 where that product matches the lowest number, and a 0 for any product that doesn’t match.

Screen Shot 2020-08-04 at 9.57.37 AM

Screen Shot 2020-08-04 at 9.58.46 AM

Returning to the [Main] table, we can lookup that value, and use it in a view filter to control which item is displayed in each category.

Screen Shot 2020-08-04 at 10.00.24 AM

I’ll leave the filter off, but you can see that if you applied a filter to only show records where {Display Filter} contains a 1, it will only show the first item.

Screen Shot 2020-08-04 at 10.01.37 AM

If several items are out of stock, only the next one in line will display.

Screen Shot 2020-08-04 at 10.02.43 AM

If I have multiple items in different categories, each category will show its lowest available item.

Screen Shot 2020-08-04 at 10.04.51 AM

It’s totaly what I need. I’ll try it tomorrow.
Thx for your help and I’ll tell you the status of it tomorow

Belgana_France
5 - Automation Enthusiast
5 - Automation Enthusiast

It’s perfect ! It’s what I need. Thx man