Combine Products

Hello everyone! I have created a sales App of selling drinks. But I have a problem with the Product of several litres. E.g Take Pepsi as an example there 0.5\1\1.5 and 0.33 litres of them. How I can combine them into one Pepsi Card and when I wanna sell them choose litre(NB when I choose litre it must lookup the price of the choosen litre) Thanks in advance!

Do all your products have variations or just some of them?

Some of them because we have for example fruit juices which are in the standard liter.

I would structure your pricing table like this.

Product Variation Price
Pepsi 0.5L 10
Pepsi 1L 20
Pepsi 1.5L 30
Apple Juice 5
Orange Juice 4

Then in your Products screen, show an Order button that opens up a form. This form would write to an Order Lines table, with columns being: User ID, Product ID, Variant, Quantity.

The form would show fields for inputting quantity, and a variant where your product has variants. You can determine if a product has variants by using a relation + lookup approach on the Products table.

In your Order Lines table, create a query, filtering by Product ID and Variant on the Pricing table. I think empty variants can just take care of themselves, and you can use a single value column to retrieve the price from the query.

1 Like