Browse code

Add wine info to product detail page

Martin Filipovic Hinrichs authored on03/02/2026 15:09:24
Showing10 changed files
... ...
@@ -18,6 +18,8 @@ $font-family-sans-serif: $font-primary;
18 18
 // Color system
19 19
 $beige: #A18152;
20 20
 
21
+$light-beige: #FCF4EA;
22
+
21 23
 $black: #000000;
22 24
 $white: #fff;
23 25
 
... ...
@@ -143,6 +143,74 @@
143 143
     }
144 144
   }
145 145
 
146
+  .tab-content {
147
+    padding: 0;
148
+    background-color: transparent;
149
+  }
150
+
151
+  #wine-info {
152
+    background-color: $light-beige;
153
+    padding: 2.5rem;
154
+    display: grid;
155
+    grid-template-columns: 24px 1fr;
156
+    gap: 2rem;
157
+    margin: 0 0 2.5rem;
158
+
159
+    h4 {
160
+      font-family: $font-primary;
161
+      font-size: rfs-value(18px);
162
+      margin: 0;
163
+    }
164
+
165
+    p {
166
+      padding-top: 0.5rem;
167
+      font-size: rfs-value(15px);
168
+      margin: 0;
169
+    }
170
+  }
171
+
172
+  .product-detail-properties-container {
173
+    margin: 0;
174
+    background-color: $light-beige;
175
+    padding: 1rem 2rem;
176
+
177
+    h3 {
178
+      text-transform: uppercase;
179
+      font-family: $font-primary;
180
+      font-size: rfs-value(18px);
181
+      padding: 0;
182
+      margin: 0 0 1.5rem;
183
+    }
184
+
185
+    table.product-detail-properties-table {
186
+      padding: 0;
187
+      display: inline-block;
188
+      tr {
189
+        border-bottom: 1px solid;
190
+      }
191
+
192
+      tr:last-child {
193
+        border-bottom: none;
194
+      }
195
+
196
+      th {
197
+        padding-right: 2.5rem;
198
+      }
199
+      td {
200
+        padding-right: 1rem;
201
+        color: $dark;
202
+      }
203
+
204
+      th, td {
205
+        background: transparent;
206
+      }
207
+
208
+      th.properties-label {
209
+        font-family: $font-primary;
210
+      }
211
+    }
212
+  }
213
+
146 214
   .card-tabs {
147 215
     .card-header {
148 216
       padding: 0;
... ...
@@ -151,6 +219,10 @@
151 219
     .nav-item {
152 220
       margin: 0;
153 221
     }
222
+
223
+    .card-body {
224
+      padding: 0;
225
+    }
154 226
   }
155 227
 }
156 228
 
