Feat: Updating Product imports after Boboko restructure

This commit is contained in:
2026-08-27 11:46:33 +03:00
parent 86c645fb36
commit defe1dab12
6 changed files with 14 additions and 31 deletions
@@ -1,6 +1,6 @@
{{-- $variants: array of Modules\Core\Product\Services\ProductIndexer's mapVariant()
{{-- $variants: array of Modules\Core\Catalog\Services\ProductIndexer's mapVariant()
shape (id, options: [{option, value, meta}], ...) — plain arrays, not Eloquent
models, since this is fed from Modules\Core\Product\Services\ProductService. --}}
models, since this is fed from Modules\Core\Catalog\Services\ProductService. --}}
@props(['variants', 'option' => null])
<div {{ $attributes }}>
+5 -5
View File
@@ -146,7 +146,7 @@ class="absolute bottom-6 right-8 text-white text-sm"
{{ $product['name'] }}
</h1>
<x-reviews-stars :rating="$product['average_rating'] ?? 0" :count="$product['review_count']" :showCount="true" />
<x-reviews-stars :rating="$product['reviews']['average_rating'] ?? 0" :count="$product['reviews']['count']" :showCount="true" />
@if($product['price'] !== null)
<p class="text-2xl font-bold" data-product-form-target="price">
@@ -181,7 +181,7 @@ class="absolute bottom-6 right-8 text-white text-sm"
<x-ui.tabs class="mt-16" size="lg" :tabs="[
['id' => 'description', 'label' => __('storefront.product.description')],
['id' => 'reviews', 'label' => __('storefront.product.reviews') . ' (' . $product['review_count'] . ')'],
['id' => 'reviews', 'label' => __('storefront.product.reviews') . ' (' . $product['reviews']['count'] . ')'],
]">
<x-slot name="description">
<div class="leading-7 [&_p]:mt-4">
@@ -194,9 +194,9 @@ class="absolute bottom-6 right-8 text-white text-sm"
</ul>
</x-slot>
<x-slot name="reviews">
@if(!empty($product['reviews']))
@if(!empty($product['reviews']['items']))
<div class="mb-10">
@foreach($product['reviews'] as $review)
@foreach($product['reviews']['items'] as $review)
<x-review-card :review="[
'rating' => $review['rating'],
'name' => $review['reviewer_name'],
@@ -211,7 +211,7 @@ class="absolute bottom-6 right-8 text-white text-sm"
@endif
<h3 class="text-h4 font-bold">
{{ $product['review_count'] > 0 ? __('storefront.review.write_new') : __('storefront.review.write_first') }}
{{ $product['reviews']['count'] > 0 ? __('storefront.review.write_new') : __('storefront.review.write_first') }}
{{ __('storefront.review.for_product', ['name' => $product['name']]) }}
</h3>