forked from rapidez/reviews
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.patch
40 lines (36 loc) · 2.06 KB
/
demo.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
diff --git a/resources/views/listing/partials/item.blade.php b/resources/views/listing/partials/item.blade.php
index 5ac8439..9cc26a9 100644
--- a/resources/views/listing/partials/item.blade.php
+++ b/resources/views/listing/partials/item.blade.php
@@ -9,6 +9,7 @@
<x-rapidez::no-image v-else class="rounded-t h-48 mb-3"/>
<div class="px-2">
<div class="hyphens">@{{ item.name }}</div>
+ <stars class="my-1" v-if="item.reviews_score" :score="item.reviews_score" :count="item.reviews_count"></stars>
@if (!Rapidez::config('catalog/frontend/show_swatches_in_product_list', 1))
<div class="flex items-center space-x-2">
<div class="font-semibold">@{{ (item.special_price || item.price) | price}}</div>
diff --git a/resources/views/product/overview.blade.php b/resources/views/product/overview.blade.php
index 9e6c55a..2978042 100644
--- a/resources/views/product/overview.blade.php
+++ b/resources/views/product/overview.blade.php
@@ -7,7 +7,12 @@
@include('rapidez::product.partials.breadcrumbs')
<div itemtype="https://schema.org/Product" itemscope>
- <h1 class="font-bold text-4xl mb-5" itemprop="name">{{ $product->name }}</h1>
+ <div class="flex items-center mb-5">
+ <h1 class="font-bold text-4xl mr-3" itemprop="name">{{ $product->name }}</h1>
+ @if($product->reviews_score)
+ <stars :score="{{ $product->reviews_score }}" :count="{{ $product->reviews_count }}"></stars>
+ @endif
+ </div>
@include('rapidez::product.partials.microdata')
@@ -39,6 +44,9 @@
@endif
@endforeach
</dl>
+
+ @include('rapidez-reviews::reviews', ['sku' => $product->sku, 'reviews_count' => $product->reviews_count, 'reviews_score' => $product->reviews_score])
+ @include('rapidez-reviews::form', ['sku' => $product->sku])
</div>
<x-rapidez::productlist title="Related products" field="id" :value="$product->relation_ids"/>