php-cuong/magento2-product-review-form 问题修复 & 功能扩展

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

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

php-cuong/magento2-product-review-form

Composer 安装命令:

composer require php-cuong/magento2-product-review-form

包简介

Magento 2 Product Review Form Extension Free

README 文档

README

How to show review form only for the customer who has purchased the item in Magento 2

Why should you use this extension?

  • By default, Magento 2 is showing review form on the product detail page for both Customer logged in and Guest, you can disable Guest by going to Magento Admin Panel and navigate to the Stores → Settings → Configuration → Catalog → Catalog. Then open Product Reviews tab, select the "Allow Guests to Write Reviews" as "No".

  • You are working for a project, you are required to customize the review form, that allows it only to show with the customers who have purchased the product. You don't know how to complete this task, you are searching for a solution. Today I show you the best codes to complete your task.

  • We have the scenario: When a customer views the product, we will check all orders of that customer if the current product exists in any orders, then show the review form and if not show a message.

  • So what will we do in this practice?

  1. We will create a new module called PHPCuong_ProductReviewForm
  2. We will use the preference to override the method named _construct() in the class named \Magento\Review\Block\Form

How to install this extension?

Under your root folder, run the following command lines:

  • composer require php-cuong/magento2-product-review-form
  • php bin/magento setup:upgrade --keep-generated
  • php bin/magento setup:di:compile
  • php bin/magento cache:flush

See the video How I can create this extension steps by step:

  1. Youtube: https://www.youtube.com/watch?v=Z-qpnl7cI4Q&index=54&list=PL98CDCbI3TNvPczWSOnpaMoyxVISLVzYQ
  2. Facebook: https://www.facebook.com/giaphugroupcom/videos/707473429649797/

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 2
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2019-02-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固