Home>

We develop an online store, now engaged in reflashing database, because Past implementation did not come up. I think many know the online store Vaildberriz (I do not write a link, because can delete post)

Task List:

  • realize the catalog as they have on the site
  • implement the characteristics
  • Implement Product Modifications

Question List:

  • how to design a database to implement a catalog as they have on the site?
  • how to implement product characteristics (category, color, size, weight)?
  • how to implement product modifications

Explanation:

  • under the modifications of the goods I mean similar goods: iPhone 9 64GB red and iPhone 9 64GB black, that is, on the page of each of these goods, we must have a link to 'related' goods
  • 'catalog as they have on the site' -Naturally, I do not ask me to realize the database and drop her dump here. I would like to simply explain the logic of their catalog, because It does not reach me at the moment. If I go to the section 'Men' (1), I will get a list of child categories, then, if I proceed to this child category (2), I will see a "category" filter, where there is a list of subsidiary categories for category (2) . And so for each category on the site, and places there are nesting a little different character (that is, it is not always trother).

My assumptions:

Implement the catalog as they have on the site It is necessary to create basic categories of the site (table Categories. ), And they have the Parent_ID field, the categories of which are Parent_ID= NULL -> Parental. For goods (table Products. ) There is a field Category_id where the value is any subsidiary from the table Categories. Create table Characteristics With fields: ID, Name, Type, Category_id Create table Characteristics_Variants. With fields: ID, Characteristic_ID, Name.

And so, as it were, the implementation of such tables somehow should solve the task set, but I can not understand the logic, how to tie it all so, I think something is missing.

With the modifications of goods, I assume that you need to implement a separate type table: Products_Relateds. where we will save 'related ties', but I can not understand how to properly design too ...

Categories:

ID Name Parent_ID
1 Male NULL
2 Pants 1

Products:

ID Name Category_id Price Alias ​​ brand_id
1 Nike trousers 2 7500 Bruki-Nike 2
2 Cotl trousers 2 2500 Bruki-Cotl 3

Characteristics:

ID Name Type Category_id
1 Categories String 2

Characteristics_Variatns:

ID CHARACTERISTIC_ID Name
1 1 Nike
2 1 Cotl

I think this topic will be useful to many if there is a solution to the tasks described by me.

List of additional questions:

  1. How to implement multilinguality for categories, goods? (How to translate View -Clear)

Tautology: everything is spinning on Laravel, MySQL

Read on the "Entity-Attribute-Value" and "facade search".

Akina2021-06-04 05:05:05