@php /** * Rich vendor card rendered inside the product-detail "Vendor" tab/accordion. * Mirrors shofy's vendor-info layout but uses amerce icon classes + link styles. * * Inputs: * $store \Botble\Marketplace\Models\Store (required) */ $vendorCardEnabled = is_plugin_active('marketplace') && isset($store) && $store && ! empty($store->name); $reviewsEnabled = $vendorCardEnabled && is_plugin_active('ecommerce') && \Botble\Ecommerce\Facades\EcommerceHelper::isReviewEnabled(); $hideRatingNoReviews = $reviewsEnabled && method_exists(\Botble\Ecommerce\Facades\EcommerceHelper::class, 'hideRatingWhenNoReviews') && \Botble\Ecommerce\Facades\EcommerceHelper::hideRatingWhenNoReviews(); $reviewsCount = $reviewsEnabled ? (int) $store->reviews()->count() : 0; $showRating = $reviewsEnabled && (! $hideRatingNoReviews || $reviewsCount > 0); @endphp @if ($vendorCardEnabled)
{!! RvMedia::image( $store->logo_url ?? $store->logo, $store->name, 'thumb', true, ['class' => 'rounded-circle', 'style' => 'width: 70px; height: 70px; object-fit: cover;'] ) !!}
{{ $store->name }} @if (! empty($store->badge)) {!! BaseHelper::clean($store->badge) !!} @endif
@if ($showRating)
@includeIf(EcommerceHelper::viewPath('includes.rating-star'), ['avg' => (float) ($store->reviews()->avg('star') ?? 0)]) @if ($reviewsCount === 1) ({{ __('1 Review') }}) @else ({{ __(':count Reviews', ['count' => number_format($reviewsCount)]) }}) @endif
@endif @if ($store->created_at) @endif
@php $blurb = ! empty($store->description) ? $store->description : (! empty($store->content) ? Str::words(strip_tags($store->content), 50) : ''); @endphp @if ($blurb)

{!! BaseHelper::clean($blurb) !!}

@endif {{ __('Visit store') }}
@endif