@akinon/projectzero 2.0.0-beta.20 → 2.0.0-beta.22

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 (140) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/app-template/CHANGELOG.md +170 -0
  3. package/app-template/next.config.mjs +0 -1
  4. package/app-template/package.json +31 -30
  5. package/app-template/src/app/[pz]/[...prettyurl]/page.tsx +2 -2
  6. package/app-template/src/app/[pz]/account/layout.tsx +2 -1
  7. package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/blog/[slug]/page.tsx +4 -2
  8. package/app-template/src/app/[pz]/category/[pk]/page.tsx +11 -1
  9. package/app-template/src/app/[pz]/group-product/[pk]/page.tsx +2 -2
  10. package/app-template/src/app/[pz]/layout.tsx +3 -1
  11. package/app-template/src/app/[pz]/list/page.tsx +11 -1
  12. package/app-template/src/app/[pz]/page.tsx +13 -35
  13. package/app-template/src/app/[pz]/pages/[slug]/page.tsx +19 -0
  14. package/app-template/src/app/[pz]/product/[pk]/page.tsx +2 -2
  15. package/app-template/src/app/api/barcode-search/route.ts +1 -1
  16. package/app-template/src/app/api/cache/route.ts +1 -1
  17. package/app-template/src/app/api/image-proxy/route.ts +1 -1
  18. package/app-template/src/app/api/logout/route.ts +1 -1
  19. package/app-template/src/app/api/product-categories/route.ts +1 -1
  20. package/app-template/src/app/api/similar-product-list/route.ts +1 -1
  21. package/app-template/src/app/api/similar-products/route.ts +1 -1
  22. package/app-template/src/app/api/virtual-try-on/route.ts +1 -1
  23. package/app-template/src/app/api/web-vitals/route.ts +1 -1
  24. package/app-template/src/components/quantity-selector.tsx +16 -4
  25. package/app-template/src/components/widget-content.tsx +3 -3
  26. package/app-template/src/routes/index.ts +6 -6
  27. package/app-template/src/utils/__tests__/theme-page-context.test.ts +145 -0
  28. package/app-template/src/utils/theme-page-context.ts +309 -0
  29. package/app-template/src/views/basket/basket-item.tsx +107 -691
  30. package/app-template/src/views/basket/index.ts +0 -2
  31. package/app-template/src/views/basket/summary.tsx +75 -496
  32. package/app-template/src/views/breadcrumb.tsx +38 -13
  33. package/app-template/src/views/category/category-header.tsx +66 -289
  34. package/app-template/src/views/category/category-info.tsx +24 -173
  35. package/app-template/src/views/category/filters/index.tsx +48 -208
  36. package/app-template/src/views/category/layout.tsx +5 -7
  37. package/app-template/src/views/checkout/index.tsx +0 -5
  38. package/app-template/src/views/checkout/steps/payment/index.tsx +2 -5
  39. package/app-template/src/views/checkout/steps/payment/options/credit-card/index.tsx +1 -72
  40. package/app-template/src/views/checkout/steps/payment/payment-option-buttons.tsx +40 -171
  41. package/app-template/src/views/checkout/steps/shipping/address-box.tsx +12 -74
  42. package/app-template/src/views/checkout/steps/shipping/addresses.tsx +45 -128
  43. package/app-template/src/views/checkout/steps/shipping/shipping-options.tsx +27 -232
  44. package/app-template/src/views/checkout/summary.tsx +29 -303
  45. package/app-template/src/views/footer.tsx +13 -415
  46. package/app-template/src/views/guest-login/index.tsx +1 -1
  47. package/app-template/src/views/header/action-menu.tsx +45 -277
  48. package/app-template/src/views/header/band.tsx +21 -6
  49. package/app-template/src/views/header/index.tsx +47 -109
  50. package/app-template/src/views/header/mini-basket.tsx +45 -820
  51. package/app-template/src/views/header/navbar.tsx +111 -178
  52. package/app-template/src/views/header/search/index.tsx +32 -71
  53. package/app-template/src/views/header/search/results.tsx +65 -127
  54. package/app-template/src/views/product/accordion-wrapper.tsx +43 -135
  55. package/app-template/src/views/product/index.ts +1 -1
  56. package/app-template/src/views/product/layout.tsx +7 -2
  57. package/app-template/src/views/product/misc-buttons.tsx +25 -339
  58. package/app-template/src/views/product/product-actions.tsx +8 -137
  59. package/app-template/src/views/product/product-info.tsx +31 -69
  60. package/app-template/src/views/product/product-share.tsx +8 -11
  61. package/app-template/src/views/product/slider.tsx +79 -117
  62. package/app-template/src/views/product-item/index.tsx +46 -119
  63. package/app-template/src/widgets/footer-social.tsx +16 -47
  64. package/app-template/src/widgets/footer-subscription/index.tsx +17 -183
  65. package/codemods/migrate-auth-v5/index.js +339 -0
  66. package/codemods/migrate-auth-v5/transform.js +86 -0
  67. package/dist/commands/plugins.js +23 -2
  68. package/package.json +1 -1
  69. package/app-template/src/app/[commerce]/[locale]/[currency]/pages/[slug]/page.tsx +0 -15
  70. package/app-template/src/views/basket/basket-summary-context.tsx +0 -560
  71. package/app-template/src/views/basket/designer-context.tsx +0 -617
  72. package/app-template/src/views/breadcrumb/breadcrumb-client.tsx +0 -190
  73. package/app-template/src/views/breadcrumb/breadcrumb-registrar.tsx +0 -286
  74. package/app-template/src/views/breadcrumb/constants.ts +0 -15
  75. package/app-template/src/views/breadcrumb/index.tsx +0 -127
  76. package/app-template/src/views/category/native-widget-context.tsx +0 -257
  77. package/app-template/src/views/category/product-list-registrar.tsx +0 -665
  78. package/app-template/src/views/checkout/checkout-address-registrar.tsx +0 -254
  79. package/app-template/src/views/checkout/checkout-buttons-registrar.tsx +0 -183
  80. package/app-template/src/views/checkout/checkout-delivery-method-registrar.tsx +0 -259
  81. package/app-template/src/views/checkout/checkout-payment-options-registrar.tsx +0 -253
  82. package/app-template/src/views/checkout/checkout-summary-registrar.tsx +0 -183
  83. package/app-template/src/views/checkout/constants.ts +0 -5
  84. package/app-template/src/views/checkout/steps/payment/options/masterpass-rest.tsx +0 -15
  85. package/app-template/src/views/checkout/steps/payment/options/saved-card.tsx +0 -18
  86. package/app-template/src/views/footer/footer-app-banner-context.tsx +0 -326
  87. package/app-template/src/views/footer/footer-bottom-context.tsx +0 -215
  88. package/app-template/src/views/footer/footer-bottom-wrapper.tsx +0 -74
  89. package/app-template/src/views/footer/footer-layout-constants.ts +0 -35
  90. package/app-template/src/views/footer/footer-layout-registrar.tsx +0 -342
  91. package/app-template/src/views/footer/footer-layout-switcher.tsx +0 -110
  92. package/app-template/src/views/footer/footer-menu-context.tsx +0 -211
  93. package/app-template/src/views/footer/footer-native-widgets.tsx +0 -60
  94. package/app-template/src/views/footer/footer-social-context.tsx +0 -254
  95. package/app-template/src/views/footer/footer-subscription-context.tsx +0 -210
  96. package/app-template/src/views/footer/footer-utils.ts +0 -43
  97. package/app-template/src/views/footer/footer-value-props-context.tsx +0 -326
  98. package/app-template/src/views/footer/logo-settings.ts +0 -183
  99. package/app-template/src/views/footer/native-widget-config.ts +0 -262
  100. package/app-template/src/views/footer/subscription-settings.ts +0 -122
  101. package/app-template/src/views/footer/use-footer-logo.ts +0 -162
  102. package/app-template/src/views/header/designer-context.tsx +0 -261
  103. package/app-template/src/views/header/header-announcement-registrar.tsx +0 -267
  104. package/app-template/src/views/header/header-client-wrapper.tsx +0 -496
  105. package/app-template/src/views/header/header-content.tsx +0 -1026
  106. package/app-template/src/views/header/header-currency-registrar.tsx +0 -348
  107. package/app-template/src/views/header/header-icons-context.tsx +0 -262
  108. package/app-template/src/views/header/header-language-registrar.tsx +0 -348
  109. package/app-template/src/views/header/header-layout-context.tsx +0 -143
  110. package/app-template/src/views/header/header-layout-registrar.tsx +0 -658
  111. package/app-template/src/views/header/header-logo-context.tsx +0 -228
  112. package/app-template/src/views/header/header-logo.tsx +0 -118
  113. package/app-template/src/views/header/header-mini-basket-context.tsx +0 -524
  114. package/app-template/src/views/header/header-search-registrar.tsx +0 -511
  115. package/app-template/src/views/header/header-text-slider-registrar.tsx +0 -382
  116. package/app-template/src/views/header/inline-search.tsx +0 -262
  117. package/app-template/src/views/header/navbar-menu-context.tsx +0 -219
  118. package/app-template/src/views/header/search/search-input.tsx +0 -61
  119. package/app-template/src/views/header/server-settings-parser.ts +0 -1105
  120. package/app-template/src/views/header/use-header-icons.ts +0 -241
  121. package/app-template/src/views/header/use-header-logo.ts +0 -213
  122. package/app-template/src/views/header/use-navbar-menu.ts +0 -179
  123. package/app-template/src/views/product/accordion-section.tsx +0 -61
  124. package/app-template/src/views/product/custom-button-group.tsx +0 -69
  125. package/app-template/src/views/product/favorites-button-section.tsx +0 -69
  126. package/app-template/src/views/product/find-in-store-section.tsx +0 -60
  127. package/app-template/src/views/product/product-info-section.tsx +0 -140
  128. package/app-template/src/views/product/quantity-section.tsx +0 -73
  129. package/app-template/src/views/product/sale-tag.tsx +0 -10
  130. package/app-template/src/views/product/share-section.tsx +0 -357
  131. package/app-template/src/views/product/variants-section.tsx +0 -126
  132. package/app-template/src/views/product-detail/constants.ts +0 -272
  133. package/app-template/src/views/product-detail/index.ts +0 -10
  134. package/app-template/src/views/product-detail/product-detail-registrar.tsx +0 -616
  135. package/app-template/src/widgets/footer-app-banner.tsx +0 -444
  136. package/app-template/src/widgets/footer-bottom.tsx +0 -127
  137. package/app-template/src/widgets/footer-menu-compact.tsx +0 -238
  138. package/app-template/src/widgets/footer-menu-two.tsx +0 -298
  139. package/app-template/src/widgets/footer-social-client.tsx +0 -251
  140. package/app-template/src/widgets/footer-value-props.tsx +0 -201
