Skip to content

Commit 09a719f

Browse files
committed
[WIP] PIM training raw draft
1 parent 4d2a8a4 commit 09a719f

File tree

5 files changed

+454
-0
lines changed

5 files changed

+454
-0
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
description: PIM training
3+
---
4+
5+
[[% include 'snippets/experience_badge.md' %]] [[% include 'snippets/commerce_badge.md' %]]
6+
# PIM (Product Information Management)
7+
8+
## Syllabus
9+
10+
In this training, you learn how to create complex products, to quote their prices, and to organize them in catalogs, using the build-in features.
11+
12+
| Section | Estimated | Description |
13+
|:------------------------------------------------|----------:|:------------------------------------------------------------------------------|
14+
| [Product modeling](011_product_modeling.md) | X minutes | Learn about product types, products and product variants. |
15+
| [Product shelving](012_product_shelving.md) | Y minutes | Organize your products with categories and catalogs. |
16+
| [Product displaying](013_product_displaying.md) | Z minutes | Template the product page. |
17+
| [Product pricing](021_product_pricing.md) | N minutes | Manage currencies and VAT rates, compute prices. (TODO: discount needs users) |
18+
19+
## Requirements
20+
21+
### Previous knowledge
22+
23+
- [Content management](content_management.md)
24+
- [Content types](content_types.md) and [content items](content_model.md#content-items)
25+
- [Taxonomy](taxonomy.md)
26+
- [Templating](templating.md)
27+
28+
### Ibexa DXP edition
29+
30+
[[= product_name_headless =]] is the minimal edition required for this training.
31+
32+
- [[= product_name_headless =]] [[= latest_tag_4_6 =]]
33+
- [[= product_name_exp =]] [[= latest_tag_4_6 =]]
34+
- [[= product_name_com =]] [[= latest_tag_4_6 =]]
35+
36+
TODO: Make sure that everything used is in Ibexa DXP Headless scope, so to speak, ibexa/product-catalog
37+
TODO: Trainees working on Ibexa DXP Commerce could pick examples from ibexa/storefront but others mustn't be frustrated of having installed an inferior edition.
38+
39+
!!! note
40+
41+
You can use [`experience-skeleton`'s DDEV feature](ddev_interactive_launcher.md#experience)
42+
43+
For more suggestions about your training environment, see [Training environment](trainings.md#training-environment).
44+
45+
### Cluster elements
46+
47+
This training needs a reverse proxy for HTTP cache. For a local installation, Varnish is recommended.
48+
49+
| Service | Required | Value |
50+
|--------------:|:--------:|:-------------|
51+
| Search engine | No | (Legacy) |
52+
| Cache pool | No | (Filesystem) |
53+
| HTTP cache | No | |
54+
55+
### Starting state
56+
57+
To follow this training, you must install code, config and data on top of a fresh installation.
58+
59+
1. Download the [starting state archive](download/a_late_training.start.zip).
60+
1. Put this archive at the root of your [[= product_name =]] training installation.
61+
1. In a terminal, run the following commands at the root of your [[= product_name =]] training installation:
62+
```bash
63+
unzip a_late_training.start.zip
64+
tail -n+2 config/append_to_services.yaml >> config/services.yaml
65+
rm config/append_to_services.yaml
66+
php bin/console ibexa:migrations:migrate --file=a_late_training_content_types.yml --siteaccess=admin
67+
php bin/console ibexa:migrations:migrate --file=a_late_training_contents.yml --siteaccess=admin
68+
```
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
---
2+
description: "PIM training: Product modeling"
3+
edition: experience
4+
page_type: training
5+
---
6+
7+
# Product modeling
8+
9+
## Product types
10+
11+
The product type base concept is close to the content type one.
12+
Like a content type structures a family content items, a product type structures products.
13+
14+
See a first conceptualisation of what a product is, and what a product type is, in [Documentation > PIM (Product management) > Products](products.md).
15+
16+
In fact, a product type is really a content type from the hidden system group `product` with a field of type “Product specification” (`ibexa_product_specification`).
17+
18+
The presence of an `ibexa_product_specification` field is what distinct product type from content type.
19+
Don't remove this field from a product type (or it will become a unreachable hidden content type).
20+
Don't add such field to a content type (or it will become an uneditable broken product type).
21+
22+
TODO: What happens if you have several `ibexa_product_specification` fields?
23+
24+
You can trick the system URL to display a product type as a content type but know that this is dangerous and mustn't be exposed to final users.
25+
Always prefer the dedicated route (as the Back Office does) `/product-type/view/<product_type_identifier` (`ibexa.product_catalog.product_type.view`).
26+
To view it through `/contenttypegroup/<product_group_id>/contenttype/<product_type_id>` (`ibexa.content_type.view`) is doable. You could even edit it from there. But this is strongly not recommended.
27+
28+
TODO: move to somewhere in the exercise
29+
If you're curious, after having created a product type, you can run the following SQL query to see the database representation.
30+
31+
```sql
32+
SELECT cg.group_id, cg.group_name, g.is_system, c.id, c.identifier, c.version
33+
FROM ezcontentclass AS c
34+
JOIN ezcontentclass_classgroup AS cg ON c.id = cg.contentclass_id AND c.version = cg.contentclass_version
35+
JOIN ezcontentclassgroup AS g ON cg.group_id = g.id
36+
ORDER BY cg.group_id ASC, c.id ASC
37+
;
38+
```
39+
40+
The "Product specification" field type (`ibexa_product_specification`) brings in the power of attributes.
41+
42+
Notice that you don't need to add a field or an attribute for price.
43+
Prices are handled by a particular side mechanism, the price engine, which is treated later in the training with VAT, currencies, etc.
44+
45+
## Attributes VS Fields
46+
47+
Like fields, attributes are typed.
48+
49+
Unlike fields, attributes are never translatable.
50+
Attributes are product constant properties.
51+
Attributes values can't be translated because those properties don't change with the language.
52+
Only the display of those properties changes with the language. See the following concept examples:
53+
54+
- The color of a product is the same whatever the language is, only the corresponding color name is translated.
55+
- The radius of a sphere doesn't depend on the language, only its numeral representation need translation according to local length units.
56+
57+
TODO: Later in the training, in the templating part, is shown how to localize the attributes.
58+
59+
Unlike fields, attributes are first defined outside the product types.
60+
Attributes and attribute groups are to be reused from product type to product type.
61+
62+
An attribute can be used to make product variant.
63+
64+
TODO: Best practices:
65+
How to think product types?
66+
How to not have a product type per product?
67+
How to not want a "god" product type trying to cover everything?
68+
69+
TODO: Variants
70+
TODO: attribute value display translation
71+
72+
## Product and product variants
73+
74+
Technically, a product is a content item.
75+
76+
But a variant isn't.
77+
78+
TODO: Continue content VS product VS variant
79+
80+
## Exercise: Bikes and bike parts modeling
81+
82+
Exercise: Think about attributes and content type to sell full bicycles and bicycle parts.
83+
84+
The following is an example of a bicycle feature model sketch.
85+
As you can see, it's a rich and complex matrix.
86+
And it doesn't involve different brands and models for the same feature yet.
87+
88+
- Bicycle:
89+
- Frameset:
90+
- Frame:
91+
- Size: [XS, S, M, L, XL]
92+
- Shape/Features: [Diamond, Step-through, Diamond w/ suspension, Folding, Recumbent, Cargo, Tandem, …]
93+
- Material: [Steel, Aluminium, Titanium, Carbon, Wood, Bamboo, Mixed, …]
94+
- Paint job: []
95+
- Fork
96+
- Size: [XS, S, M, L, XL]
97+
- Suspension: yes/no
98+
- Paint job: []
99+
- Handlebar:
100+
- Shape: [Standard, Drop, Bullhorn, Flat, Riser, …]
101+
- Paint job: []
102+
- Saddle:
103+
- Shape: [Thin, Large, Noseless, …]
104+
- Cushion material: [Foam, Gel, …]
105+
- Cover material: [Spandex, Vinyl, Kevlar, Leather, …]
106+
- Paint job: []
107+
- Saddlepost:
108+
- Material: [Steel, Aluminium, Titanium, Carbon, Wood, Bamboo, Mixed, …]
109+
- Type: [Rigid, Suspension, Dropper, …]
110+
- Attachment: [Quick release, Bolt/nut, Anti-thief, …]
111+
- Gears:
112+
- Front gears:
113+
- Speed count: [1…3]
114+
- Type: [Single, External, Hub internal, Crank gearbox, …]
115+
- Control transmission: [Bowden cable, Hydraulic, Electronic, …]
116+
- Control type: [Lever, Ring, …]
117+
- Control placement: [Handlebar, Frame, …]
118+
- Rear gears:
119+
- Speed count: [1…8]
120+
- Control type: [Bowden cable, Hydraulic, Electronic, …]
121+
- Type: [Single, External, Hub internal, Crank gearbox, …]
122+
- Control transmission: [Bowden cable, Hydraulic, Electronic, …]
123+
- Control type: [Lever, Ring, …]
124+
- Control placement: [Handlebar, Frame, …]
125+
- Transmission: [Chain, Belt, Shaft, …]
126+
- Wheel set:
127+
- Rear wheel:
128+
- Axle attachment: [Quick release, Bolt/nut, Thru, Anti-thief, …]
129+
- Diameter: [622 mm (road 700C, mountain 29″), 584 mm (road 650B, mountain 27.5″), 559 mm (mountain 26″), 406 mm (mountain 20″), …]
130+
- Type: [Standard spokes, G3 spokes, Disc, …]
131+
- Brake: [Caliper, Disk, Roller, Drum, …]
132+
- Rim material: [Aluminium, Steel, Carbon, …]
133+
- Tire shape: [City, Race, Mountain, Fat, Mixed, …]
134+
- Tire insert: [Clincher/Tube, Tubular, Tubeless, Foam, Solid, …]
135+
- Paint job: []
136+
- Front wheel:
137+
- Same as rear: ☑yes/☐no
138+
- Axle attachment: [Same as rear, Quick release, Bolt/nut, Thru, Anti-thief, …]
139+
- Diameter: [Same as rear, 622 mm (road 700C, mountain 29″), 584 mm (road 650B, mountain 27.5″), 559 mm (mountain 26″), 406 mm (mountain 20″), …]
140+
- Type: [Same as rear, Standard spokes, G3 spokes, Disc, …]
141+
- Brake: [Same as rear, Caliper, V, Disk, Roller, …]
142+
- Rim material: [Same as rear, Aluminium, Steel, Carbon, …]
143+
- Tire shape: [Same as rear, City, Race, Mountain, Fat, Mixed, …]
144+
- Tire insert: [Same as rear, Clincher/Tube, Tubular, Tubeless, Foam, Solid, …]
145+
- Paint job: [Same as rear, Same as rear, …]
146+
- Electric assistance:
147+
- Electric assistance: ☐yes/☑no
148+
- Motor placement: [Front wheel, Rear wheel, Crank, …]
149+
- Battery placement: [Center, Rear, …]
150+
- Regulation: [EU pedelec, EU speed pedelec, …]
151+
152+
A bad practice would be to try to have a unique product type for modeling all the bikes from the catalog.
153+
For example, series of product won't necessarily vary on the same attributes.
154+
TODO: To have one product type per base product can happen.
155+
156+
157+
158+
159+
Mountain Bike (MTB)
160+
- MTB 4 series
161+
- Fuji (3776€) (MTBS4-4)
162+
- Frame: [Diamond, Step-through]
163+
- TODO
164+
- Matterhorn (4478€) (MTBS4-5)
165+
- Annapurna (8091€) (MTBS4-6)
166+
- Frame: [Diamond w/ suspension]
167+
- Etna (3369€) (MTBS4-7)
168+
- MTB 5 series
169+
- Kilimanjaro (5895€) (MTBS5-0)
170+
- Stádda (1392€) (MTBS5-1)
171+
- Aconcagua (6960€) (MTBS5-2)
172+
- Ventoux (1910€) (MTBS5-3)
173+
- Castor (4225€) (MTBS5-4)
174+
175+
176+
- Create the attribute groups
177+
- Create the attributes
178+
- Create the product types
179+
- Create the products
180+
181+
TODO: Variants
182+
TODO: [Create custom product code generator strategy](create_product_code_generator.md)
183+
184+
Your new products are in the "Uncategorized products" section of the **Products** admin page.
185+
It's now time to fix this in the next chapter.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
description: "PIM training: Product shelving"
3+
edition: experience
4+
page_type: training
5+
---
6+
7+
# Product shelving
8+
9+
There is several ways to group and sort products. TODO
10+
11+
## Catalogs
12+
13+
[Catalogs](catalogs.md) group products by filtering on product data.
14+
15+
TODO: What having several catalogs implies (navigation, customer experience,…)
16+
TODO: How catalogs are displayed? Move this concern to "Product displaying"
17+
TODO: [Create custom catalog](create_custom_catalog_filter.md)
18+
19+
## Categories
20+
21+
Product categories are tags in the `product_categories` [taxonomy](taxonomy.md).
22+
23+
If you're curious, you can find the `product_categories` taxonomy configuration in `vendor/ibexa/product-catalog/src/bundle/Resources/config/prepend.yaml`.
24+
25+
TODO: Something interesting to do using the Taxo API?
26+
27+
Exercise:
28+
29+
- Create a "Mountain Bike" category with two child categories "4 Series" and "5 Series"
30+
- Categorize the products from previous chapter's exercise into the right series:
31+
32+
- Mountain Bike
33+
- 4 Series
34+
- Fuji
35+
- Matterhorn
36+
- Annapurna
37+
- Etna
38+
- 5 Series
39+
- Kilimanjaro
40+
- Stádda
41+
- Aconcagua
42+
- Ventoux
43+
- Castor

0 commit comments

Comments
 (0)