Review (optional)

https://github.com/magesuite/review

This module adds improvements to the built-in Magento 2 reviews functionality.

 

Installation

This module is optional

composer require "creativestyle/magesuite-review" ^1.0.0

Admin settings

Module’s settings are placed in:

Stores -> Configuration -> MageSuite -> Review

 

Settings:

Configurable Products

Field

Options

Comment

Field

Options

Comment

Allow attaching reviews to simple product

Yes/No

When enabled it will be possible to add review to a child product of a configurable.

Show variant on configurable product review

Yes/No 

When enabled it will show from which specific variant (simple product) review comes from on configurable product view reviews list.

Allow reviewing simple products from configurable product view

Yes/No 

When enabled it will add swatches in configurable product review form, allowing to review specific product variant directly from configurable product view.

 

Grouped Products

Field

Options

Comment

Field

Options

Comment

Show Reviews From Assigned Products

Yes/No 

When enabled reviews from Assigned products will be visible on a grouped.

 

Share Between Stores

Field

Options

Comment

Field

Options

Comment

Is Enabled

Yes/No 

When enabled reviews added on the different store view will be visible together with reviews from current store.

Show reviews from additional stores

Select stores

Select stores from which reviews will be visible together with reviews from current store

Backend

Add BE documentation here

Frontend

Screens

XMLs

In catalog_product_view_type_configurable.xml product.review.form.swatches block is added to product.review.form.fields.before container. It is possible to change some settings for displaying swatches on the review form:

<argument name="only_swatches" xsi:type="boolean">false</argument><!-- Show all kind of options (also selects), not only visual selects --> <argument name="enable_control_label" xsi:type="boolean">true</argument> <argument name="more_button_text" xsi:type="string" translate="true">More</argument> <argument name="more_button_limit" xsi:type="number">-1</argument>

 

Templates

In theme-creativeshop there is a custom review template: theme-creativeshop/src/Magento_Review/templates/product/view/list-item.phtml It extracts a single review code from Magento_Review/templates/product/view/list.phtml and recreates it as a cs-review component. If $block->getReviewConfigurationData() returns some data attribute is rendered on the review, as shown in the Screens section of this documentation.

 

Scripts

swatch-renderer-mixin.js takes care that swatches are properly displayed in the review form and do not interfere with other swatches (on tiles or buybox). It adds an additional optional isInReviewForm. which is set to true when if (!!this.element.parents('.cs-reviews__form').length) The mixin prevents default swatches actions (except self and input update) if _OnClick or _OnChange methods are triggered by swatches in review-form.