composer require rapidez/reviews
If you haven't published the Rapidez views yet, publish them with:
php artisan vendor:publish --provider="Rapidez\Core\RapidezServiceProvider" --tag=views
If you'd like to show product reviews on out-of-stock product pages you need to enable this setting in Magento:
Stores > Settings > Configuration > Catalog > Inventory > Stock Options > Display Out of Stock Products
Add the stars where you'd like in resources/views/vendor/rapidez/product/overview.blade.php
:
@if($product->reviews_score)
<stars :score="{{ $product->reviews_score }}" :count="{{ $product->reviews_count }}"></stars>
@endif
Optionally you can change the classes with the
class-star
,class-star-inactive
andclass-count
props.
The review list can be added with:
@include('rapidez-reviews::reviews', [
'sku' => $product->sku,
'reviews_count' => $product->reviews_count,
'reviews_score' => $product->reviews_score,
])
And the form to add a review:
@include('rapidez-reviews::form', ['sku' => $product->sku])
Add somewhere in resources/views/category/partials/listing/item.blade.php
:
<stars v-if="item.reviews_score" :score="item.reviews_score" :count="item.reviews_count"></stars>
If you need to change the views you can publish them with:
php artisan vendor:publish --provider="Rapidez\Reviews\ReviewsServiceProvider" --tag=views
GNU General Public License v3. Please see License File for more information.