WhatsApp Integration for Magento 2

Adds a WhatsApp chat button to every Magento 2 page, an Ask on WhatsApp button on product pages and a help banner on category pages. Position, colors and the pre-filled message are set in the admin.

Magento 2.4.6, 2.4.8 PHP 8.1, 8.4 Hyva + Luma Ready Free

Key Features:

  • Floating Chat Button (All Pages)
  • Product Page Inquiry Button
  • Category Page Assistance Banner
  • Admin Configuration (Zero-Code)

Additional Services

$0.00
In stock
SKU
panth-whatsapp
Links
Pay with Wise
Lifetime Updates Every Magento release
1-Year Free Support Email + WhatsApp
Adobe-Certified Magento 2 Developer
Free Forever No subscription, no upsell
What you get

Everything in the box

Built-in from day one. No add-ons, no upsell, no licence keys to renew.

Floating Chat Button (All Pages)

Always-visible WhatsApp icon anchored to the storefront on every page

Product Page Inquiry Button

Dedicated "Ask on WhatsApp" button rendered on product pages

Category Page Assistance Banner

Optional "Need help finding the right product? Chat with us" banner on category listing pages

Admin Configuration (Zero-Code)

Single consolidated config section under Stores → Configuration → Panth Extensions → WhatsApp

Business Hours & Greetings

Optional business hours, show a different message / icon outside working hours

Theme-Aware Styling

Full Hyva (Alpine.js + Tailwind) and Luma (jQuery + Knockout) templates shipped in the module

Overview

The WhatsApp Integration for Magento 2 is a click-to-chat module for Magento 2 and Adobe Commerce that turns every storefront page into a live support channel. It adds a floating chat button, a product-page inquiry button with pre-filled SKU and URL, and a category-page assistance banner without theme edits or API setup.

The floating WhatsApp button sits on every page in a configurable corner (bottom-right, bottom-left, top-right, top-left) with adjustable X/Y offsets so it never collides with cookie banners or back-to-top widgets. On product detail pages, the "Ask on WhatsApp" button pre-fills the message with product name, SKU, price, and canonical URL - so your support team sees the context the moment the chat opens. Category pages get an optional assistance banner ("Need help finding the right product?") with the category name auto-injected into the conversation.

Every setting is per-store-view, so multi-country merchants can route different storefronts to different WhatsApp numbers, templates, business hours, and time zones. Hyva templates run on Alpine.js and Tailwind; Luma templates use the standard block/phtml pattern - both shipped, automatically selected by theme detection. The WhatsApp Integration for Magento 2 renders server-side as a plain <a> tag using the public wa.me link, so there are no third-party scripts, trackers, or blocking resources. Optional whatsapp_click GA4/GTM events measure chat-driven conversions. Magento 2.4.4 - 2.4.8, PHP 8.1 - 8.4.

Best for:

  • B2B wholesale and high-ticket stores where shoppers want to talk before buying
  • Regional merchants in India, LATAM, MENA, and SEA where WhatsApp dominates
  • Stores that want pre-purchase support without paying for the WhatsApp Business API

What you get

The WhatsApp Integration for Magento 2 covers every surface that drives chat conversion:

  • Floating button on every page with four-corner placement, custom offsets, and tooltip
  • Product page "Ask on WhatsApp" button with auto-injected name, SKU, price, and URL
  • Category page assistance banner with configurable headline, CTA, and category context
  • Business-hours support with offline message and per-store time-zone awareness
  • Hyva (Alpine.js plus Tailwind) and Luma templates with automatic theme detection
  • Optional whatsapp_click GA4 / GTM events with surface and product context

Magento 2 WhatsApp Integration

Adds WhatsApp contact points to a Magento 2 storefront: a floating chat button on every page, an inquiry button on product pages that pre-fills the product name and URL, and an assistance banner on category pages. Each element opens a wa.me link to the phone number you configure, with a pre-filled message. Nothing is sent from the server; the customer's own WhatsApp app or WhatsApp Web handles the conversation.

