smartsupp/chat-code-generator

There is no license information available for the latest version (1.0.2) of this package.

This simple PHP class allows you to easily generate Smartsupp.com JS chat code.

1.0.2 2020-03-11 16:38 UTC

This package is auto-updated.

Last update: 2024-04-12 01:17:31 UTC


README

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('johny@depp.com');
  $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.