Skip to content

Commit 566f1b2

Browse files
committed
011_product_modeling.md: More about translation
1 parent cb5e0ff commit 566f1b2

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

docs/trainings/commerce/pim/011_product_modeling.md

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ Product assets presented bellow are explaining why there is no need to add field
5050

5151
Like fields, attributes are typed.
5252

53-
Unlike fields, attributes are never translatable.
53+
Unlike fields, attributes are not translatable in the product.
54+
Attributes are translated from their definition.
5455
Attributes are product constant properties.
55-
Attributes values can't be translated because those properties don't change with the language.
56-
Only the display of those properties changes with the language. See the following concept examples:
56+
Attributes values can't be translated from the product because those properties don't change with the language.
57+
Only the display of those properties changes with the language.
58+
See the following concept examples:
5759

5860
- The color of a product is the same whatever the language is, only the corresponding color name is translated.
5961
- The radius of a sphere doesn't depend on the language, only its numeral representation need translation according to local length units.
@@ -63,21 +65,20 @@ Attributes and attribute groups are to be reused from product type to product ty
6365

6466
An attribute can be used to make product variant.
6567

66-
TODO: Best practices:
67-
How to think product types?
68-
How to not have a product type per product?
69-
How to not want a "god" product type trying to cover everything?
70-
71-
TODO: Variants
72-
7368
## Product and product variants
7469

7570
Technically, a product is a content item.
7671

7772
But a variant isn't.
73+
A variant has simpler representation
74+
refering to the base product
75+
and declaring values for the variable attributes.
7876

7977
TODO: Continue content VS product VS variant
8078

79+
A variant doesn't need translation.
80+
It combines base product's and attributes' translations.
81+
8182
## Product assets
8283

8384
Product assets are collection(s) of images associated to a base product and eventually to its variants.
@@ -94,6 +95,11 @@ When displaying a product variant, the application combines the asset collection
9495
For example, you can associate close-up photos of a feature to the checkbox representing its presence,
9596
while associating full views of the products to each of its available colors.
9697

98+
Assets are not translatable.
99+
If a product is not the same from a region to another, from a language to another, this isn't the same product.
100+
For example, if you want to be able to select the language of the instruction manual whatever the user's region,
101+
you could set this choice in a selection attribute, then load a preview asset to each of its values.
102+
97103
## Exercise: Bike modeling
98104

99105
Exercise: Think about attributes and content type to sell full bicycles and bicycle parts.
@@ -269,6 +275,13 @@ But, if you're curious, you can read or implements as a bonus the following cust
269275
;
270276
```
271277

278+
??? note "Bonus: Translation"
279+
280+
- Add a language to your installation (Admin > Languages > Add language).
281+
- Translate your attribute groups and attributes using the "Translations" tab when you displaying a group or an attribute in the back office.
282+
- Translate your product types.
283+
- Translate your base products.
284+
272285
Here are some assets for the Fuji bikes, and for the G02 bundles front gears:
273286

274287
On Fuji, create the asset collections for the assets to be associated to the corresponding variants.

0 commit comments

Comments
 (0)