It suits stores that take product questions and orders over WhatsApp and want the button placed consistently without editing theme files. Works with the Hyva and Luma themes.

Product page: kishansavaliya.com/magento-2-whatsapp.html

Features

  • Floating button on all pages except checkout with a configurable phone number, pre-filled message, hover text (shown on hover and keyboard focus, opening toward the page) and position (bottom right, bottom left, top right, top left). It uses z-index 30, hides while a drawer, dialog, modal, open search or mobile menu is shown (on phones and tablets while a form field has focus, and on phones while the filter panel is open), fades out while it would cover the layered navigation toggle, filter controls, toolbar sorter or pager (or any element with data-panth-float-avoid), and moves up above bottom notification bars through --panth-bottom-bar-offset. Floating elements share one bottom stack per side: back-to-top sits at the bottom, the WhatsApp button above it, the EU withdrawal tab (phones and tablets) above that. Each element adds --panth-bottom-bar-offset (bottom notification bars), the slot variables --panth-float-slot-btt-<side> and --panth-float-slot-wa-<side> of the elements below it, and --panth-float-edge (24px, 16px below 768px).
  • Product page button with its own text and message template; {product_name} and {product_url} are replaced with the product being viewed. Four styles: solid, outline and text only render as a labelled secondary button (WhatsApp green only in the icon); icon only renders a round icon button.
  • Category page banner with its own text and message; the current category name is appended to the message.
  • Each of the three elements has its own enable switch and can be configured per default, website or store view.
  • Optional extra CSS classes for all elements.
  • Colours and sizes are defined in etc/theme-config.json and exposed as CSS variables through Panth Core, so a theme can override them without touching the templates.
  • No database tables, no cron jobs, no console commands and no calls to the WhatsApp Business API.

Usage

  • Floating button: rendered from the default layout handle in the before.body.end container (so it comes after the page content in keyboard tab order) whenever "Enable WhatsApp Float Button" is Yes. Clicking it opens https://wa.me/<number>?text=<message>.
  • Product page button (block whatsapp.product.button): added to the content container after product.info.main on catalog_product_view, so on Luma it is shown below the product information and gallery, directly above the product tabs and outside the buy box. On Hyva themes the hyva_catalog_product_view handle moves it into product.info.additional, at the end of the product information card below the buy box. It shows for every product type, with or without options, and renders only when the product page switch is Yes.
  • Category banner: added at the end of the content container on catalog_category_view, below the product list and its pagination; renders only when the category switch is Yes.

Colours and sizes (button background and text colour, floating button size, icon size, side offset, bottom offset) come from etc/theme-config.json. Panth Core turns that file into CSS variables on every page, and a theme can override those variables in its own CSS. See the user guide for the variable names.

Templates can be overridden in a theme under Panth_WhatsApp/templates/: whatsapp-float.phtml, product/button.phtml and category/banner.phtml.

Documentation

  • USER_GUIDE.md: installation, configuration of each element, colour customisation through theme-config.json and troubleshooting.

Changelog

See CHANGELOG.md.

Compatibility

Magento Open Source / Adobe Commerce 2.4.4 to 2.4.8
PHP 8.1, 8.2, 8.3, 8.4
Themes Hyva and Luma

The Composer package requires magento/framework ^103.0, magento/module-backend ^102.0, magento/module-catalog ^104.0, magento/module-config ^101.2 and magento/module-store ^101.1.

Requirements

  • Magento 2.4.4 or later
  • PHP 8.1 to 8.4
  • mage2kishan/module-core (installed automatically by Composer; provides the shared "Panth Extensions" admin tab and the CSS variable output used for colours and sizes)
  • A phone number registered with WhatsApp (a WhatsApp Business account is not required)

Installation

composer require mage2kishan/module-whatsapp
bin/magento module:enable Panth_Core Panth_WhatsApp
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush

setup:di:compile is only needed in production mode. The templates carry their own styles, so no static content deployment is required.

Check the result with:

bin/magento module:status Panth_WhatsApp

All three elements are switched off by default, so nothing appears on the storefront until you enable them in the configuration.

Configuration