... ...
@@ -1,31 +1,35 @@
1
-.breadcrumb.cms-breadcrumb{
2
-  padding-inline: 0;
3
-  margin: 0;
1
+.cms-breadcrumb.container {
2
+  display: none;
4 3
 }
5 4
 
6
-nav[aria-label="breadcrumb"] {
7
-  padding-inline: 2rem;
8
-  background-color: $lighter;
9
-  margin-bottom: 1.5rem;
10
-  width: 100%;
11
-
12
-  @include media-breakpoint-down(md) {
13
-    margin-inline: calc(-1 * (var(--bs-gutter-x) * .5));
14
-  }
15
-
16
-  ol.breadcrumb {
17
-    margin-bottom: 0;
18
-    line-height: 50px;
19
-
20
-    a {
21
-      color: $body-color;
22
-      font-weight: $font-weight-light;
23
-      white-space: nowrap;
24
-
25
-      &.is-active {
26
-        font-weight: $font-weight-light;
27
-        color: $primary;
28
-      }
29
-    }
30
-  }
31
-}
32 5
\ No newline at end of file
6
+//.breadcrumb.cms-breadcrumb{
7
+//  padding-inline: 0;
8
+//  margin: 0;
9
+//}
10
+//
11
+//nav[aria-label="breadcrumb"] {
12
+//  padding-inline: 2rem;
13
+//  background-color: $lighter;
14
+//  margin-bottom: 1.5rem;
15
+//  width: 100%;
16
+//
17
+//  @include media-breakpoint-down(md) {
18
+//    margin-inline: calc(-1 * (var(--bs-gutter-x) * .5));
19
+//  }
20
+//
21
+//  ol.breadcrumb {
22
+//    margin-bottom: 0;
23
+//    line-height: 50px;
24
+//
25
+//    a {
26
+//      color: $body-color;
27
+//      font-weight: $font-weight-light;
28
+//      white-space: nowrap;
29
+//
30
+//      &.is-active {
31
+//        font-weight: $font-weight-light;
32
+//        color: $primary;
33
+//      }
34
+//    }
35
+//  }
36
+//}
33 37
\ No newline at end of file
34 38
new file mode 100644
... ...
@@ -0,0 +1,13 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<svg id="Ebene_1" data-name="Ebene 1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 38.3 82.9">
3
+  <defs>
4
+    <style>
5
+      .cls-1 {
6
+        fill: #a18152;
7
+        stroke-width: 0px;
8
+      }
9
+    </style>
10
+  </defs>
11
+  <path id="Pfad_164" data-name="Pfad 164" class="cls-1" d="M22.2,74.2l1.3-36.8s-5-2.5-5-6.6l.9-21c0-1.5.5-2.7,1.5-2.7l.6,19.8c0,.8.5,1.4,1.3,1.5.8,0,1.4-.7,1.3-1.5l.9-19.8h1.3l.9,19.8c0,.8.5,1.4,1.3,1.5h0c.8,0,1.3-.7,1.3-1.5l.8-19.8h0c.7,0,1.3,1.2,1.3,2.7l1.1,21c0,4-5.3,6.5-5.3,6.5l1.3,37c0,1.4-1.1,3.5-2.4,3.5h-2.1c-1.3,0-2.4-2.1-2.4-3.5"/>
12
+  <path id="Pfad_165" data-name="Pfad 165" class="cls-1" d="M12.6,77.8h-2.2c-1.4,0-2.5-1-2.5-2.4l2.2-26.3c-1.3-4.8-3.7-9.7-3.7-16.7,0-18.7,3.6-25.4,8.2-25.4v41.6l.6,26.7c0,1.3-1.2,2.4-2.5,2.4"/>
13
+</svg>
0 14
\ No newline at end of file
1 15
new file mode 100644
... ...
@@ -0,0 +1,13 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<svg id="Ebene_1" data-name="Ebene 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 29.96 61.06">
3
+  <defs>
4
+    <style>
5
+      .cls-1 {
6
+        fill: #a18152;
7
+        stroke-width: 0px;
8
+      }
9
+    </style>
10
+  </defs>
11
+  <path id="Pfad_145" data-name="Pfad 145" class="cls-1" d="M28.16,0H1.81C.3,4.1-.78,15.38.73,21.47c.69,3.38,2.6,6.4,5.37,8.47,3.71,3.21,7.54,7.83,7.54,25.62,0,1.89-1.81,3.33-4.6,3.66-1.28.15-3.55.57-4.43,1.23-.12.08-.17.24-.12.37.04.14.17.24.31.24h20.35c.15,0,.28-.09.31-.24.05-.14,0-.29-.11-.37-.88-.66-3.15-1.08-4.42-1.23-2.8-.33-4.6-1.77-4.6-3.66,0-17.79,3.83-22.42,7.54-25.62,2.77-2.07,4.68-5.08,5.37-8.47C30.75,15.39,29.66,4.1,28.16,0M27.61,21.03c-.63,3.02-2.34,5.71-4.81,7.56-.79.67-1.54,1.38-2.25,2.13-1.68,1.8-3.64,3.72-5.57,3.72s-3.88-1.92-5.56-3.72c-.71-.75-1.46-1.46-2.25-2.13-2.48-1.85-4.19-4.54-4.82-7.56-1.17-4.7-.72-13.69.47-18.58l.17-.7h23.96l.17.7c1.19,4.89,1.65,13.88.48,18.58"/>
12
+  <path id="Pfad_144" data-name="Pfad 144" class="cls-1" d="M14.98,12.08c-2.64.85-5.38,1.35-8.16,1.5-1.31.02-2.61-.2-3.84-.66-.1,2.6.11,5.21.64,7.76.57,2.75,2.13,5.19,4.38,6.85.82.7,1.61,1.44,2.35,2.23,1,1.07,3.09,3.3,4.62,3.3s3.62-2.23,4.62-3.3c.74-.78,1.53-1.53,2.35-2.23,2.26-1.67,3.82-4.11,4.38-6.85.62-3.19.82-6.46.58-9.7-1.11-.32-2.26-.48-3.41-.47-2.9.15-5.77.67-8.53,1.56"/>
13
+</svg>
0 14
\ No newline at end of file
1 15
new file mode 100644
... ...
@@ -0,0 +1,15 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<svg id="Ebene_1" data-name="Ebene 1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 40.3 84.9">
3
+  <defs>
4
+    <style>
5
+      .cls-1 {
6
+        fill: #a18152;
7
+        stroke-width: 0px;
8
+      }
9
+    </style>
10
+  </defs>
11
+  <g id="Gruppe_158" data-name="Gruppe 158">
12
+    <path id="Pfad_147" data-name="Pfad 147" class="cls-1" d="M24.6,57.4v-6.7h4.8c.6,0,1.1-.5,1.1-1.1s-.5-1.1-1.1-1.1h-4.8v-5.9h4.8c.6,0,1.1-.5,1.1-1.1s-.5-1.1-1.1-1.1h-4.8v-5.9h4.8c.6,0,1.1-.5,1.1-1.1s-.5-1-1.1-1.1h-4.8v-14.9c0-3.3-2.7-6-6-6s-6,2.7-6,6v39.9c-5.7,3.3-7.6,10.6-4.3,16.3,3.3,5.7,10.6,7.6,16.3,4.3,3.7-2.1,5.9-6,5.9-10.3s-2.3-8.2-5.9-10.3M18.6,77.4c-5.4,0-9.7-4.4-9.7-9.7s2.1-7,5.3-8.7l.6-.3V17.5c0-2.1,1.9-3.7,4-3.6,2,0,3.5,1.7,3.6,3.6v41.2l.6.3c4.8,2.4,6.7,8.3,4.3,13.1-1.7,3.3-5,5.3-8.7,5.3"/>
13
+    <path id="Pfad_148" data-name="Pfad 148" class="cls-1" d="M21.4,59.9v-23.4h-5.6v23.4c-4.3,1.5-6.6,6.3-5.1,10.6,1.5,4.3,6.3,6.6,10.6,5.1s6.6-6.3,5.1-10.6c-.8-2.4-2.7-4.2-5.1-5.1"/>
14
+  </g>
15
+</svg>
0 16
\ No newline at end of file
... ...
@@ -54,5 +54,12 @@
54 54
       "shipping": "Kostenloser Versand ab 90€ für unsere <a href=\"/treuekunde-werden\" _target=\"blank\">Treuekunden</a>",
55 55
       "returns": "100 Tage Rückgaberecht"
56 56
     }
