This is simple PHP class for Smartsupp chat API which helps you to generate chat JavaScript code.
- https://www.smartsupp.com/
- More info about Smartsupp CHAT API This is "Get started" doc for chat API.
- More info about Smartsupp CHAT API - Overview This is full documentation for chat API. Note, that not all properties are possible to be set using this class.
Here is an example on how to use it:
$chat = new Smartsupp\ChatGenerator;
$chat->setKey('XYZ123456');
$chat->disableSendEmailTranscript();
$chat->enableRating('advanced', true);
$chat->setBoxPosition('left', 'side', 20, 120);
$chat->setName('Johny Depp');
$chat->setEmail('[email protected]');
$chat->setVariable('orderTotal', 'Total orders', 150);
$chat->setVariable('lastOrder', 'Last ordered', '2015-07-09');
$chat->setGoogleAnalytics('UA-123456');
$data = $chat->render();
For backward compatibility with multiple plugins library supports PHP starting from version 5.3. It is highly possibly the constraint will change to 5.6+ in near future.
Copyright (c) since 2016 Smartsupp.com, s.r.o.