V8x Facebook Messenger Chatbot for Prestashop 8. Nulledfrm exclusive.

vra1974

Active member
XNullUser
Joined
May 19, 2020
Messages
217
Reaction score
58
Points
28
NullCash
271
I'd like to express my gratitude to the community for sharing such valuable resources. My journey with PrestaShop has been incredibly educational. I'm excited to share a module I've developed that enables automatic responses to Facebook Messenger inquiries based on message keywords. This tool ensures your Facebook business page can instantly address frequent customer questions without delay.

My motivation for creating this solution came from two key challenges: Facebook's built-in keyword response system limits you to just one reply every quarter hour, and most available chatbots come with hidden costs or limitations. This module, by contrast, is completely free and straightforward, functioning seamlessly within PrestaShop as a self-contained system.

The setup process follows standard Facebook integration procedures - while it requires some initial patience, the instructions are designed to make the process accessible to anyone willing to learn. I hope you find this tool as useful as I have!




# Facebook Messenger Chatbot Module for PrestaShop 8.x

## Description
The Facebook Messenger Chatbot module allows your PrestaShop store to automatically respond to customer inquiries through Facebook Messenger. The module provides an easy-to-use interface to set up automated keyword-based responses, including support for interactive buttons.

## Key Features
- Automated keyword-based responses
- Support for multiple question patterns per response
- Text normalization to handle accents and case sensitivity
- Interactive buttons in responses (up to 3 per message)
- Detailed logging system to verify interactions
- Conversation storage for follow-up
- Intuitive admin interface

## Requirements
- PrestaShop 8.0 or higher
- PHP 7.4 or higher
- A Facebook page and Facebook application

## Installation Instructions

### 1. Module Installation
1. Download the module ZIP file
2. In the PrestaShop Admin Panel, go to "Modules > Module Manager"
3. Click "Upload a module"
4. Select the downloaded ZIP file
5. Once installed, click "Configure"

### 2. Facebook Application Setup

#### 2.1. Create a Facebook Application
1. Go to [developers.facebook.com](https://developers.facebook.com/)
2. Click "My Apps" > "Create App"
3. Select the "Business" type
4. Complete the required information and create the application

#### 2.2. Configure Messenger Permissions
1. In your app dashboard, go to "Add Products"
2. Select "Messenger"
3. In the Messenger settings:
- Go to "Access Tokens"
- Select or connect your Facebook page
- Generate a page access token
- Copy this token for use in the module configuration

#### 2.3. Configure the Webhook
1. In the Messenger settings, find "Webhooks"
2. Click "Add Callback URL"
3. In the "Callback URL" field, enter:
```
https://your-domain.com/module/fbmessenger/webhook
```
4. In "Verify Token", enter the same token you configured in the module
5. Select these events:
- messages
- messaging_postbacks
- message_deliveries
- message_reads

#### 2.4. Request Review for pages_messaging Permission
1. Go to "App Review" > "Permissions and Features"
2. Request the `pages_messaging` permission
3. In the description, explain how your chatbot will help customers get quick, automated answers to their queries

### 3. Module Configuration
1. In the module configuration in PrestaShop:
- Enter the "Page Access Token" generated in Facebook
- Enter a "Verify Token" (any string, but must match the webhook configuration)
- Enter the "App Secret" of your Facebook application (found in Settings > Basic)
2. Save the configuration

### 4. Add Questions and Answers
1. In the "Predefined Questions and Answers" section of the module:
- Click "Add new Q&A"
- Enter the question pattern (you can use multiple patterns separated by |)
- Enter the response
- Add buttons if desired (maximum of 3)
- Activate the Q&A
- Save

## How It Works
- When a user sends a message to your Facebook page, the webhook receives the notification
- The module normalizes the text (removes accents, converts to uppercase, etc.)
- It looks for a match in the configured question patterns
- If it finds a match, it sends the configured response
- If buttons are configured, it sends them along with the response
- All interaction is logged and can be viewed in the logs section

## Troubleshooting
- If webhooks aren't working, check the logs in the corresponding section of the module
- Make sure the webhook URL is publicly accessible
- Verify that the tokens match in Facebook and the module configuration
- Check that the pages_messaging permission has been approved

## Limitations
- Facebook Messenger allows a maximum of 3 buttons per message
- Button titles must be 20 characters or less
- Responses are limited to text, buttons, and URLs (no file attachments)

2025-02-20 19_42_14-PrestaShop 8 Facebook Messenger Chatbot Module - Claude - Brave.jpg
 

Attachments

  • fbmessenger.zip
    14.8 KB · Views: 7

vivozivo

Well-known member
Master
Diamond
Elite
Joined
Sep 24, 2019
Messages
1,376
Reaction score
773
Points
113
NullCash
472
Let's test how it works, since the molude is limited only to v8


'min' => '8.0.0',
'max' => _PS_VERSION_
 

vra1974

Active member
XNullUser
Joined
May 19, 2020
Messages
217
Reaction score
58
Points
28
NullCash
271
Let's test how it works, since the molude is limited only to v8


'min' => '8.0.0',
'max' => _PS_VERSION_
Hi! My prestashop is 8, so I cant tell if it works in other versions. If you can, please tell me if it works on other versions.
 

motivatemyselfx

New member
XNullUser
Joined
Feb 21, 2025
Messages
11
Reaction score
0
Points
1
Location
Bulgaria
NullCash
1
I will test how it behaves on older versions and will provide feedback.
 

erinaranee

Member
XNullUser
Joined
Oct 4, 2023
Messages
251
Reaction score
20
Points
18
Location
JP
NullCash
311
wowo .look like that is very nice and cool plugin for me .thank you very much
 

ziomeks

Active member
XNullUser
Joined
Sep 22, 2021
Messages
321
Reaction score
28
Points
28
NullCash
179
maybe somebody or author ccan show demo
 

hxcode

Well-known member
Master
Diamond
Elite
Joined
Aug 16, 2020
Messages
3,669
Reaction score
447
Points
83
NullCash
2
Thank you very much for sharing this module.
 

nojusri

Active member
XNullUser
Joined
Jan 29, 2024
Messages
237
Reaction score
40
Points
28
Location
Lietuva
NullCash
1
Wow, that's very good! Thanks for sharing this. Great stuff!
 

alami64

Member
XNullUser
Joined
Mar 26, 2021
Messages
418
Reaction score
0
Points
16
NullCash
4
Thank you very much for sharing this module.
 

yog78

Active member
XNullUser
Joined
May 25, 2021
Messages
1,046
Reaction score
6
Points
38
NullCash
3,270
Thank you very much for sharing this module.
 

Ponas

Well-known member
Diamond
Elite
XNullUser
Joined
Jan 17, 2022
Messages
1,461
Reaction score
147
Points
63
NullCash
10
Thank you for sharing this module. A much needed module that will come in handy. Thank you for your contribution to this community. Thank you for sharing the module with the community members and making efforts to expand our forum.
 

pop00

Member
XNullUser
Joined
Jun 7, 2019
Messages
153
Reaction score
5
Points
18
NullCash
39
The module does not install on version 8.2.
Post automatically merged:

The error is in the following function:
private function installDefaultQA()
{
// Empty method - no default Q&As
return true;
}
foreach ($defaultQA as $qa) {
Db::getInstance()->insert('fbmessenger_qa', [
'question_pattern' => pSQL($qa['question_pattern']),
'answer' => pSQL($qa['answer']),
'active' => 1,
'position' => 0,
'date_add' => date('Y-m-d H:i:s'),
'date_upd' => date('Y-m-d H:i:s')
]);
}

return true;
}
 
Last edited:
Top