Child pages
  • Product Questions - Magento 2
Skip to end of metadata
Go to start of metadata


Firefox user notice:

Please use different web browser to view this document.

Sorry for the inconvenience.

Product Questions - Magento 2

Magento 2 Product Questions appends a tab to product pages from where customers can ask public and private questions, provide answers to the existing ones, give rating to individual questions and answers. Store admins can decide which questions should be published, made private or public, or rejected and inform customers about their question / answer updates by email. Additionally, the extension shares questions between store views, all or selected products.

Compatibility: Magento Open Source 2.1.X - 2.3.X, Magento Commerce 2.1.X - 2.3.X

Product Page

Thank you for choosing Aheadworks!

Installing Product Questions

Command Line Installation

1. Backup your web directory and store database

2. Download the Product Questions installation package

 3. Upload the contents of the Product Questions installation package to your store root directory.

 4. In the SSH console of your server, navigate to your store root folder:

cd path_to_the_store_root_folder

run the following command:

php -f bin/magento module:enable Aheadworks_Pquestion


php -f bin/magento setup:upgrade


php -f bin/magento setup:static-content:deploy

5. Flush store cache; log out from the backend and log in again.


Make sure the installation is done from under the FTP administrator account. Otherwise, make sure to set 775 permissions to the store root directory after the extension is deployed.

Composer Installation

1. Log in to your customer account at and navigate to Account -> Composer access;

2. Configure your store to work with the Aheadworks composer repository:

Add composer repository to composer.json by running:

composer config repositories.aheadworks composer in the Magento installation root.

Use the provided key pair as a login and pass. You can optionally save them in the global composer auth file.

 3. You can start using AW composer now.

 For extension names, navigate to Account -> Composer access.

 4. Open the root Magento directory on your server and send Composer the following command:

composer require <component-name>:<version>

Note: Use the previously copied component name and version.

 5. Make sure that Composer finished the installation without errors. Flush store cache, log out and log into the backend again.


Set up cron

If you have already configured cron jobs for your Magento installation, you might skip this step. Read the following instructions on setting cron job for your Magento store: Magento user guide 

Generally, it would be enough to run the following command in the SSH console of your server: 



Next, insert the following line:  


Don't forget to confirm the saving request when exit.

Migrating Questions from Magento 1 to Magento 2

Read the following information carefully to avoid an accident data loss.

Magento 2 Product Questions introduces the question migration tool that moves the questions and answers generated by the Product Questions Magento 1 module to the Product Questions Magento 2 module. To do this, follow the steps below:

  1. The Magento Data Migration Tool is required to be installed prior to starting the migration.
    The migration script relies heavily on the Magento Data Migration tool. 

  2. Backup the Magento 2 databases before the migration to have an opportunity to revert any changes.
    Migration might involve rewriting database tables, so backup is strongly advised.

  3. Questions and answers can be properly migrated only from the M1 Product Questions 2.x.x version and above. If you have the previous versions installed, do not try migrating them on your own.

  4. Migration specifics
    You need to make sure that the Magento Webstore and Website IDs are the same;
    Target customers on a destination store are determined and assigned by customer emails. Emails are specified in the source Magento 1 store;
    Target products on a destination store are determined and assigned by product SKUs. SKUs are stored in the source Magento 1 store;
    Target product attribute sets on a destination store are determined and assigned by attribute set names. Attribute set names are provided in the source Magento 1 store.

  5. Sharing options migration specifics
    The product question sharing options are converted in the following way

     - Product(s) -> Selected Products with SKU condition (Certain Product, if only one product is selected)
     - Attribute Set -> Selected Products with Attribute Set condition
     - Website & Global -> All products

    If there is no chance to determine the products suitable for a particular question, the question is shared among all products and receives the 'Unpublished' status. The corresponding notification about such questions is added to the migration log (aw_pq2_migration.log).

1. Install the Data Migration Tool following the instructions provided by the Magento team.

