{"id":520272,"date":"2026-01-05T10:17:55","date_gmt":"2026-01-05T10:17:55","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=520272"},"modified":"2026-01-06T11:36:06","modified_gmt":"2026-01-06T11:36:06","slug":"implementing-websockets-in-prestashop-module","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/","title":{"rendered":"Implementing WebSocket in Prestashop Module"},"content":{"rendered":"\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n<\/div>\n<\/div>\n\n\n\n<p>In this blog, we will explain about <strong><a href=\"https:\/\/en.wikipedia.org\/wiki\/WebSocket\">WebSocket<\/a><\/strong> &amp; <strong>Implementing WebSocket in Prestashop Module<\/strong> and demonstrate it with a <strong>real-time order status update to customer <\/strong>example.<\/p>\n\n\n\n<p>Prestashop is a powerful eCommerce platform, but it does not provide native support for real-time communication. <\/p>\n\n\n\n<p>Most dynamic features, such as order updates, notifications, or dashboards, rely on polling or page refresh<\/p>\n\n\n\n<p>By the end of this tutorial, you will understand:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>What is WebSocket, how does WebSocket differ from HTTP, &amp; their Importance.<\/li>\n\n\n\n<li>Why WebSocket cannot run directly inside Prestashop<\/li>\n\n\n\n<li>The correct architecture for WebSocket<\/li>\n\n\n\n<li>How to capture order status events<\/li>\n\n\n\n<li>How to push real-time updates to the frontend<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What is WebSocket?<\/strong><\/h2>\n\n\n\n<p>WebSocket is a communication technology that allows a <strong>persistent, two-way connection<\/strong> between a client (such as a web browser) and a server.<\/p>\n\n\n\n<p>Unlike traditional HTTP communication, where the client must repeatedly send requests to receive updated data, WebSocket maintains an open connection.<\/p>\n\n\n\n<p>This enables the server to <strong>push data to the client instantly<\/strong> whenever an event occurs.<\/p>\n\n\n\n<p>In simple terms, WebSocket enables real-time communication on the web.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How does WebSocket differ from HTTP?<\/strong><\/h2>\n\n\n\n<p>Traditional HTTP follows a <strong>request\u2013response model<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The browser requests data<\/li>\n\n\n\n<li>The server responds<\/li>\n\n\n\n<li>The connection is closed<\/li>\n<\/ul>\n\n\n\n<p>To get updated data, the browser must send another request, often using polling or AJAX calls. This leads to delays and unnecessary server load.<\/p>\n\n\n\n<p>WebSocket, on the other hand, works on a <strong>persistent connection model<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A single connection is established<\/li>\n\n\n\n<li>Both client and server can send data at any time<\/li>\n\n\n\n<li>The connection remains open until explicitly closed<\/li>\n<\/ul>\n\n\n\n<p>This approach significantly reduces latency and improves performance for real-time applications.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Why WebSockets are important<\/strong><\/h2>\n\n\n\n<p>WebSockets enable applications to react instantly to changes without waiting for the user to refresh the page. <\/p>\n\n\n\n<p>This is especially useful in scenarios where data changes frequently or needs to be delivered immediately.<\/p>\n\n\n\n<p>Common examples include:<\/p>\n\n\n\n<p><em>Stock or inventory updates<\/em><br><em>Live order tracking<\/em><br><em>Real-time notifications<br>Chat applications<\/em><br><em>Live dashboards<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Why WebSockets cannot run directly in Prestashop<\/strong><\/h2>\n\n\n\n<p>Prestashop is PHP-based and works on a <strong>request\u2013response lifecycle<\/strong>.<br>WebSockets require <strong>persistent connections<\/strong>, which PHP does not support natively.<\/p>\n\n\n\n<p>Therefore, the correct approach is:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Run a <strong>separate WebSocket server<\/strong> (Node.js or similar)<\/li>\n\n\n\n<li>Let the Prestashop module <strong>send events<\/strong> to this server<\/li>\n\n\n\n<li>Let clients (FO\/BO) <strong>listen in real time<\/strong><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Architecture overview<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Prestashop Module (PHP)\n \u251c\u2500\u2500 Order Status Hook\n \u251c\u2500\u2500 Token Controller\n \u251c\u2500\u2500 WebSocket JS Client\n        \u2193\nExternal WebSocket Server (Node.js + Socket.IO)\n        \u2193\nBrowser (FO \/ BO)\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Technologies used<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Prestashop side<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Custom Prestashop Module<\/li>\n\n\n\n<li><code>actionOrderStatusPostUpdate<\/code> &amp; <code>displayHeader<\/code> hook<\/li>\n\n\n\n<li><code>Tools::hash()<\/code> for token generation<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">WebSocket Server<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Node.js<\/li>\n\n\n\n<li>Express<\/li>\n\n\n\n<li>Socket.IO<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Create the WebSocket Server<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Install dependencies<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\">mkdir prestashop-ws\ncd prestashop-ws\nnpm init -y\nnpm install express socket.io<\/pre>\n\n\n\n<p>WebSocket Server Code: Create <strong>server.js<\/strong> file<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\">const express = require(&#039;express&#039;);\nconst http = require(&#039;http&#039;);\nconst socketIo = require(&#039;socket.io&#039;);\n\nconst app = express();\nconst server = http.createServer(app);\nconst io = socketIo(server, {\n    cors: { origin: &#039;*&#039; }\n});\n\nio.use((socket, next) =&gt; {\n    try {\n        const token = socket.handshake.auth.token;\n        if (!token || token.length &lt; 20) {\n            return next(new Error(&#039;Unauthorized&#039;));\n        }\n        next();\n    } catch {\n        next(new Error(&#039;Unauthorized&#039;));\n    }\n});\n\nio.on(&#039;connection&#039;, (socket) =&gt; {\n    console.log(&#039;Client connected&#039;);\n\n    socket.on(&#039;disconnect&#039;, () =&gt; {\n        console.log(&#039;Client disconnected&#039;);\n    });\n});\n\napp.use(express.json());\n\napp.get(&#039;\/&#039;, (req, res) =&gt; {\n  res.send(&#039;WebSocket server is running&#039;);\n});\n\napp.post(&#039;\/order-update&#039;, (req, res) =&gt; {\n    io.emit(&#039;order_status_update&#039;, req.body);\n    res.send({ success: true });\n});\n\napp.get(&#039;\/health&#039;, (req, res) =&gt; {\n  res.json({ status: &#039;ok&#039;, uptime: process.uptime() });\n});\n\nserver.listen(3000, () =&gt; {\n    console.log(&#039;WebSocket running on port 3000&#039;);\n});<\/pre>\n<\/div>\n<\/div>\n\n\n\n<p>Run the server by using the command on the terminal: <strong><code>node server.js<\/code><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Create Prestashop module<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Module structure<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">modules\/realtimeorder\/\n \u251c\u2500\u2500 realtimeorder.php\n \u251c\u2500\u2500 controllers\/\n \u2502    \u2514\u2500\u2500 front\/\n \u2502         \u2514\u2500\u2500 token.php\n \u2514\u2500\u2500 views\/\n      \u2514\u2500\u2500 js\/\n           \u2514\u2500\u2500 ws.js\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Hook used<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">actionOrderStatusPostUpdate\ndisplayHeader<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Main module file<\/h3>\n\n\n\n<p><strong>realtimeorder.php<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">class RealtimeOrder extends Module\n{\n    public function hookDisplayHeader()\n    {\n        $this-&gt;context-&gt;controller-&gt;addjQueryPlugin('growl', null, true); \/\/ For notification\n        Media::addJsDef([\n        'realtimeorderTokenUrl' =&gt; $this-&gt;context-&gt;link-&gt;getModuleLink(\n                $this-&gt;name,\n                'token',\n                [],\n                true\n            ),\n        ]);\n\n        \/\/ Socket.IO CDN\n        $this-&gt;context-&gt;controller-&gt;registerJavascript(\n            'socket-io-cdn',\n            'https:\/\/cdn.socket.io\/4.7.2\/socket.io.min.js',\n            [\n                'server' =&gt; 'remote',\n                'position' =&gt; 'head',\n                'priority' =&gt; 10,\n            ]\n        );\n\n        \/\/ Your WebSocket client script\n        $this-&gt;context-&gt;controller-&gt;registerJavascript(\n            'realtimeorder-ws',\n            'modules\/'.$this-&gt;name.'\/views\/js\/ws.js',\n            [\n                'position' =&gt; 'bottom',\n                'priority' =&gt; 150,\n            ]\n        );\n    }\n}\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Capture order status changes<\/h2>\n\n\n\n<p>Prestashop provides a hook (actionOrderStatusPostUpdate) that triggers <strong>for every order status change<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h3 class=\"wp-block-heading\">Hook implementation<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    public function hookActionOrderStatusPostUpdate($params)\n    {\n        $order = new Order($params['id_order']);\n        $state = new OrderState($params['newOrderStatus']-&gt;id);\n\n        $payload = [\n            'order_id' =&gt; $order-&gt;id,\n            'status_id' =&gt; $state-&gt;id,\n            'status_name' =&gt; $state-&gt;name[$this-&gt;context-&gt;language-&gt;id],\n            'date' =&gt; date('Y-m-d H:i:s')\n        ];\n\n        $this-&gt;sendToWebSocket($payload);\n    }\n\n    private function sendToWebSocket(array $data)\n    {\n        $ch = curl_init('http:\/\/127.0.0.1:3000\/order-update'); \/\/ It URL:PORT Where our WebSocket is running.\n\n        curl_setopt_array($ch, [\n            CURLOPT_POST =&gt; true,\n            CURLOPT_HTTPHEADER =&gt; ['Content-Type: application\/json'],\n            CURLOPT_POSTFIELDS =&gt; json_encode($data),\n            CURLOPT_RETURNTRANSFER =&gt; true,\n            CURLOPT_TIMEOUT =&gt; 2\n        ]);\n\n        curl_exec($ch);\n        curl_close($ch);\n    }\n<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Token controller (Security)<\/h2>\n\n\n\n<p><strong>controllers\/front\/token.php<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">class RealtimeOrderTokenModuleFrontController extends ModuleFrontController\n{\n    public function initContent()\n    {\n        parent::initContent();\n\n        header('Content-Type: application\/json');\n\n        $userId = $this-&gt;context-&gt;customer-&gt;isLogged()\n            ? (int) $this-&gt;context-&gt;customer-&gt;id\n            : 0;\n\n        echo json_encode([\n            'token' =&gt; Tools::hash($userId . '|' . time())\n        ]);\n        exit;\n    }\n}\n<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Frontend WebSocket Client<\/h2>\n\n\n\n<p><strong>views\/js\/ws.js<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">fetch(realtimeorderTokenUrl)\n    .then(res =&gt; res.json())\n    .then(data =&gt; {\n        const socket = io('http:\/\/localhost:3000', {\n            auth: { token: data.token }\n        });\n\n        socket.on('order_status_update', (payload) =&gt; {\n            console.log('Order updated:', payload);\n\n            \/\/ Example UI update\n           $.growl.notice({title: \"Order Updated\", message: `Order ID: ${payload.order_id}, Current status:${payload.status_name}`})\n        });\n    });\n<\/pre>\n\n\n\n<p><strong>After implementation<\/strong><\/p>\n\n\n\n<p>You can view the Socket connection on your prestashop Front-office:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"600\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2026\/01\/socketbloghigh-1200x600.webp\" alt=\"Implementing WebSockets in Prestashop Modules\" class=\"wp-image-520437\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2026\/01\/socketbloghigh-1200x600.webp 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2026\/01\/socketbloghigh-300x150.webp 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2026\/01\/socketbloghigh-250x125.webp 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2026\/01\/socketbloghigh-768x384.webp 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2026\/01\/socketbloghigh.webp 1290w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><figcaption class=\"wp-element-caption\">Implementing WebSockets in Prestashop Modules<\/figcaption><\/figure>\n\n\n\n<p>After the successful connection, you can see your outcome. We are showing the growl notification to the customer while changing the order status from Back-office.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"676\" height=\"365\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2026\/01\/socketblog.gif\" alt=\"Implementing WebSockets\" class=\"wp-image-520354\" style=\"width:820px;height:auto\" loading=\"lazy\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p><strong>Implementing WebSockets in Prestashop Module<\/strong> can significantly enhance the user experience in Prestashop.<\/p>\n\n\n\n<p>By separating the WebSocket server from the Prestashop module and using hooks efficiently, we can build <strong>real-time, scalable, and secure features<\/strong> without impacting performance.<\/p>\n\n\n\n<p>This approach is fully compatible with <strong>Prestashop 1.7.x, 8.x.x and 9.x.x<\/strong> and follows best development practices.<\/p>\n\n\n\n<p>That\u2019s all about this blog. Hope it will help you.<\/p>\n\n\n\n<p>If you are facing any issues or have any doubts about the above process, please feel free to contact us through the comment section.<\/p>\n\n\n\n<p>Also, you can explore our&nbsp;<a href=\"https:\/\/webkul.com\/prestashop-development\/\">Prestashop Development Services<\/a>&nbsp;and a large range of quality&nbsp;<a href=\"https:\/\/store.webkul.com\/PrestaShop-Extensions.html\">Prestashop Modules<\/a>.<\/p>\n\n\n\n<p>For any doubt, contact us at support@webkul.com<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In this blog, we will explain about WebSocket &amp; Implementing WebSocket in Prestashop Module and demonstrate it with a real-time order status update to customer example. Prestashop is a powerful eCommerce platform, but it does not provide native support for real-time communication. Most dynamic features, such as order updates, notifications, or dashboards, rely on <a href=\"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":743,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[209],"tags":[2065],"class_list":["post-520272","post","type-post","status-publish","format-standard","hentry","category-prestashop","tag-prestashop"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Implementing WebSocket in Prestashop Module - Webkul Blog<\/title>\n<meta name=\"description\" content=\"Implementing WebSockets in a PrestaShop module to enable real-time order status updates with a practical, step-by-step example.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Implementing WebSocket in Prestashop Module - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Implementing WebSockets in a PrestaShop module to enable real-time order status updates with a practical, step-by-step example.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-05T10:17:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-06T11:36:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2026\/01\/socketbloghigh-1200x600.webp\" \/>\n<meta name=\"author\" content=\"Jain Arpit Ashok\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jain Arpit Ashok\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/\"},\"author\":{\"name\":\"Jain Arpit Ashok\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/8e0bc5938cce917e3a249c441fa7d167\"},\"headline\":\"Implementing WebSocket in Prestashop Module\",\"datePublished\":\"2026-01-05T10:17:55+00:00\",\"dateModified\":\"2026-01-06T11:36:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/\"},\"wordCount\":637,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2026\/01\/socketbloghigh-1200x600.webp\",\"keywords\":[\"prestashop\"],\"articleSection\":[\"prestashop\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/\",\"url\":\"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/\",\"name\":\"Implementing WebSocket in Prestashop Module - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2026\/01\/socketbloghigh-1200x600.webp\",\"datePublished\":\"2026-01-05T10:17:55+00:00\",\"dateModified\":\"2026-01-06T11:36:06+00:00\",\"description\":\"Implementing WebSockets in a PrestaShop module to enable real-time order status updates with a practical, step-by-step example.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2026\/01\/socketbloghigh.webp\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2026\/01\/socketbloghigh.webp\",\"width\":1290,\"height\":645,\"caption\":\"socketbloghigh\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Implementing WebSocket in Prestashop Module\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/8e0bc5938cce917e3a249c441fa7d167\",\"name\":\"Jain Arpit Ashok\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/18ad1b72ac03dc5a1e26466b33f7db5191c4f7f08bd5800f393bbc45d7e85e0b?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/18ad1b72ac03dc5a1e26466b33f7db5191c4f7f08bd5800f393bbc45d7e85e0b?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Jain Arpit Ashok\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/jainarpitashok-presta366\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Implementing WebSocket in Prestashop Module - Webkul Blog","description":"Implementing WebSockets in a PrestaShop module to enable real-time order status updates with a practical, step-by-step example.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/","og_locale":"en_US","og_type":"article","og_title":"Implementing WebSocket in Prestashop Module - Webkul Blog","og_description":"Implementing WebSockets in a PrestaShop module to enable real-time order status updates with a practical, step-by-step example.","og_url":"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2026-01-05T10:17:55+00:00","article_modified_time":"2026-01-06T11:36:06+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2026\/01\/socketbloghigh-1200x600.webp","type":"","width":"","height":""}],"author":"Jain Arpit Ashok","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Jain Arpit Ashok","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/"},"author":{"name":"Jain Arpit Ashok","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/8e0bc5938cce917e3a249c441fa7d167"},"headline":"Implementing WebSocket in Prestashop Module","datePublished":"2026-01-05T10:17:55+00:00","dateModified":"2026-01-06T11:36:06+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/"},"wordCount":637,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2026\/01\/socketbloghigh-1200x600.webp","keywords":["prestashop"],"articleSection":["prestashop"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/","url":"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/","name":"Implementing WebSocket in Prestashop Module - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2026\/01\/socketbloghigh-1200x600.webp","datePublished":"2026-01-05T10:17:55+00:00","dateModified":"2026-01-06T11:36:06+00:00","description":"Implementing WebSockets in a PrestaShop module to enable real-time order status updates with a practical, step-by-step example.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2026\/01\/socketbloghigh.webp","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2026\/01\/socketbloghigh.webp","width":1290,"height":645,"caption":"socketbloghigh"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/implementing-websockets-in-prestashop-module\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Implementing WebSocket in Prestashop Module"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/8e0bc5938cce917e3a249c441fa7d167","name":"Jain Arpit Ashok","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/18ad1b72ac03dc5a1e26466b33f7db5191c4f7f08bd5800f393bbc45d7e85e0b?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/18ad1b72ac03dc5a1e26466b33f7db5191c4f7f08bd5800f393bbc45d7e85e0b?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Jain Arpit Ashok"},"url":"https:\/\/webkul.com\/blog\/author\/jainarpitashok-presta366\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/520272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/743"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=520272"}],"version-history":[{"count":40,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/520272\/revisions"}],"predecessor-version":[{"id":520764,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/520272\/revisions\/520764"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=520272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=520272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=520272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}