The problem is the following table (price) where the goods come with the following values
- sell by the piece (unit), in packs, in thousands.
- product weight pcs / kg, 1000 pcs / kg, packaging / kg
- the price also comes in different ways per piece, 1000 pieces, per package
write to the database in the following form
- unit of measure (units) - in which (units / thousand / unitary enterprise)
- unit weight
- unit price
As you understand, if you sculpt a separate rendering method for each variant, we get the "combinatorial boom". Especially if options are added. To draw dependency tables / read everything to everything, and then substitute the necessary ones with a performance loss.
In other words, we need advice on where to dig, how to deal with it, or which template will help solve this.
Apparently vaguely explained the problem: The thing is that a unit of goods can come in one form (unit of measurement) pcs, the price of 5 thousand pcs is 700r, the weight of goods in another ratio is 2.7 kg per package, the weight either per 1000 or per piece or packaging.