@shopbite-de/storefront 1.23.3 → 1.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/.env.example +22 -0
  2. package/.github/workflows/build.yaml +1 -1
  3. package/.github/workflows/ci.yaml +6 -3
  4. package/CLAUDE.md +48 -3
  5. package/README.md +139 -40
  6. package/api-gen.config.json +9 -0
  7. package/api-types/storeApiSchema.shopbite.overrides.json +35 -0
  8. package/api-types/storeApiTypes.d.ts +95 -81
  9. package/app/app.config.ts +3 -2
  10. package/app/app.vue +40 -53
  11. package/app/assets/css/main.css +36 -4
  12. package/app/components/AddToWishlist.vue +13 -6
  13. package/app/components/Address/Fields.vue +2 -21
  14. package/app/components/AnimatedSection.vue +9 -4
  15. package/app/components/BottomNavi.vue +9 -2
  16. package/app/components/Cart/Bar.vue +102 -0
  17. package/app/components/Cart/Item.vue +21 -10
  18. package/app/components/Cart/QuickView.vue +4 -0
  19. package/app/components/Cart/Upsell.vue +106 -0
  20. package/app/components/Category/Header.vue +9 -3
  21. package/app/components/Category/Listing.vue +62 -45
  22. package/app/components/Checkout/PaymentAndDelivery.vue +19 -3
  23. package/app/components/Checkout/Summary.vue +70 -2
  24. package/app/components/Cta.vue +4 -2
  25. package/app/components/DemoBanner.vue +13 -0
  26. package/app/components/Feature/Card.vue +121 -0
  27. package/app/components/Features.vue +14 -9
  28. package/app/components/Food/MarqueeItem.vue +20 -8
  29. package/app/components/Footer/Contact.vue +82 -0
  30. package/app/components/Footer/StoreStatus.vue +30 -0
  31. package/app/components/Footer.vue +2 -1
  32. package/app/components/Header/Body.vue +1 -1
  33. package/app/components/Header/Right.vue +60 -17
  34. package/app/components/Header/Title.vue +1 -0
  35. package/app/components/Header.vue +5 -15
  36. package/app/components/Hero.vue +169 -36
  37. package/app/components/ImageGallery.vue +11 -5
  38. package/app/components/Product/Card.vue +104 -46
  39. package/app/components/Product/CardCompact.vue +72 -0
  40. package/app/components/Product/CardDietBadges.vue +38 -31
  41. package/app/components/Product/CardIngredients.vue +35 -0
  42. package/app/components/Product/CardSkeleton.vue +10 -18
  43. package/app/components/Product/Category.vue +9 -2
  44. package/app/components/Product/Configurator.vue +11 -7
  45. package/app/components/Product/CrossSelling.vue +45 -34
  46. package/app/components/Product/DeselectIngredient.vue +37 -31
  47. package/app/components/Product/Detail.vue +73 -13
  48. package/app/components/Product/QuickView.vue +77 -0
  49. package/app/components/Topseller.vue +44 -34
  50. package/app/components/User/RegistrationForm.vue +0 -1
  51. package/app/components/Wishlist.vue +2 -15
  52. package/app/composables/useAddToCart.ts +13 -40
  53. package/app/composables/useAddressAutocomplete.ts +12 -19
  54. package/app/composables/useAddressSuggestionArea.ts +16 -0
  55. package/app/composables/useAddressValidation.ts +3 -19
  56. package/app/composables/useCartMutations.ts +168 -0
  57. package/app/composables/useCartQuickView.ts +19 -0
  58. package/app/composables/useCartUpsell.ts +100 -0
  59. package/app/composables/{useCategory.ts → useCategoryById.ts} +1 -1
  60. package/app/composables/useCategorySeo.ts +27 -29
  61. package/app/composables/useCheckoutMethodGuard.ts +201 -0
  62. package/app/composables/useMatomo.ts +25 -0
  63. package/app/composables/useMatomoConfig.ts +12 -0
  64. package/app/composables/useMenuSectionSchema.ts +55 -0
  65. package/app/composables/useNavigation.ts +12 -9
  66. package/app/composables/usePageSeo.ts +50 -0
  67. package/app/composables/useProductCartQuantity.ts +15 -0
  68. package/app/composables/useProductCrossSelling.ts +1 -0
  69. package/app/composables/useProductDetail.ts +15 -1
  70. package/app/composables/useProductEvents.ts +30 -0
  71. package/app/composables/useProductQuickView.ts +65 -0
  72. package/app/composables/useRestaurantSchema.ts +64 -0
  73. package/app/composables/useScrollAnimation.ts +39 -8
  74. package/app/composables/useSearchTracking.ts +33 -0
  75. package/app/composables/useSeoUrlRoute.ts +58 -0
  76. package/app/composables/useSortingSelection.ts +28 -0
  77. package/app/composables/useStoreStatus.ts +48 -0
  78. package/app/composables/useTopSellers.ts +22 -0
  79. package/app/composables/useTrackEvent.ts +36 -23
  80. package/app/pages/[...all].vue +4 -4
  81. package/app/pages/account/recover/password/index.vue +1 -0
  82. package/app/pages/anmelden.vue +4 -0
  83. package/app/pages/bestellung/[id]/erfolg.vue +1 -5
  84. package/app/pages/bestellung/[id]/fehler.vue +2 -2
  85. package/app/pages/bestellung/[id]/index.vue +9 -3
  86. package/app/pages/bestellung/bestaetigen.vue +1 -5
  87. package/app/pages/bestellung/warenkorb.vue +1 -5
  88. package/app/pages/bestellung/zahlung-versand.vue +1 -5
  89. package/app/pages/c/[...all].vue +2 -35
  90. package/app/pages/index.vue +28 -14
  91. package/app/pages/kontakt.vue +4 -0
  92. package/app/pages/konto/adressen.vue +4 -0
  93. package/app/pages/konto/bestellung/[id].vue +4 -0
  94. package/app/pages/konto/bestellungen.vue +4 -0
  95. package/app/pages/konto/index.vue +4 -0
  96. package/app/pages/konto/profil.vue +4 -0
  97. package/app/pages/maintenance.vue +6 -0
  98. package/app/pages/merkliste.vue +1 -7
  99. package/app/pages/passwort-vergessen.vue +1 -0
  100. package/app/pages/registrierung/bestaetigen.vue +4 -0
  101. package/app/pages/registrierung/index.vue +4 -0
  102. package/app/pages/speisekarte/[...all].vue +2 -36
  103. package/app/pages/suche.vue +42 -26
  104. package/app/plugins/matomo.ts +35 -0
  105. package/app/types/Association.d.ts +1 -0
  106. package/app/utils/hydrateWhenVisible.ts +20 -0
  107. package/app/utils/media.ts +33 -0
  108. package/app/utils/openingHours.ts +90 -0
  109. package/app/utils/product.ts +31 -0
  110. package/app/utils/schema.ts +235 -0
  111. package/app/utils/seo.ts +56 -0
  112. package/app/utils/seoPath.ts +57 -0
  113. package/content/index.yml +26 -20
  114. package/content.config.ts +16 -0
  115. package/docs/notes/2026-07-05-issue-259-matomo-broken.md +7 -0
  116. package/docs/notes/2026-09-08-issue-240-shipping-method-blocked.md +83 -0
  117. package/docs/notes/2026-09-08-issue-241-cart-lock-conflicts.md +63 -0
  118. package/docs/notes/2026-09-08-issue-244-category-url-trailing-slash.md +65 -0
  119. package/docs/notes/2026-09-08-issue-276-payment-method-blocked.md +39 -0
  120. package/docs/notes/2026-09-08-issue-277-typecheck.md +99 -0
  121. package/docs/notes/2026-09-10-issue-250-animated-section.md +23 -0
  122. package/docs/notes/2026-09-10-issue-251-shop-data-in-base-layer.md +30 -0
  123. package/docs/notes/2026-09-10-issue-272-restaurant-schema.md +27 -0
  124. package/docs/notes/2026-09-10-issue-273-performance-media.md +64 -0
  125. package/docs/notes/2026-09-10-issue-274-seo-basics.md +49 -0
  126. package/docs/notes/2026-09-10-issue-275-accessibility.md +46 -0
  127. package/docs/notes/2026-09-10-issue-290-footer-nap.md +28 -0
  128. package/docs/notes/2026-09-10-issue-291-seo-url-trailing-slash.md +24 -0
  129. package/docs/notes/2026-09-10-issue-294-matomo-without-config.md +33 -0
  130. package/docs/notes/2026-09-10-issue-295-search-hydration-mismatch.md +25 -0
  131. package/docs/notes/2026-09-10-issue-296-track-direct-search.md +19 -0
  132. package/docs/notes/2026-09-10-issue-312-store-api-criteria-post.md +64 -0
  133. package/docs/notes/2026-09-10-issue-313-wishlist-scoped-tailwind.md +29 -0
  134. package/docs/notes/2026-09-10-issue-314-mobile-js-cost.md +119 -0
  135. package/docs/notes/2026-09-12-issue-319-stylesheet-cost.md +154 -0
  136. package/docs/notes/2026-09-12-issue-325-product-card.md +100 -0
  137. package/docs/notes/2026-09-12-issue-327-home-hero.md +64 -0
  138. package/docs/notes/2026-09-13-demo-banner.md +32 -0
  139. package/docs/notes/2026-09-13-issue-332-home-info-cards.md +46 -0
  140. package/docs/notes/2026-09-13-quick-view-flicker.md +65 -0
  141. package/docs/notes/2026-09-14-cart-upsell.md +105 -0
  142. package/docs/notes/2026-09-14-demo-noindex.md +57 -0
  143. package/node.dockerfile +5 -2
  144. package/nuxt.config.ts +98 -15
  145. package/package.json +5 -3
  146. package/patches/@shopware__nuxt-module@1.5.1.patch +32 -0
  147. package/pnpm-workspace.yaml +2 -0
  148. package/public/hero-poster.webp +0 -0
  149. package/scripts/perf/first-render.mjs +30 -0
  150. package/scripts/perf/h2-proxy.cjs +49 -0
  151. package/scripts/perf/lighthouse.sh +22 -0
  152. package/scripts/perf/quick-view-layout.mjs +126 -0
  153. package/server/api/__sitemap__/urls.get.ts +49 -0
  154. package/server/api/category/[categoryId].get.ts +20 -9
  155. package/server/api/content/home.get.ts +14 -0
  156. package/server/api/content/page.get.ts +22 -0
  157. package/server/api/listing/[categoryId].get.ts +14 -18
  158. package/server/api/product/[productId]/cross-selling.get.ts +3 -9
  159. package/server/api/product/[productId].get.ts +4 -8
  160. package/server/api/search.get.ts +2 -0
  161. package/server/plugins/site-url.ts +13 -0
  162. package/server/plugins/sitemap-trailing-slash.ts +26 -0
  163. package/server/utils/sitemap.ts +60 -0
  164. package/server/utils/storeApi.ts +34 -0
  165. package/shopware.d.ts +35 -11
  166. package/test/e2e/simple-checkout-as-recurring-customer.test.ts +13 -17
  167. package/test/nuxt/AddressFields.test.ts +2 -73
  168. package/test/nuxt/AnimatedSection.test.ts +67 -0
  169. package/test/nuxt/CartBar.test.ts +110 -0
  170. package/test/nuxt/CartItem.test.ts +95 -0
  171. package/test/nuxt/CartUpsell.test.ts +125 -0
  172. package/test/nuxt/DemoBanner.test.ts +12 -0
  173. package/test/nuxt/FooterContact.test.ts +102 -0
  174. package/test/nuxt/FooterStoreStatus.test.ts +48 -0
  175. package/test/nuxt/HeaderRight.test.ts +14 -10
  176. package/test/nuxt/Hero.test.ts +68 -0
  177. package/test/nuxt/PaymentAndDelivery.test.ts +67 -8
  178. package/test/nuxt/RegistrationForm.test.ts +3 -0
  179. package/test/nuxt/useAddToCart.test.ts +37 -17
  180. package/test/nuxt/useAddressAutocomplete.test.ts +2 -38
  181. package/test/nuxt/useAddressSuggestionArea.test.ts +27 -0
  182. package/test/nuxt/useBusinessHours.test.ts +1 -1
  183. package/test/nuxt/useCartMutations.test.ts +225 -0
  184. package/test/nuxt/useCartUpsell.test.ts +126 -0
  185. package/test/nuxt/useCheckoutMethodGuard.test.ts +386 -0
  186. package/test/nuxt/useScrollAnimation.test.ts +55 -49
  187. package/test/nuxt/useSearchTracking.test.ts +71 -0
  188. package/test/nuxt/useSeoUrlRoute.test.ts +93 -0
  189. package/test/nuxt/useStoreStatus.test.ts +77 -0
  190. package/test/nuxt/useTrackEvent.test.ts +127 -0
  191. package/test/unit/media.spec.ts +49 -0
  192. package/test/unit/openingHours.spec.ts +90 -0
  193. package/test/unit/product.spec.ts +72 -0
  194. package/test/unit/schema.spec.ts +243 -0
  195. package/test/unit/seo.spec.ts +107 -0
  196. package/test/unit/seoPath.spec.ts +116 -0
  197. package/test/unit/sitemap.spec.ts +88 -0
  198. package/test/unit/useCategorySeo.spec.ts +42 -31
  199. package/test/unit/useSortingSelection.spec.ts +39 -0
  200. package/test/visual/playwright.config.ts +33 -0
  201. package/test/visual/visual.spec.ts +87 -0
  202. package/app/components/Product/CardDescription.vue +0 -27
  203. package/app/components/Product/CardFooter.vue +0 -51
  204. package/app/composables/useValidCitiesForDelivery.ts +0 -12