Go to Stores > Configuration > Panth Extensions > WhatsApp Integration.

Float Button Settings:

Setting Default What it does
Enable WhatsApp Float Button No Shows the floating button on every page.
WhatsApp Phone Number (empty) Number with country code, for example +1234567890. Non-digits are stripped when the link is built. No WhatsApp element is shown until a number is set.
Default Message Hi! I have a question about your products. Pre-filled message for the floating button.
Button Text Chat with Us Text shown on hover.
Button Position Bottom Left Bottom right, bottom left, top right or top left.

Product Page Settings:

Setting Default What it does
Enable WhatsApp on Product Pages No Shows the button on product detail pages. Needs "Enable WhatsApp Float Button" set to Yes and a phone number, because the button uses those float button settings.
Button Text Ask on WhatsApp Label of the product page button.
Message Template Hi! I'm interested in {product_name}. {product_url} {product_name} and {product_url} are replaced for the product being viewed.
Button Style Solid Solid, outline, icon only or text only. Stores that still hold the older stored value default see it listed as "Default (Text Only, legacy value)"; it renders like text only and is kept when the section is saved.

Category Page Settings:

Setting Default What it does
Enable WhatsApp on Category Pages No Shows the assistance banner below the product listing. Needs "Enable WhatsApp Float Button" set to Yes and a phone number, because the banner uses those float button settings.
Button Text Chat with Us Label of the banner button.
Message Template Hi! I need help finding products in your store. Pre-filled message; the current category name is appended.

Advanced Styling:

Setting Default What it does
Custom CSS Classes (empty) Extra CSS classes added to the WhatsApp elements, one per line.

The phone number is shared by all three elements. Configuration paths start with panth_whatsapp/general/, panth_whatsapp/product/, panth_whatsapp/category/ and panth_whatsapp/advanced/.

Uninstallation

bin/magento module:disable Panth_WhatsApp
composer remove mage2kishan/module-whatsapp
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush

The module creates no database tables. Its configuration values remain in core_config_data until removed.

License

Commercial software license. See LICENSE.txt in this repository.

Developer Notes

  • Module name: Panth_WhatsApp
  • Composer package: mage2kishan/module-whatsapp
  • PHP namespace: Panth\WhatsApp
  • View models: Panth\WhatsApp\ViewModel\FloatButton, Panth\WhatsApp\ViewModel\Product, Panth\WhatsApp\ViewModel\Category (each exposes getWhatsAppUrl())
  • Config helper: Panth\WhatsApp\Helper\Data
  • ACL resource for the configuration section: Panth_WhatsApp::config
More Information
Module Category Forms & Communication
Best For All Sizes
FAQ

Frequently Asked Questions

Do I need a WhatsApp Business account?

No, any valid WhatsApp number works. However, a WhatsApp Business account is strongly recommended for commercial use (auto-replies, labels, catalog).

Does this use the WhatsApp Business API?

No. This module uses the public wa.me click-to-chat link, which is free and requires no API setup. For automated outbound messaging you would need the WhatsApp Business API (separate product).

Can I use different numbers for different stores?

Yes. Every setting respects Magento's scope hierarchy (default → website → store view), so each store view can have its own number, templates, and colors.

Does it work with Hyva?

Yes. Full native Hyva templates are shipped. No compatibility module needed, the module ships with both Hyva and Luma templates and switches automatically.

Will it slow down my store?

No. The button is rendered server-side as a simple <a> tag. There are no third-party scripts, no trackers, and no blocking resources.

Can I track clicks in Google Analytics?

Yes. Enable Analytics Events in the config, every click fires a whatsapp_click event with surface and context.

Does it support multi-language stores?

Yes. All admin and frontend strings use Magento's __() translation function and can be translated to any language.

Can I hide the button on specific pages?

Yes. Use standard Magento layout XML to remove the panth.whatsapp.floating block from specific handles.


Need this customised?

Talk to Kishan directly: written quote, scope and timeline within 24 hours. No sales call.

WhatsApp Integration for Magento 2

$0.00
Step up

Customers usually upgrade to

Chat on WhatsApp