Knowledge Base

How to add Natterly to Blesta

Edit /app/views/client/bootstrap/structure.pdt

Add this code to it:

<script src="https://cdn.natterly.com/chatbox.js"></script>
        <?php if($logged_in){ ?>
        <script>
          var chatbox = new NatterlyChatbox('SITE_HASH');
          chatbox.visitor.name = '<?php $this->Html->_($contact->first_name);?> <?php $this->Html->_($contact->last_name);?>';
          chatbox.visitor.emailAddress = '<?php $this->Html->_($contact->email);?>';
          chatbox.customData.Client_Number = "#<?php $this->Html->_($client->id_value);?>";
          chatbox.customData.Account_Status = "<?php $this->Html->_($client->status);?>";
          chatbox.render();
        </script>
        <?php }else{ ?>
        <script>
          chatbox = new NatterlyChatbox("SITE_HASH");
          chatbox.render();
        </script>
        <?php } ?>

Change SITE_HASH to your hash.

Please rate this article to help us improve our Knowledge Base.

0 0