@@ -4,20 +4,42 @@ export type useTopSellersReturn = {
4
4
  loadTopSellers(): Promise<Schemas["Product"][]>;
5
5
  };
6
6
 
7
+ const TOP_SELLERS_LIMIT = 8;
8
+
7
9
  export function useTopSellers(): useTopSellersReturn {
8
10
  const { apiClient } = useShopwareContext();
9
11
  async function loadTopSellers() {
10
12
  try {
11
13
  const result = await apiClient.invoke("readProduct post /product", {
14
+ // Variants marked as top sellers inherit name, cover and properties.
15
+
16
+ // @ts-expect-error sw-inheritance is missing from the generated header type
17
+ headers: { "sw-inheritance": "true" },
12
18
  body: {
13
19
  filter: [{ type: "equals", field: "markAsTopseller", value: true }],
20
+ limit: TOP_SELLERS_LIMIT,
21
+ // What the compact card and the quick view need (#327).
14
22
  includes: {
15
23
  product: [
24
+ "id",
16
25
  "productNumber",
17
26
  "name",
27
+ "translated",
18
28
  "description",
19
29
  "calculatedPrice",
30
+ "available",
31
+ "cover",
32
+ "sortedProperties",
20
33
  ],
34
+ product_media: ["media"],
35
+ media: ["url", "thumbnails"],
36
+ media_thumbnail: ["width", "url"],
37
+ property_group: ["id", "name", "translated", "options"],
38
+ property_group_option: ["id", "name", "translated"],
39
+ },
40
+ associations: {
41
+ cover: { associations: { media: {} } },
42
+ properties: { associations: { group: {} } },
21
43
  },
22
44
  },
23
45
  });
@@ -1,23 +1,43 @@
1
1
  import type { Schemas } from "#shopware";
2
2
 
3
+ type MatomoWindow = Window & { _paq?: unknown[][] };
4
+
3
5
  export function useTrackEvent() {
4
- const { proxy } = useScriptMatomoAnalytics();
6
+ const { enabled } = useMatomoConfig();
7
+
8
+ // Commands go into Matomo's `_paq` queue; matomo.js processes what was
9
+ // pushed before it loaded, so tracking does not depend on the script (which
10
+ // `plugins/matomo.ts` loads after `onNuxtReady`, #314). Tracking is a no-op
11
+ // when Matomo is not configured (#294).
12
+ function push(command: unknown[]) {
13
+ if (!enabled || import.meta.server) return;
14
+ const matomoWindow = window as MatomoWindow;
15
+ (matomoWindow._paq ??= []).push(command);
16
+ }
17
+
18
+ // Page views are pushed by `plugins/matomo.ts` (initial page and every
19
+ // `page:finish`), not by the registry's page watcher.
20
+ function trackPageView(path: string) {
21
+ push(["setCustomUrl", path]);
22
+ push(["setDocumentTitle", document.title]);
23
+ push(["trackPageView"]);
24
+ }
5
25
 
6
26
  function trackProductView(product: Schemas["Product"]) {
7
- proxy._paq.push([
27
+ push([
8
28
  "setEcommerceView",
9
29
  product.productNumber,
10
30
  product.translated.name ?? product.name,
11
31
  product.seoCategory?.name ?? false,
12
32
  product.calculatedPrice.unitPrice,
13
33
  ]);
14
- proxy._paq.push(["trackPageView", product.productNumber]);
34
+ push(["trackPageView", product.productNumber]);
15
35
  }
16
36
 
17
37
  function trackOrder(order: Schemas["Order"]) {
18
38
  order.lineItems?.forEach((item) => {
19
39
  if (item.type === "container") return;
20
- proxy._paq.push([
40
+ push([
21
41
  "addEcommerceItem",
22
42
  item.product?.productNumber ?? item.id,
23
43
  item.label,
@@ -27,41 +47,34 @@ export function useTrackEvent() {
27
47
  ]);
28
48
  });
29
49
 
30
- proxy._paq.push([
31
- "trackEcommerceOrder",
32
- order.orderNumber,
33
- order.price.totalPrice,
34
- ]);
50
+ push(["trackEcommerceOrder", order.orderNumber, order.price.totalPrice]);
35
51
  }
36
52
 
37
53
  function trackAddToWishlist(product: Schemas["Product"]) {
38
- proxy._paq.push([
39
- "trackEvent",
40
- "Product",
41
- "AddToWishlist",
42
- product.productNumber,
43
- ]);
54
+ push(["trackEvent", "Product", "AddToWishlist", product.productNumber]);
44
55
  }
45
56
 
46
57
  function trackAddToCart(product: Schemas["Product"], quantity: number) {
47
- proxy._paq.push([
48
- "trackEvent",
49
- "Cart",
50
- "AddToCart",
51
- product.productNumber,
52
- quantity,
53
- ]);
58
+ push(["trackEvent", "Cart", "AddToCart", product.productNumber, quantity]);
59
+ }
60
+
61
+ // A separate action, so the cart suggestions are measurable apart from
62
+ // regular adds (#338).
63
+ function trackUpsellAdd(product: Schemas["Product"], quantity: number) {
64
+ push(["trackEvent", "Cart", "UpsellAdd", product.productNumber, quantity]);
54
65
  }
55
66
 
56
67
  function trackSearch(term: string, productNumbers: string[]) {
57
- proxy._paq.push(["trackSiteSearch", term, false, productNumbers.length]);
68
+ push(["trackSiteSearch", term, false, productNumbers.length]);
58
69
  }
59
70
 
60
71
  return {
72
+ trackPageView,
61
73
  trackProductView,
62
74
  trackOrder,
63
75
  trackAddToWishlist,
64
76
  trackAddToCart,
77
+ trackUpsellAdd,
65
78
  trackSearch,
66
79
  };
67
80
  }
@@ -1,10 +1,10 @@
1
1
  <script setup>
2
2
  const route = useRoute();
3
+ // Server route instead of queryCollection(): keeps the SQLite WASM client
4
+ // out of client-side navigations (#314).
3
5
  const { data: page, error } = await useAsyncData(
4
6
  `landingpages-${route.path}`,
5
- () => {
6
- return queryCollection("landingpages").path(route.path).first();
7
- },
7
+ () => $fetch("/api/content/page", { query: { path: route.path } }),
8
8
  );
9
9
 
10
10
  if (error.value || !page.value) {
@@ -15,7 +15,7 @@ if (error.value || !page.value) {
15
15
  });
16
16
  }
17
17
 
18
- useSeoMeta({
18
+ usePageSeo({
19
19
  title: page.value?.title,
20
20
  description: page.value?.description,
21
21
  });
@@ -3,6 +3,7 @@ import * as z from "zod";
3
3
  import type { FormSubmitEvent } from "@nuxt/ui";
4
4
 
5
5
  useHead({
6
+ title: "Passwort zurücksetzen",
6
7
  meta: [
7
8
  { name: "robots", content: "noindex, nofollow" },
8
9
  { name: "googlebot", content: "noindex, nofollow" },
@@ -1,6 +1,10 @@
1
1
  <script setup lang="ts">
2
2
  import { useWishlist } from "@shopware/composables";
3
3
 
4
+ useSeoMeta({
5
+ title: "Anmelden",
6
+ });
7
+
4
8
  const { isLoggedIn } = useUser();
5
9
  const { mergeWishlistProducts } = useWishlist();
6
10
 
@@ -1,10 +1,6 @@
1
1
  <script setup lang="ts">
2
- const {
3
- public: { site },
4
- } = useRuntimeConfig();
5
-
6
2
  useSeoMeta({
7
- title: `Zahlung erfolgreich | ${site.name}`,
3
+ title: "Zahlung erfolgreich",
8
4
  robots: "noindex, nofollow",
9
5
  });
10
6
 
@@ -3,11 +3,11 @@ import { useOrderPayment, useOrderDetails } from "@shopware/composables";
3
3
  import type { Schemas } from "#shopware";
4
4
 
5
5
  const {
6
- public: { site, storeUrl },
6
+ public: { storeUrl },
7
7
  } = useRuntimeConfig();
8
8
 
9
9
  useSeoMeta({
10
- title: `Zahlung fehlgeschlagen | ${site.name}`,
10
+ title: "Zahlung fehlgeschlagen",
11
11
  robots: "noindex, nofollow",
12
12
  });
13
13
 
@@ -9,9 +9,15 @@ interface OrderRouteParams extends RouteParams {
9
9
  id: string;
10
10
  }
11
11
 
12
+ useSeoMeta({
13
+ title: "Bestellung",
14
+ });
15
+
12
16
  const route = useRoute();
13
17
  const { id } = route.params as OrderRouteParams;
14
18
  const { order, loadOrderDetails, status } = useOrderDetails(id);
19
+ // Shop phone number for the "call us" card; hidden without one (#251).
20
+ const { site } = useRuntimeConfig().public;
15
21
 
16
22
  const isLoadingData = ref(true);
17
23
 
@@ -55,7 +61,7 @@ const links = ref<ButtonProps[]>([
55
61
  />
56
62
  <UPageBody>
57
63
  <OrderDetail :order="order" :status="status ?? 'laden...'" />
58
- <UCard class="mt-6">
64
+ <UCard v-if="site.telephone" class="mt-6">
59
65
  <div
60
66
  class="flex flex-col sm:flex-row items-start sm:items-center gap-4"
61
67
  >
@@ -67,9 +73,9 @@ const links = ref<ButtonProps[]>([
67
73
  </p>
68
74
  </div>
69
75
  <UButton
70
- label="Jetzt anrufen"
76
+ :label="`Jetzt anrufen: ${site.telephone}`"
71
77
  color="primary"
72
- to="tel:+4917623456789"
78
+ :to="toTelHref(site.telephone)"
73
79
  icon="i-lucide-phone"
74
80
  shrink-0
75
81
  />
@@ -1,10 +1,6 @@
1
1
  <script setup lang="ts">
2
- const {
3
- public: { site },
4
- } = useRuntimeConfig();
5
-
6
2
  useSeoMeta({
7
- title: `Prüfen & Bestellen | ${site.name}`,
3
+ title: "Prüfen & Bestellen",
8
4
  robots: "noindex, nofollow",
9
5
  });
10
6
 
@@ -1,10 +1,6 @@
1
1
  <script setup lang="ts">
2
- const {
3
- public: { site },
4
- } = useRuntimeConfig();
5
-
6
2
  useSeoMeta({
7
- title: `Warenkorb | ${site.name}`,
3
+ title: "Warenkorb",
8
4
  robots: "noindex, nofollow",
9
5
  });
10
6
 
@@ -1,10 +1,6 @@
1
1
  <script setup lang="ts">
2
- const {
3
- public: { site },
4
- } = useRuntimeConfig();
5
-
6
2
  useSeoMeta({
7
- title: `Zahlung & Versand | ${site.name}`,
3
+ title: "Zahlung & Versand",
8
4
  robots: "noindex, nofollow",
9
5
  });
10
6
 
@@ -6,42 +6,9 @@ definePageMeta({
6
6
  });
7
7
 
8
8
  const { clearBreadcrumbs } = useBreadcrumbs();
9
- const { resolvePath } = useNavigationSearch();
10
- const route = useRoute();
11
- const routePath = route.path;
9
+ const { seoUrl } = await useSeoUrlRoute();
12
10
 
13
- const { data: seoResult, error } = await useAsyncData(
14
- `cmsResponse${routePath}`,
15
- async () => {
16
- // For client links if the history state contains seo url information we can omit the api call
17
- if (import.meta.client) {
18
- if (history.state?.routeName) {
19
- return {
20
- routeName: history.state?.routeName,
21
- foreignKey: history.state?.foreignKey,
22
- };
23
- }
24
- }
25
- const seoUrl = await resolvePath(routePath);
26
-
27
- if (!seoUrl?.foreignKey) {
28
- throw createError({
29
- statusCode: 404,
30
- statusMessage: `No data fetched from API for ${routePath}`,
31
- });
32
- }
33
-
34
- return seoUrl;
35
- },
36
- );
37
-
38
- if (error.value) {
39
- throw error.value;
40
- }
41
-
42
- const { foreignKey } = useNavigationContext(
43
- seoResult as Ref<Schemas["SeoUrl"]>,
44
- );
11
+ const { foreignKey } = useNavigationContext(seoUrl as Ref<Schemas["SeoUrl"]>);
45
12
 
46
13
  onBeforeRouteLeave(() => {
47
14
  clearBreadcrumbs();
@@ -1,6 +1,8 @@
1
1
  <script setup lang="ts">
2
+ // Server route instead of queryCollection(): keeps the SQLite WASM client
3
+ // out of client-side navigations (#314).
2
4
  const { data: page } = await useAsyncData("index", () =>
3
- queryCollection("home").first(),
5
+ $fetch("/api/content/home"),
4
6
  );
5
7
  if (!page.value) {
6
8
  throw createError({
@@ -10,32 +12,44 @@ if (!page.value) {
10
12
  });
11
13
  }
12
14
 
13
- const config = useRuntimeConfig();
15
+ const { site } = useRuntimeConfig().public;
16
+ const homeSite = {
17
+ name: site.name,
18
+ city: site.address.city,
19
+ cuisine: site.cuisine,
20
+ };
14
21
 
15
- useSeoMeta({
16
- title: page.value.seo?.title || page.value.title,
17
- ogTitle: page.value.seo?.title || page.value.title,
18
- twitterTitle: page.value.seo?.title || page.value.title,
19
- description: page.value.seo?.description || page.value.description,
20
- ogDescription: page.value.seo?.description || page.value.description,
21
- twitterDescription: page.value.seo?.description || page.value.description,
22
- twitterCard: "summary",
23
- ogImage: page.value.seo?.image as string | undefined,
24
- twitterImage: page.value.seo?.image as string | undefined,
25
- ogUrl: config.public.storeUrl,
22
+ // Nuxt Content fills seo.title/description from title/description, so only
23
+ // values that differ from those were set explicitly for search engines.
24
+ const { seo, title, description } = page.value;
25
+ const customTitle = seo?.title !== title ? seo?.title : undefined;
26
+ const customDescription =
27
+ seo?.description !== description ? seo?.description : undefined;
28
+
29
+ usePageSeo({
30
+ title: customTitle || buildHomeTitle(homeSite),
31
+ description:
32
+ customDescription || buildHomeDescription(homeSite) || description,
33
+ image: seo?.image as string | undefined,
34
+ standalone: true,
26
35
  });
36
+
37
+ useRestaurantSchema();
27
38
  </script>
28
39
  <template>
29
40
  <div v-if="page" class="relative">
30
41
  <Hero
31
- :title="page.title"
42
+ :title="page.hero.title || page.title"
32
43
  :background-video="page.hero.backgroundVideo"
44
+ :poster="page.hero.poster"
33
45
  :description="page.description"
34
46
  :headline="page.hero.headline"
35
47
  :links="page.hero.links"
36
48
  :usps="page.hero.usps"
37
49
  />
38
50
 
51
+ <Topseller />
52
+
39
53
  <USeparator :ui="{ border: 'border-primary/30' }" />
40
54
 
41
55
  <Features
@@ -9,6 +9,10 @@ if (config.public.shopBite.feature.contactForm !== true) {
9
9
  fatal: true,
10
10
  });
11
11
  }
12
+
13
+ useSeoMeta({
14
+ title: "Kontakt",
15
+ });
12
16
  </script>
13
17
 
14
18
  <template>
@@ -5,6 +5,10 @@ definePageMeta({
5
5
  layout: "account",
6
6
  });
7
7
 
8
+ useSeoMeta({
9
+ title: "Adressen",
10
+ });
11
+
8
12
  const toast = useToast();
9
13
  const { userDefaultShippingAddress, userDefaultBillingAddress, refreshUser } =
10
14
  useUser();
@@ -9,6 +9,10 @@ definePageMeta({
9
9
  layout: "account",
10
10
  });
11
11
 
12
+ useSeoMeta({
13
+ title: "Bestellung",
14
+ });
15
+
12
16
  interface OrderRouteParams extends RouteParams {
13
17
  id: string;
14
18
  }
@@ -5,6 +5,10 @@ definePageMeta({
5
5
  layout: "account",
6
6
  });
7
7
 
8
+ useSeoMeta({
9
+ title: "Meine Bestellungen",
10
+ });
11
+
8
12
  const { orders, loadOrders } = useCustomerOrders();
9
13
 
10
14
  onMounted(() => {
@@ -3,6 +3,10 @@ definePageMeta({
3
3
  layout: "account",
4
4
  });
5
5
 
6
+ useSeoMeta({
7
+ title: "Mein Konto",
8
+ });
9
+
6
10
  const { user, userDefaultShippingAddress, userDefaultBillingAddress } =
7
11
  useUser();
8
12
  </script>
@@ -7,6 +7,10 @@ definePageMeta({
7
7
  layout: "account",
8
8
  });
9
9
 
10
+ useSeoMeta({
11
+ title: "Profil",
12
+ });
13
+
10
14
  const { apiClient } = useShopwareContext();
11
15
  const loading = ref(true);
12
16
  const { user, refreshUser, updatePersonalInfo, updateEmail, logout } =
@@ -1,3 +1,9 @@
1
+ <script setup lang="ts">
2
+ useSeoMeta({
3
+ title: "Wartungsmodus",
4
+ });
5
+ </script>
6
+
1
7
  <template>
2
8
  <div class="min-h-screen flex items-center justify-center p-6 text-center">
3
9
  <div>
@@ -1,12 +1,6 @@
1
1
  <script setup lang="ts">
2
- const {
3
- public: { site },
4
- } = useRuntimeConfig();
5
-
6
- const pageTitle = computed(() => `Merkliste | ${site?.name}`);
7
-
8
2
  useSeoMeta({
9
- title: pageTitle,
3
+ title: "Merkliste",
10
4
  });
11
5
  </script>
12
6
 
@@ -3,6 +3,7 @@ import * as z from "zod";
3
3
  import type { FormSubmitEvent } from "@nuxt/ui";
4
4
 
5
5
  useHead({
6
+ title: "Passwort vergessen",
6
7
  meta: [
7
8
  { name: "robots", content: "noindex, nofollow" },
8
9
  { name: "googlebot", content: "noindex, nofollow" },
@@ -1,4 +1,8 @@
1
1
  <script setup lang="ts">
2
+ useSeoMeta({
3
+ title: "Registrierung bestätigen",
4
+ });
5
+
2
6
  const route = useRoute();
3
7
  const toast = useToast();
4
8
 
@@ -1,4 +1,8 @@
1
1
  <script setup lang="ts">
2
+ useSeoMeta({
3
+ title: "Registrieren",
4
+ });
5
+
2
6
  const { isLoggedIn } = useUser();
3
7
 
4
8
  if (import.meta.client && isLoggedIn.value) {
@@ -1,4 +1,3 @@
1
- H
2
1
  <script setup lang="ts">
3
2
  import type { Schemas } from "#shopware";
4
3
 
@@ -7,42 +6,9 @@ definePageMeta({
7
6
  });
8
7
 
9
8
  const { clearBreadcrumbs } = useBreadcrumbs();
10
- const { resolvePath } = useNavigationSearch();
11
- const route = useRoute();
12
- const routePath = route.path;
9
+ const { seoUrl } = await useSeoUrlRoute();
13
10
 
14
- const { data: seoResult, error } = await useAsyncData(
15
- `cmsResponse${routePath}`,
16
- async () => {
17
- // For client links if the history state contains seo url information we can omit the api call
18
- if (import.meta.client) {
19
- if (history.state?.routeName) {
20
- return {
21
- routeName: history.state?.routeName,
22
- foreignKey: history.state?.foreignKey,
23
- };
24
- }
25
- }
26
- const seoUrl = await resolvePath(routePath);
27
-
28
- if (!seoUrl?.foreignKey) {
29
- throw createError({
30
- statusCode: 404,
31
- statusMessage: `No data fetched from API for ${routePath}`,
32
- });
33
- }
34
-
35
- return seoUrl;
36
- },
37
- );
38
-
39
- if (error.value) {
40
- throw error.value;
41
- }
42
-
43
- const { foreignKey } = useNavigationContext(
44
- seoResult as Ref<Schemas["SeoUrl"]>,
45
- );
11
+ const { foreignKey } = useNavigationContext(seoUrl as Ref<Schemas["SeoUrl"]>);
46
12
 
47
13
  onBeforeRouteLeave(() => {
48
14
  clearBreadcrumbs();