It only takes a few minutes to integrate AtomChat with your website! Once installed, you’ll be able to enable vendors and customers to chat with each other in real-time.
A buyer on your website will browse through products listed by vendors on their pages. Similar to buying something just by clicking on a 'Buy Now' button, the most efficient way to enable a buyer to connect with the seller is by adding a 'Chat Now' button on their profiles!
First, you need to create a button on your end. Once you've created and added a 'Chat Now' button against vendor profiles, clicking the button now has to action to open their private chat window.
We'll guide you how!
i. Create and add the button on your site against vendor profiles.
Here, you need to pass the user_id of the user to "uid" dynamically. This is the user_id of the vendor whose chat window should open.
In the above example, we have passed uid "1". This will open the chat box of the user whose user_id is "1". And this should be dynamically passed.
For example, if you are using WordPress, uid will be WordPress user_id.
You may want an inbox-like layout, i.e our embedded chat window for vendors and buyers. This layout can be opened by clicking a button.
i. Add AtomChat's Embedded layout to a page on your website.
ii. Create and add the button on your site.
iii. To launch the chat window on button click from one page to another page where you have the embedded integrated, you can refer to this sample code-
Please replace the href value with the page URL where you have AtomChat's embedded layout on your website and pass the userid value in the URL as GET parameter.
For userid, you need to pass the value of selected user's userid dynamically.
iv. After the first click event, you are redirected to the embedded layout chat page. Then, you need to use this passed userid value in the URL to launch the selected user's chat box in the layout directly.