57
+  },
58
+  "product-detail": {
59
+    "wine-info": {
60
+      "description": "Beschreibung",
61
+      "food-pairing": "Speiseempfehlung",
62
+      "temperature": "Empfohlene Trinktemperatur"
63
+    }
57 64
   }
58 65
 }
59 66
\ No newline at end of file
60 67
new file mode 100644
... ...
@@ -0,0 +1,30 @@
1
+{% sw_extends '@Storefront/storefront/component/product/description.html.twig' %}
2
+
3
+{% block component_product_description_container %}
4
+    <div id="wine-info">
5
+        <img src="{{ asset('/bundles/weinmanufakturtheme/img/glass_8.svg') }}" role="presentation" alt="Glas">
6
+        <div>
7
+            <h4>{{ "product-detail.wine-info.description"|trans }}</h4>
8
+            <p>{{ product.description }}</p>
9
+        </div>
10
+        <img src="{{ asset('/bundles/weinmanufakturtheme/img/besteck_3.svg') }}" role="presentation" alt="Besteck">
11
+        {% if product.customFields.custom_wine_attributes_speiseempfehlung is not empty %}
12
+            <div>
13
+                <h4>{{ "product-detail.wine-info.food-pairing"|trans }}</h4>
14
+                <p>{{ product.customFields.custom_wine_attributes_speiseempfehlung }}</p>
15
+            </div>
16
+        {% endif %}
17
+        <img src="{{ asset('/bundles/weinmanufakturtheme/img/temp_4.svg') }}" alt="Thermometer">
18
+        {% if product.customFields.custom_wine_attributes_trinktemperatur is not empty %}
19
+            <div>
20
+                <h4>{{ "product-detail.wine-info.temperature"|trans }}</h4>
21
+                <p>{{ product.customFields.custom_wine_attributes_trinktemperatur }} °C</p>
22
+            </div>
23
+        {% endif %}
24
+    </div>
25
+
26
+    {% block component_product_description_content_properties %}
27
+        {{ parent() }}
28
+    {% endblock %}
29
+
30
+{% endblock %}
0 31
\ No newline at end of file
... ...
@@ -3,7 +3,17 @@
3 3
 {% block component_product_properties_container %}
4 4
     <div class="row product-detail-properties-container">
5 5
         {% block component_product_properties_table %}
6
-            {{ parent() }}
6
+            <h3>Eigenschaften</h3>
7
+            <table class="table product-detail-properties-table">
8
+                <tbody>
9
+                {# @var product \Shopware\Core\Content\Product\SalesChannel\SalesChannelProductEntity #}
10
+                {% for group in product.sortedProperties %}
11
+                    {% block component_product_properties_table_row %}
12
+                        {{ parent() }}
13
+                    {% endblock %}
14
+                {% endfor %}
15
+                </tbody>
16
+            </table>
7 17
         {% endblock %}
8 18
     </div>
9 19
 {% endblock %}
10 20
\ No newline at end of file
11 21
new file mode 100644
... ...
@@ -0,0 +1,5 @@
1
+{% sw_extends '@Storefront/storefront/element/cms-element-product-description-reviews.html.twig' %}
2
+
3
+{% block element_product_description_reviews_tabs_navigation %}{% endblock %}
4
+
5
+{% block element_product_description_reviews_tabs_content_review %}{% endblock %}
0 6
\ No newline at end of file