Yes, you can use the Flarum Embed extension to do this, if I understand what are you looking for correctly.
There are already some discussions on this topic: https://discuss.flarum.org/?q=commenting%20system
A tutorial from me (untested, adapted from this one, should work):
Install Flarum Embed and enable it:
composer require flarum/embed
Navigate to https://yourforum.tld/embed/:discussionID
and make sure that the page has no errors (replace :dicussionID
with the ID of the discussion your want to display).
Create an iframe that displays the URL above:
<iframe src="https://yourforum.tld/embed/123" style="width: 100%; max-width: 100%; height: 320px;" frameborder="0"></iframe>
You might need to alter iframe's style to adapt it to your page's style.
The way this works is that it embeds a discussion's posts. You can log in with your forum credentials and create a new post to that discussion.
If I were you, I'd create a new tag such as "Web Comments" or so and then create new empty discussions for each of the products.
This might be a lengthy process, depending on the amount of content at your website. Luckily, it is possible to automate this, if you integrate some code in your website & Flarum. Therefore, you have a few options:
- Use a Flarum API client to create a new discussion everytime you add a new product on your website. There are two main clients that I know of:
- Flarum API client by maicol07 - written in PHP, installable via composer. Very simple, flexible, general-purpose and gets the job done.
- pyFlarum by SKevo (me) - a Python 3.6+ package to manipulate Flarum's API. Supports creating, deleting and editing posts, discussions, users, forum data and more. I think that it is a good choice if you have a Python backend and more functionality.
- JavaScript could technically create discussions at your forum too from the frontend, with a few caveats though:
- Unsafe
- Cross-site blabbery
- If you allow someone other than you to add products, then there is a risk of somebody altering the JavaScript or requests to mess with your forum. On second though, please don't do this, as this is the reason why the above-mentioned blabbery exists in the first place.
- Insert new discussions directly in the database (pyFlarum has a WIP support for databases. You could do this with raw SQL too)
If you'd like to create the discussions manually, whether via API or database itself, I recommend you to create a new bot account for that purpose and create an API key for it.