@inject ('reviewHelper', 'Webkul\Product\Helpers\Review') @inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar') @php $list = $toolbarHelper->getCurrentMode() == 'list' ? true : false; $productBaseImage = productimage()->getProductBaseImage($product); $totalReviews = $reviewHelper->getTotalReviews($product); $avgRatings = ceil($reviewHelper->getAverageRating($product)); @endphp {!! view_render_event('bagisto.shop.products.list.card.before', ['product' => $product]) !!} @if (isset($list) && $list)
{{ $product->name }} @if (isset($additionalAttributes) && $additionalAttributes) @if (isset($item->additional['attributes']))
@foreach ($item->additional['attributes'] as $attribute) {{ $attribute['attribute_name'] }} : {{ $attribute['option_label'] }}
@endforeach
@endif @endif
@include ('shop::products.price', ['product' => $product])
@if( $totalReviews )
{{ $totalReviews }} Ratings
@endif
@include ('shop::products.add-to-cart', [ 'addWishlistClass' => 'pl10', 'product' => $product, 'addToCartBtnClass' => 'medium-padding', 'showCompare' => core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false, ])
@else
{{ $product->name }} @if (! $product->getTypeInstance()->haveSpecialPrice() && $product->new)
{{ __('shop::app.products.new') }}
@endif
@include ('shop::products.price', ['product' => $product])
@if ($totalReviews)
{{ __('velocity::app.products.ratings', ['totalRatings' => $totalReviews ]) }}
@else
{{ __('velocity::app.products.be-first-review') }}
@endif
@include ('shop::products.add-to-cart', [ 'product' => $product, 'btnText' => $btnText ?? null, 'moveToCart' => $moveToCart ?? null, 'wishlistMoveRoute' => $wishlistMoveRoute ?? null, 'reloadPage' => $reloadPage ?? null, 'addToCartForm' => $addToCartForm ?? false, 'addToCartBtnClass' => $addToCartBtnClass ?? '', 'showCompare' => core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false, ])
@endif {!! view_render_event('bagisto.shop.products.list.card.after', ['product' => $product]) !!}