2. Copy the contents of the /etc or /src folders (for Magento 2.1.x and Magento 2.2.x, respectively) found in the Magento 2 Product Questions installation package to the vendor/magento/data-migration-tool/ folder.

3. Navigate to vendor/magento/data-migration-tool/etc/aw_pq2/ and open config.xml for edit.

More information on tag values can be found in the Magento Data Migration Tool configuration instructions.
<source> - the source database questions and answers should be migrated from.
<destination> - the target database the questions and answers should be migrated to.

4. Run the migration process from the console:

bin/magento migrate:data -r vendor/magento/data-migration-tool/etc/aw_pq2/config.xml

5. The migration is completed.

Introducing Product Questions

The Product Questions extension offers a communication platform with the following functionality:

  • Public/private questions;
  • Answer manual/auto approvals;
  • Q&A helpfulness voting;
  • Guest questions;
  • Email notifications;
  • Question sharing.

Extension Logic

The module introduces a new tab to product pages - 'Product Questions'. The tab contains the communication area where customers can ask new questions, provide answers, rate the helpfulness of questions and answers, sort questions by rating/date.

Each new user's question/answer gets the 'pending' status. It is stored in the 'Manage Questions' dashboard waiting for an admin's approval (or rejection).

Customers can monitor all their questions/answers in the separate 'Product Questions' tab added to their profile page.

In the admin area, the module conditionally consists of the 'Manage Questions' dashboard and the 'By Product' grid. From the dashboard, the admin can manage all customer questions and add the new ones. The grid shows questions by related products.

The admin can edit the content of questions/answers, approve, reject, or delete them, make questions public or private. Each question can be shared among multiple products or all products at once.

The additional 'Configuration' menu sets ask/answer and rate permissions for guest users. Besides this, the admin can set up several automation options, define the look of the Q&A tab, and handle the email notification parameters.


Q&A on the Storefront

'Product Questions' Tab on Product Pages

The 'Product Questions' tab is located on all product pages. It stores all questions and answers related to the corresponding product. Answers can be provided only for the previously approved questions.

To ask a new question, one should click on the corresponding button at the top right of the section. By clicking on the button, users will see a special form from where they can send questions.

The extension submits both public and private questions. Once the question has been specified, it can be sent for an admin's moderation by clicking Send Question Button.

By default, all questions are public. To make a question private, one should tick the 'Private Question' box before sending it.

Besides asking questions, users can provide answers to the already existing ones. To give an answer, one should click Add Answer Button below the corresponding question.

Answer Form

Users can rate each question and answer. The provided rating system serves as an additional sorting parameter along with the date the question/answer was posted.

Customer Account

The 'Product Questions' tab in a customer account lists all the customer's questions asked and the answers given to other questions.

Here customers can see whether their questions have been answered or whether a particular question or answer has been published.

Moreover, with the Product Questions extension, users can subscribe to email notifications about the question and answer updates. The subscription is independent of questions and answers and can be canceled anytime.


 Backend Configuration

Extension Settings

The configuration process starts with setting up the main module's parameters located under Stores > Configuration > AHEADWORKS EXTENSIONS > Product Questions.

The provided parameters are divided into three sections: General Settings, Interface Settings, and Notification Settings.

General Settings

General Settings

  • Who Can Ask Questions from Product Page – defines who can ask questions: only the registered users or all users;
  • Who Can Answer Questions for Product Page – defines who can answer questions: admin only, registered customers, the customer who purchased the products, or all customers;
  • Approve Answers Automatically – if set to 'yes', all users' answers will be approved automatically;
  • Guests can rate – if set to 'yes', guest users will be able to rate questions and answers;
  • Subscribe customers to Product Questions emails automatically – defines if users will be automatically subscribed to Q&A email alerts;
  • Customer-defined question visibility – if set to 'No', users won't be able to define their questions' visibility.

Interface Settings

Interface Settings

  • Number of questions to display – defines the number of questions to be displayed in the 'Product Questions' tab on product pages;
  • Number of answers to display – defines the maximum number of answers to be displayed below each question upon expanding it;
  • Display URLs as links – defines if URLs provided by users in their questions and answers should be clickable;
  • Default questions sort by – defines how questions are sorted by default (by rating or date);
  • Default sort order – defines if the sort order should be ascending or descending.

