rapidez/reviews 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rapidez/reviews

最新稳定版本:5.0.0

Composer 安装命令:

composer require rapidez/reviews

包简介

Rapidez Reviews

关键字:

README 文档

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 (App::providerIsLoaded('Rapidez\Reviews\ReviewsServiceProvider'))
    @if ($product->reviews_score)
        <x-dynamic-component component="rapidez-reviews::stars" :score="$product->reviews_score :count="$product->reviews_count" />
    @endif
@endif

Review list

The review list can be added with:

@if (App::providerIsLoaded('Rapidez\Reviews\ReviewsServiceProvider'))
    <div class="container my-5">
        @include('rapidez-reviews::reviews')
    </div>
@endif

Microdata

This should be included in resources/views/vendor/rapidez/product/overview.blade.php inside the: <div itemtype="https://schema.org/Product" itemscope>

@if (App::providerIsLoaded('Rapidez\Reviews\ReviewsServiceProvider'))
    @include('rapidez-reviews::components.microdata')
@endif

Product listing

Review stars

Add somewhere in resources/views/category/partials/listing/item.blade.php:

@if (App::providerIsLoaded('Rapidez\Reviews\ReviewsServiceProvider'))
    <x-dynamic-component component="rapidez-reviews::stars" v-if="item.reviews_count" count="item.reviews_count" score="item.reviews_score" />
@endif

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.

统计信息

  • 总下载量: 6.84k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 5
  • 开发语言: Blade

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2021-06-30