2

Terms related to E-commerce

In ecommerce setup we have Products and Variants. Variants are also products but they vary on some attributes.

eg: A T-shirt can vary on Size and Color attributes. Let say we have following options for Size and Color attributes Color : Red, Green Size: Small, Large

Then we can have 4 Variants for that T-Shirt


Following terms will be used throughout the question:

Option Type : Product attributes that help in creating variants eg: Size, Color, Material etc..

Option Value : Values that are possible for particular Option types. eg: Size option type can have following option values Small, Medium, Large, Extra-Large

Variation theme : Variation theme is list of option type that are needed to create a variant

Prototype: Prototype is nothing but template for a product. Prototype help us creating a product with ease. It stores following information: - Product properties - Varition themes

Goal


We have 2 Roles: Admin, Seller

Following are the things that above Roles can do

Admin can

  • Create product category(taxon) and associate it with the product prototype
  • Associate prototype with variation themes for a particular product category
  • Create variation theme
    • Create and Associate option types for variation theme
    • Create default template option values for particular option type
      • eg: Size option type can have S, M, L, XL option values
    • Can add more default template values if needed for a option type

Seller can

  • Create a product
  • Choose variation theme for product
    • Populate option type for selected variation theme.
    • Can either select default template option values for option type OR add a new option value for the option type

Following are some contraints that need to be kept in mind

  • Seller sees the possible option values for an option type set by the Admin
  • When seller adds new option value for option type, it should not affect the option values added by Admin

DB design

Diagram Diagram image

Lets see if above db design adhere to the goals

  • Admin can create product category(taxon) and associate it with prototype.
    • Taxon is a category node and stores prototype key and each category can have one prototype. This ensures that we always have one category associated to one one prototype.
  • Associate prototype with variation themes for a particular product category.
    • Variation theme store prototype id and protoype can have many variation themes.
  • Admin can create and associate option types for variation theme
    • Variation theme has many Option types through theme_option_types table.
  • Admin can create default template option values for particular option type.
    • Option values for particular option type can be stored in template_option_value. Eg. the admin can set s,m,l,xl as default values which the sellers can select while creating products.
    • One option type can have many option values.
  • Seller can create product and select variation theme for a product.
    • To create a product seller has to select the category(taxon) under which the product may fall. eg: Smartphone product can fall under Electronics => Mobiles & Accessories => Smartphones & Basic Mobiles => Smartphones.
    • As product associate directly with a category(taxon) then the product prototype is easy to find.
  • Populate option type for selected variation theme.

    • Prototype has many variation themes, so variants for product can be created based on option type in the selected theme.

  • Seller can either select default template option values for option type

    • User can be shown the possible option values from the template_option_values for the option type.

  • Seller can add new option type for option type
    • As the option values are stored in different table ie. variant_option_values, we can add as many option value for option type of that variant.
    • Also the new value does not get added in the default options added by admin because we are maintaining different table for option values of variants.

Painpoints

  • The values is stored in different table (variant_option_values), so the values will get repeated when the seller selects option values mostly added by admin.
  • I am also not sure that my design is the best way to do to achieve the goals. Need validations and critics.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.