How do I add products with variation to my app?

I’m building a catalog app that displays product prices and it works great, but I’m looking to add products that have variations in size and colors (let’s say the variation is dynamic) with different prices.

I really would like the user to be able to select the product and a section that says “Click here to see the variations” appears below.

I’ve searched this group and Google but couldn’t find a solution so I’m wondering if this can be done.

I saw an application created here but I don’t quite understand how that step was done

The app is serious, sorry if I want to copy that function but it seems perfect to me

Captura de pantalla 2023-01-10 100044

Hi! Look it is just another table With variants of product

Yes, but I see that no data is stored there at the moment it is only empty

may be it is because demo template in demo mode?
But also has no variants…

I still can’t find the solution :frowning:

Which step you dont know? What are you own now?

I don’t know how to make the app work correctly because of the products and their variants

I feel like I’m having a creative block that doesn’t let me think things through to solve this problem

to date I would like to know should I have 2 tables:

  1. Products
  2. Variants

How do I relate so that the products table is the main one where the admin adds the products and in the same way when adding it can add the variants to the other table

After that, the user will be shown “THE ORIGINAL PRODUCT”, with the option to see the variants below

So you need Variant table have row with original product id
You need multi relation from original id to variant table product id
And you can show inline list sourced from this relation

correct me if i’m wrong

I already have my table where the products go and I have my table of the variants
the two are related by Product_ID

from there I need the admin to be able to add products with their variants

would it be two forms? one for the original product and one for the variant?

because doing it that way adds the variant but the variant itself is not added as a new product and it is not shown in the catalog so that the user can select it

I see that you know a lot about the subject, let’s say that I want to perform the functionality that is the same as that app that I must do in addition to relational tables

May be another person can gave you better solution, because im confused why he need second table this way? Why you cant use just like category for item. All item in a category is a variants of it. So you just need column named category id and items which same - have same category id an all of it is variants you can group it and relate in same table. Or im wrong?

And may be like this:
items have type id and all items same type is varisnts with different Size id and color id all in one table

Wait inems with type ID and selected color id need to find variants with different sizes?
If like this, you need some sort of if then validation and then relate to it, like a dynamically filter.
i’m not promises, but i will try prepare prototype next morning if nobody explain to you

Okay I see that you are confused by the lack of information if you want I will detail it for you to see

  1. It is an application about a catalog of products that are sold in a factory for a school project

  2. each product belongs to a category or subcategory

  3. Certain products have variants of themselves (eg: color, size)

  4. Based on these variations, the price changes

  5. Each variation of each product can have an offer price, which is determined by the administrator

  6. The administrator is in charge of adding, editing and deleting products

  7. The application must be dynamic, so products, variations, prices, categories and subcategories must be added from the same app

  8. Each product must be shown to the user with its corresponding information (Price, variation, internal product code, etc.)

  9. The user must choose the product to know its price and descriptions of the same (that is where the variations come in, which have the option of selecting one and showing their respective information)

  10. I have already done all the steps mentioned except for the product variations

also each variant should be displayed as an additional product

Yes, ok! Give me time please

I really appreciate your help

Wow
Table 1 - Category dictionary
Table 2 - Subcategory dictionary
Table 3 - Color Dictionary
Table 4 - Size dictionary
Table 5 - Items dictionary
Table 6 - STORE
So, table 6 have Column T1ID ColumnT2ID ColumnT3ID Column T4ID Column T5ID
and… ROW ID, so on
So, all rows(in table 6) with same T5ID is variants

1 Like