Skip to content

smartsupp/chat-code-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Coverage Status

Smartsupp chat code generator

This is simple PHP class for Smartsupp chat API which helps you to generate chat JavaScript code.

Get Started

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();

Requirements

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

Copyright (c) since 2016 Smartsupp.com, s.r.o.