maxcode / module-product-question
Product page block that sends shoppers to the contact form with the product already mentioned, for Magento 2.
Package info
github.com/eBusiness360/module-product-question
Type:magento2-module
pkg:composer/maxcode/module-product-question
Requires
- php: ~8.2.0||~8.3.0||~8.4.0
- magento/framework: *
- magento/module-catalog: *
- magento/module-contact: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
English · Français
Maxcode Product Question for Magento 2
A "Have a question about this product?" block on the product page that opens your contact form with the product already mentioned. Free, no core override.
What it does
- A question block on every product page, at the bottom of the buying column: a title, a short text and a button.
- The contact form opens with the message already started: product name and reference. Your customer only has to write the question, and you know which product it is about.
- Signed links. The pre-filled message only appears for a link issued by the product page. A forged address pre-fills nothing and reveals no product (useful when some products are reserved for certain customers).
- Editable texts: title, text and button label, for each store view. Left empty, a default text is used.
- Works with your theme. The block keeps a fixed name, so a theme can move it; the contact form works as
long as its message field keeps the
commentid. - Translated into English and French. Unit tests included.
Installation
composer require maxcode/module-product-question bin/magento module:enable Maxcode_ProductQuestion bin/magento setup:upgrade bin/magento cache:flush
The module has no database schema. Requirements: Magento Open Source or Adobe Commerce 2.4.x, PHP 8.2 or later.
Usage
Go to Stores > Configuration > Maxcode > Product Question:
| Setting | Role |
|---|---|
| Show the question block on product pages | turns the block on or off |
| Title, Text, Button label | texts of the block, per store view (empty = default text) |
Open a product page, click the button: the contact form shows a message such as My question is about the product "Name" (ref. SKU):.
For developers
| Piece | Role |
|---|---|
view/frontend/layout/catalog_product_view.xml |
the block maxcode.product.question in product.info.main |
view/frontend/layout/contact_index_index.xml |
pre-fills the comment field of the contact form |
ViewModel/ProductQuestion |
settings, link and message |
Model/LinkSigner |
signs the link with the site's encryption key |
Changelog
See CHANGELOG.md.
License and support
Free for any number of Magento installations that you own or operate. You receive the full source code and may adapt it to your needs; redistribution is not allowed. See LICENSE (free-module EULA).
Provided as is, without support or update commitment. For questions and paid services: ebusiness360.fr.