If the number of answers provided for the question exceeds the value defined in the 'Number of answers to display' field, the next X answers will be shown upon clicking on the 'Next Answers' active link. X stands for the specified value.

Next Answers Active Link

Once the extension has been configured, click at the top right of the 'Configuration' page.

Notification Settings

Notification Settings

  • Send admin notifications to this email address – an email address where all admin Q&A notifications should be sent;
  • Email Sender – defines the email sender;
  • Admin notifications about new questions – defines the email template for new question admin notifications;
  • Admin notifications about new answers – defines the email template for new answer admin notifications;
  • Customer notifications about new replies to their questions – defines the email template for new reply customer notifications;
  • Customer notifications about the questions status change – defines the email template for question status change customer notifications;
  • Customer notifications about the answer status change – defines the email template for answer status change customer notifications;
  • Auto-Responder to customer about his new question – if enabled, defines the email template for new question customer auto-responders;
  • Auto-Responder to customer about his new answerif enabled, defines the email template for new answer customer auto-responders;
  • Remove the web copies of the emails older than X days – defines how long email web copies should be stored in the store's database.

Managing Questions

To access all submitted questions, go to Marketing > Product Questions by Aheadworks > Product Questions.

Manage Questions Grid

The 'Manage Questions' grid contains data about all customer/admin questions. The data is split into the following columns:

  • Question - the question asked;
  • Product - the product the question relates to;
  • Status - the current question status (published, pending, or rejected);
  • Visibility - the question's visibility status (public or private);
  • Total Answers - the total number of answers given to the question;
  • New Answers - the new, 'pending' answers given to the question;
  • Rating - the question's rating given by users;
  • Author - the author of the question;
  • Date - the date the question was asked;
  • Asked From - the store view where the question was asked;
  • Action - the action an admin can make to the question (publish pending questions).

From the 'Actions' box above the grid, you can publish, reject, delete, make public or private the selected question(s).

To edit the question, click on the required one in the 'Question' column. The values in this column are presented in the form of an active link to the 'Manage Question' page.

Manage Question Page

The page is divided into the two tabs: General and Sharing Options.

From the 'General' tab, you can change the question's visibility status, rating, question's content, add answers, edit answers one by one, moderate answers individually: delete, reject, or publish them.

In the 'Sharing Options' tab, you can share questions.

Question Sharing Options

Each question can be shared among multiple store views and products: all products, selected products, or with a certain product.

Besides moderating customer questions, you can ask own questions and provide answers to them. For this purpose, click above the grid.

New Question Page

The functionality provided on the 'New Question' page is pretty basic so you can quickly create new questions. In the 'General' tab, you can specify the answer and question to it in the corresponding fields, define the question's status and rating.

As in the case with customer questions, the 'Sharing Options' tab shares your questions among store views and products.

Questions by Product

You can conveniently view questions by related products in the 'By Product' grid.

By Product Grid

The information in the grid is divided into the following columns:

  • Product - the product's name;
  • SKU - the product's SKU;
  • Total Questions - the total number of questions related to the product;
  • Shared Questions - the number of questions shared with the product;
  • Product Only Questions - the number of the product's unique questions;
  • Actions - the actions that can be performed with the product (view the product or edit it).

Uninstalling Product Questions

Manual Removal

1. Disable the module by executing the following commands:

php bin/magento module:disable Aheadworks_Pquestion
php bin/magento setup:upgrade

2. Remove the extension files from the following folder:


Automatic Removal (via Composer)

1. Disable the module by executing the following commands:

php bin/magento module:uninstall Aheadworks_Pquestion

Product Page

Need Customization?

Magento 2 Custom Development Services by Aheadworks

You can always find the latest version of the software, full documentation, demos, screenshots, and reviews on
License agreement:
Contact Us:
Copyright © 2019 Aheadworks Co.

  • No labels