@@ -1,77 +1,18 @@
1
1
  'use client';
2
2
 
3
3
  import { useMemo } from 'react';
4
- import {
5
- useAutocompleteQuery,
6
- AutocompleteResponse
7
- } from '@akinon/next/data/client/misc';
4
+ import { useAutocompleteQuery } from '@akinon/next/data/client/misc';
8
5
  import { ROUTES } from '@theme/routes';
9
6
 
10
- import { LoaderSpinner, Price, Link, Button } from '@theme/components';
7
+ import { LoaderSpinner, Price, Link } from '@theme/components';
11
8
  import { useDebounce, useLocalization } from '@akinon/next/hooks';
12
9
  import { Image } from '@akinon/next/components/image';
13
- import { SaleTag } from '@theme/views/product/sale-tag';
14
-
15
10
  interface ResultsProps {
16
11
  searchText: string;
17
12
  }
18
13
 
19
14
  const MINIMUM_SEARCH_LENGTH = 3;
20
15
 
21
- type AutocompleteProduct = AutocompleteResponse['groups'][0]['entries'][0];
22
-
23
- function ProductCard({ product }: { product: AutocompleteProduct }) {
24
- const productPk = (product?.extra as unknown as { pk?: number })?.pk || 0;
25
-
26
- const isOnSale =
27
- product?.extra?.retail_price &&
28
- product?.extra?.price &&
29
- parseFloat(String(product.extra.retail_price)) >
30
- parseFloat(String(product.extra.price));
31
- return (
32
- <div className="flex flex-col group w-full">
33
- <div className="relative aspect-square mb-2">
34
- <Link href={product?.url || '#'} className="block w-full h-full">
35
- <Image
36
- src={product?.extra?.image || '/noimage.jpg'}
37
- alt={product?.label || 'Product'}
38
- fill
39
- aspectRatio={200 / 250}
40
- sizes="(max-width: 768px) 170px, 260px"
41
- imageClassName="object-cover transition-transform duration-300"
42
- />
43
- </Link>
44
-
45
- {isOnSale && (
46
- <div className="absolute bottom-4 left-2 z-10">
47
- <SaleTag />
48
- </div>
49
- )}
50
- </div>
51
-
52
- <Link
53
- href={product?.url || '#'}
54
- className="text-sm text-black-750 tracking-[0.28px] leading-[21px] hover:underline"
55
- >
56
- {product?.label}
57
- </Link>
58
-
59
- <div className="flex items-center gap-2">
60
- {isOnSale && (
61
- <Price
62
- value={product?.extra?.retail_price}
63
- className="text-sm text-black-750 tracking-[0.28px] leading-[21px] line-through"
64
- />
65
- )}
66
- <Price
67
- value={product?.extra?.price}
68
- className="text-base text-black-750 tracking-[0.64px] leading-[27.52px]"
69
- />
70
- </div>
71
- </div>
72
- );
73
- }
74
-
75
16
  export default function Results(props: ResultsProps) {
76
17
  const { searchText } = props;
77
18
  const { t } = useLocalization();
@@ -106,80 +47,77 @@ export default function Results(props: ResultsProps) {
106
47
  }
107
48
 
108
49
  if (isLoading || isFetching) {
109
- return (
110
- <div className="flex justify-center py-12">
111
- <LoaderSpinner />
112
- </div>
113
- );
50
+ return <LoaderSpinner />;
114
51
  }
115
52
 
116
53
  if (categories.length === 0 && products.length === 0) {
117
- return (
118
- <p className="text-center text-black-750 py-12">
119
- {t('common.search.not_found')}
120
- </p>
121
- );
54
+ return <p className="text-center">{t('common.search.not_found')}</p>;
122
55
  }
123
56
 
124
57
  return (
125
- <div className="w-full md:px-16 pb-12">
126
- <p className="text-center text-base text-black-750 tracking-[0.64px] leading-[15px]">
127
- {products.length}{' '}
128
- {t('common.search.results_found') || 'results found for'} &ldquo;
129
- {debouncedSearchText}&rdquo;
130
- </p>
131
-
132
- <div className="mt-10 md:mt-16 flex justify-center">
133
- <div className="flex flex-col lg:flex-row gap-8 max-w-[1300px]">
134
- {categories.length > 0 && (
135
- <div className="lg:w-44 shrink-0">
136
- <h6 className="mb-4 text-lg font-normal text-black-750">
137
- {t('common.search.categories')}
138
- </h6>
139
- <ul className="flex flex-col gap-3">
140
- {categories.map((category, index) => (
141
- <li key={index} className="text-sm text-black-750/75">
142
- <Link
143
- href={category.url}
144
- className="hover:text-black-750 hover:underline"
145
- >
146
- {category.label}
147
- </Link>
148
- </li>
149
- ))}
150
- </ul>
151
- </div>
152
- )}
153
-
154
- <div className="flex-1">
155
- <div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-[10px]">
156
- {products.slice(0, 8).map((product, index) => (
157
- <ProductCard
158
- key={
159
- (product?.extra as unknown as { pk?: number })?.pk || index
160
- }
161
- product={product as unknown as AutocompleteProduct}
162
- />
163
- ))}
164
- </div>
165
- </div>
166
- </div>
167
- </div>
168
-
169
- {products.length > 0 && (
170
- <div className="flex justify-center mt-8">
171
- <Button
172
- appearance="outlined"
173
- href={`${ROUTES.LIST}/?search_text=${encodeURIComponent(
174
- debouncedSearchText
175
- )}`}
176
- data-testid="search-view-all"
177
- className="px-10 py-3 border-black text-black hover:bg-black hover:text-white"
178
- >
179
- {t('common.search.view_all')} {debouncedSearchText.toUpperCase()}
180
- </Button>
58
+ <div className="w-full flex flex-wrap gap-4 md:gap-0">
59
+ {categories.length > 0 && (
60
+ <div className="flex flex-col w-44">
61
+ <h6 className="mb-6 font-semibold">
62
+ {t('common.search.categories')}
63
+ </h6>
64
+ <ul className="flex flex-col gap-3">
65
+ {categories.map((category, index) => (
66
+ <li key={index} className="text-sm">
67
+ <Link href={category.url}>{category.label}</Link>
68
+ </li>
69
+ ))}
70
+ </ul>
181
71
  </div>
182
72
  )}
73
+ <div className="flex-1 flex flex-col gap-6">
74
+ <h6 className="font-semibold">
75
+ {t('common.search.products_for')}{' '}
76
+ <span className="text-secondary uppercase">
77
+ {debouncedSearchText}
78
+ </span>
79
+ </h6>
80
+ <div className="grid grid-cols-2 sm:grid-cols-4 gap-8">
81
+ {products.map((product, index) => (
82
+ <Link href={product?.url} key={index} className="flex flex-col">
83
+ <div className="relative aspect-[315/448]">
84
+ {product.extra.image ? (
85
+ <Image
86
+ src={product.extra.image}
87
+ alt={product?.label}
88
+ aspectRatio={274.5 / 390.39}
89
+ fill
90
+ sizes="(min-width: 320px) 164px,
91
+ (min-width: 640px) 50vw,
92
+ (min-width: 1160px) 315px"
93
+ />
94
+ ) : (
95
+ <Image
96
+ className="h-full object-cover"
97
+ src="/noimage.jpg"
98
+ alt={product?.label}
99
+ aspectRatio={274.5 / 390.39}
100
+ fill
101
+ sizes="100vw"
102
+ />
103
+ )}
104
+ </div>
105
+ <span className="text-sm mt-2">{product?.label}</span>
106
+ <Price
107
+ value={product?.extra?.price}
108
+ className="font-semibold text-sm"
109
+ />
110
+ </Link>
111
+ ))}
112
+ </div>
113
+ <Link
114
+ href={`${ROUTES.LIST}/?search_text=${debouncedSearchText}`}
115
+ data-testid="search-view-all"
116
+ className="w-80 py-3 px-10 border border-primary text-center text-xs font-semibold hover:bg-primary hover:text-white transition-all"
117
+ >
118
+ {t('common.search.view_all')} {debouncedSearchText.toUpperCase()}
119
+ </Link>
120
+ </div>
183
121
  </div>
184
122
  );
185
123
  }
@@ -1,151 +1,59 @@
1
1
  'use client';
2
2
 
3
3
  import { useLocalization } from '@akinon/next/hooks';
4
- import React, { useMemo, CSSProperties } from 'react';
4
+ import React from 'react';
5
5
  import { Accordion } from '@theme/components';
6
6
  import InstallmentOptions from '@theme/views/installment-options';
7
- import AccordionSection from './accordion-section';
8
- import { useProductDetail } from '@theme/views/product-detail';
9
7
 
10
8
  export default function AccordionWrapper({ data, deliveryReturn }) {
11
9
  const { t } = useLocalization();
12
- const { accordionStyles } = useProductDetail();
13
-
14
- const iconSize = useMemo(() => {
15
- const size = accordionStyles['icon-size'];
16
- const parsed = parseInt(size);
17
- return !isNaN(parsed) ? parsed : 15;
18
- }, [accordionStyles]);
19
-
20
- const iconColor = useMemo(
21
- () => accordionStyles['icon-color'] || '#6b7280',
22
- [accordionStyles]
23
- );
24
-
25
- const containerStyle = useMemo(
26
- (): CSSProperties => ({
27
- width: '100%',
28
- marginTop: accordionStyles['container-spacing'] || '1rem',
29
- borderColor: accordionStyles['container-border-color'] || 'transparent',
30
- borderWidth: accordionStyles['container-border-width'] || '0',
31
- borderRadius: accordionStyles['container-border-radius'] || '0',
32
- borderStyle: 'solid'
33
- }),
34
- [accordionStyles]
35
- );
36
-
37
- const headerStyle = useMemo(
38
- (): CSSProperties => ({
39
- fontSize: accordionStyles['title-font-size'] || '1rem',
40
- fontWeight: accordionStyles['title-font-weight'] || '600',
41
- color: accordionStyles['title-color'] || '#111827',
42
- backgroundColor:
43
- accordionStyles['title-background-color'] || 'transparent',
44
- paddingLeft: accordionStyles['title-padding-x'] || '1rem',
45
- paddingRight: accordionStyles['title-padding-x'] || '1rem',
46
- paddingTop: accordionStyles['title-padding-y'] || '0.75rem',
47
- paddingBottom: accordionStyles['title-padding-y'] || '0.75rem',
48
- borderBottom: `1px solid ${
49
- accordionStyles['container-border-color'] || '#e5e7eb'
50
- }`
51
- }),
52
- [accordionStyles]
53
- );
54
-
55
- const contentStyle = useMemo(
56
- (): CSSProperties => ({
57
- fontSize: accordionStyles['content-font-size'] || '0.875rem',
58
- fontWeight: accordionStyles['content-font-weight'] || '400',
59
- color: accordionStyles['content-color'] || '#6b7280',
60
- backgroundColor:
61
- accordionStyles['content-background-color'] || 'transparent',
62
- paddingLeft: accordionStyles['content-padding-x'] || '1rem',
63
- paddingRight: accordionStyles['content-padding-x'] || '1rem',
64
- paddingTop: accordionStyles['content-padding-y'] || '0.75rem',
65
- paddingBottom: accordionStyles['content-padding-y'] || '0.75rem'
66
- }),
67
- [accordionStyles]
68
- );
69
10
 
70
11
  const generateHtml = (data: string) => {
71
12
  return { __html: data };
72
13
  };
73
14
 
74
15
  return (
75
- <AccordionSection>
76
- <div style={containerStyle}>
77
- <div style={headerStyle} className="accordion-header">
78
- <Accordion
79
- title={t('product.details_care')}
80
- icons={['minus', 'plus']}
81
- iconSize={iconSize}
82
- iconColor={iconColor}
83
- isCollapse={false}
84
- className="border-none"
85
- >
86
- <div style={contentStyle}>
87
- {t('product.product_code')}: {data.product.sku} -{' '}
88
- {data.product.base_code}
89
- {data.product.attributes.integration_ProductAtt03Desc &&
90
- data.product.attributes.integration_ProductAtt03Desc}
91
- {data.product.attributes.integration_kumas_icerik &&
92
- data.product.attributes.integration_kumas_icerik}
93
- {data.product.attributes.model_olculeri &&
94
- data.product.attributes.model_olculeri}
95
- {data.product.attributes.aciklama && (
96
- <div
97
- dangerouslySetInnerHTML={generateHtml(
98
- data.product.attributes.aciklama
99
- )}
100
- />
101
- )}
102
- </div>
103
- </Accordion>
104
- </div>
105
-
106
- <div style={headerStyle} className="accordion-header">
107
- <Accordion
108
- title={t('product.delivery_collections')}
109
- icons={['minus', 'plus']}
110
- iconSize={iconSize}
111
- iconColor={iconColor}
112
- isCollapse={false}
113
- className="border-none"
114
- >
115
- <div style={contentStyle}>
116
- <div
117
- dangerouslySetInnerHTML={generateHtml(
118
- deliveryReturn?.product_delivery_returns?.value
119
- )}
120
- />
121
- </div>
122
- </Accordion>
123
- </div>
124
-
125
- <div style={headerStyle} className="accordion-header">
126
- <Accordion
127
- title={t('product.installment_options')}
128
- icons={['minus', 'plus']}
129
- iconSize={iconSize}
130
- iconColor={iconColor}
131
- isCollapse={false}
132
- className="border-none"
133
- >
134
- <div style={contentStyle}>
135
- <InstallmentOptions productPk={data.product.pk} />
136
- </div>
137
- </Accordion>
138
- </div>
139
- </div>
140
- <style jsx global>{`
141
- .accordion-header:hover {
142
- background-color: ${accordionStyles['hover-background-color'] ||
143
- '#f9fafb'};
144
- color: ${accordionStyles['hover-title-color'] ||
145
- accordionStyles['title-color'] ||
146
- '#111827'};
147
- }
148
- `}</style>
149
- </AccordionSection>
16
+ <div className="w-full">
17
+ <Accordion
18
+ title={t('product.details_care')}
19
+ icons={['minus', 'plus']}
20
+ iconSize={15}
21
+ >
22
+ {t('product.product_code')}: {data.product.sku} -{' '}
23
+ {data.product.base_code}
24
+ {data.product.attributes.integration_ProductAtt03Desc &&
25
+ data.product.attributes.integration_ProductAtt03Desc}
26
+ {data.product.attributes.integration_kumas_icerik &&
27
+ data.product.attributes.integration_kumas_icerik}
28
+ {data.product.attributes.model_olculeri &&
29
+ data.product.attributes.model_olculeri}
30
+ {data.product.attributes.aciklama && (
31
+ <div
32
+ dangerouslySetInnerHTML={generateHtml(
33
+ data.product.attributes.aciklama
34
+ )}
35
+ />
36
+ )}
37
+ </Accordion>
38
+ <Accordion
39
+ title={t('product.delivery_collections')}
40
+ icons={['minus', 'plus']}
41
+ iconSize={15}
42
+ >
43
+ <div
44
+ dangerouslySetInnerHTML={generateHtml(
45
+ deliveryReturn?.product_delivery_returns?.value
46
+ )}
47
+ />
48
+ </Accordion>
49
+
50
+ <Accordion
51
+ title={t('product.installment_options')}
52
+ icons={['minus', 'plus']}
53
+ iconSize={15}
54
+ >
55
+ <InstallmentOptions productPk={data.product.pk} />
56
+ </Accordion>
57
+ </div>
150
58
  );
151
59
  }
@@ -1,7 +1,7 @@
1
1
  export { default as PriceWrapper } from './price-wrapper';
2
2
  export { default as Variant } from './variant';
3
3
  export { default as ProductInfo } from './product-info';
4
- export { default as ProductShare } from './product-share';
4
+ export { ProductShare } from './product-share';
5
5
  export { default as ProductGroupInfo } from './product-group-info';
6
6
  export { default as MiscButtons } from './misc-buttons';
7
7
  export { default as ProductInfoSlider } from './slider';
@@ -1,7 +1,8 @@
1
1
  import Breadcrumb from '@theme/views/breadcrumb';
2
2
  import { ProductInfoSlider } from '@theme/views/product';
3
- import ThemePlaceholder from '@akinon/next/components/theme-editor/theme-placeholder';
3
+ import ThemePlaceholder from '@akinon/pz-theme/src/theme-placeholder';
4
4
  import { BreadcrumbResultType, ProductResult } from '@akinon/next/types';
5
+ import { buildProductPageContext } from '@theme/utils/theme-page-context';
5
6
 
6
7
  interface DeliveryReturnItem {
7
8
  product_delivery_returns?: {
@@ -22,6 +23,7 @@ export default async function ProductLayout({
22
23
  breadcrumbData,
23
24
  children
24
25
  }: ProductPageProps) {
26
+ const productPageContext = buildProductPageContext(data);
25
27
  const categoryIds = breadcrumbData
26
28
  ?.map((item) => item.extra_context?.attributes?.category_id)
27
29
  .filter(Boolean)
@@ -49,7 +51,10 @@ export default async function ProductLayout({
49
51
  <div className="w-full">{children}</div>
50
52
  </div>
51
53
  </div>
52
- <ThemePlaceholder slug="product-page-new" />
54
+ <ThemePlaceholder
55
+ slug="product-page-new"
56
+ pageContext={productPageContext}
57
+ />
53
58
  </div>
54
59
  );
55
60
  }