Skip to content

Roene-JustBetter/reviews

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rapidez Reviews

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 and class-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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Blade 48.1%
  • Vue 31.7%
  • PHP 18.0%
  • JavaScript 2.2%