Features

  • Extra fields “Questions and answers” on product displays and “Frequently asked questions” on the term displays of your product vocabularies, placed in Manage display
  • Commerce › Product questions with Questions, Privacy and Settings tabs, an entity autocomplete product filter and a Questions tab on every product
  • Replies sent through Drupal’s mail manager (hook_mail) in the language the question was asked in; a notice to the site email for new questions
  • Permission “Manage product questions” for the roles that answer; the public endpoint is a POST route excluded from the page cache
  • Cache tags on the blocks (own tag, settings, language) so the internal page cache and Dynamic Page Cache stay right after every answer
  • Anti-spam without captcha: signed token fetched by the browser, honeypot, rate limits per IP hash and email, banned words
  • Categories and brands taken from the products’ taxonomy reference fields; FAQPage JSON-LD on their term pages
  • Cron erases email addresses after the retention period; JSON export and deletion per email; .po files for Spanish and French

Drupal Commerce product pages show what you wrote; shoppers’ doubts go to the contact form, or nowhere. Product Questions & Answers adds a Questions and answers field to the product display: a list of answered questions, a search box, helpful votes and an Ask a question form that works for guests and logged-in users.

Questions arrive in the store admin. You answer, choose whether it is published — only possible when the visitor agreed — and Drupal mails the reply in the language of the page they asked from. Term pages of your product categories collect a FAQ of the shop’s own answers and the product answers you mark for them.

How it fits into Drupal Commerce

Store admin
Commerce › Product questions (list by status, editor, privacy tools) and Commerce › Configuration › Products › Product questions (settings), under the restricted Manage product questions permission. Products get a Questions local task.
Display
Two extra fields — on product types and on the vocabularies your products reference — placed by the installer and movable in Manage display. Built from the shared markup, rendered with Markup::create() and cached with the module’s tag, the settings and the interface language.
Mail
plugin.manager.mail and the module’s hook_mail, so whatever mail plugin your site uses applies.
Endpoint
A POST route (/product-questions/endpoint, with the language prefix) marked no_cache; the page itself holds no token and no user data.
Cron
Email addresses past the retention period, IP hashes and votes older than a day are erased.
Tested on Drupal 11.3 with Commerce 3, Olivero and Claro, in English, Spanish and French.

Installation

  1. Step 1

    Unpack the zip into modules/custom/ecom_addons_product_questions.

  2. Step 2

    Enable it in Extend or with drush en ecom_addons_product_questions; the translations are imported.

  3. Step 3

    Grant Manage product questions to the roles that answer and review the settings.

Download the step-by-step guide (PDF)

FAQ

Where do brands come from?

Commerce has no brand entity: a taxonomy field or vocabulary of your products named brand (marca, marque, manufacturer) is used as brands, the others as categories.

Does the page cache still work?

Yes. The block is the same for every visitor and carries cache tags; the token and the user’s details come from the uncached endpoint.

Is anything published without consent?

No. Without the visitor’s tick, the answer is mailed and never shown.

FAQ rich results?

Google shows them only for some government and health sites since 2023; the term page markup is valid structured data, nothing more is promised.

Version history

  1. Loading…

Reviews

Loading…