rapidez / reviews
Rapidez Reviews
Installs: 3 409
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 5
Open Issues: 1
Language:Blade
Requires
- php: ^8.0|^8.1|^8.2
- illuminate/database: ^9.0|^10.0|^11.0
- illuminate/support: ^9.0|^10.0|^11.0
- illuminate/view: ^9.0|^10.0|^11.0
- rapidez/core: ~0.57|^1.0|^2.0
README
Installation
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
Configuration
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
Product page
Review stars
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.
Review list
The review list can be added with:
@include('rapidez-reviews::reviews', [ 'sku' => $product->sku, 'reviews_count' => $product->reviews_count, 'reviews_score' => $product->reviews_score, ])
Review form
And the form to add a review:
@include('rapidez-reviews::form', ['sku' => $product->sku])
Product listing
Review stars
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>
Views
If you need to change the views you can publish them with:
php artisan vendor:publish --provider="Rapidez\Reviews\ReviewsServiceProvider" --tag=views
License
GNU General Public License v3. Please see License File for more information.