add live support to customer area

majid1f

Active Member
MailWizz 2.0 Tester
Hi
1. How i can add a javascript code (like userengage, zopim, livechat...) to customer area?
2. Right now a little more complicated question:D
In the below code:
.......................
<script>window.civchat = {
apiKey: "<selected application API key>",
name: "David T. Black",
email: "DavidTBlack@jourrapide.com"
};</script>
<script src="https://widget.userengage.io/widget.js"></script>
........................
I want add this javascript part to customer area and change name and email with my customer specifications:oops:
Best regards
 
Easiest way is to simple edit the apps/customer/views/layouts/main.php and add it there.
More complex would be to have a theme and put the code in your theme.
 
Hi, How can we add this chat script in Frontend page.
Only the landing page of the app?

In apps/init-custom.php

PHP:
<?php
    
    hooks()->addAction('layout_footer_html', function() {
        if (apps()->isAppName('frontend') && controller()->getRoute() === 'site/index') {
            ?>
            Your embed code here
            <?php
        }
    });
 
Back
Top