initial module
This commit is contained in:
@@ -0,0 +1,181 @@
|
||||
{if $confirmation}
|
||||
{$confirmation nofilter}
|
||||
{/if}
|
||||
|
||||
<form method="post" action="{$form_action|escape:'htmlall':'UTF-8'}">
|
||||
<div class="panel">
|
||||
<div class="panel-heading">
|
||||
<i class="icon-envelope"></i>
|
||||
{l s='Review invitations (Automatic Feedback Service)' d='Modules.Wstrustpilotafsbcc.Admin'}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p class="help-block">
|
||||
{l s='Enter the unique invitation address from this site\'s Trustpilot Business Portal (AFS / invitation setup). It will be BCC\'d on every e-mail matching one of the trigger templates below.' d='Modules.Wstrustpilotafsbcc.Admin'}
|
||||
</p>
|
||||
<div class="form-group">
|
||||
<label for="bcc_email" class="control-label">
|
||||
{l s='Trustpilot AFS invitation address' d='Modules.Wstrustpilotafsbcc.Admin'}
|
||||
</label>
|
||||
<input
|
||||
type="email"
|
||||
id="bcc_email"
|
||||
name="bcc_email"
|
||||
class="form-control"
|
||||
placeholder="xxxxxxxxxx@invite.trustpilot.com"
|
||||
value="{$bcc_email|escape:'htmlall':'UTF-8'}"
|
||||
>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="trigger_templates" class="control-label">
|
||||
{l s='Trigger e-mail templates (comma-separated)' d='Modules.Wstrustpilotafsbcc.Admin'}
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
id="trigger_templates"
|
||||
name="trigger_templates"
|
||||
class="form-control"
|
||||
value="{$trigger_templates|escape:'htmlall':'UTF-8'}"
|
||||
>
|
||||
<p class="help-block">
|
||||
{l s='Mail template name(s) as used by Mail::send(), e.g. order_conf. ' d='Modules.Wstrustpilotafsbcc.Admin'}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<h4>{l s='Invitation language per shop language' d='Modules.Wstrustpilotafsbcc.Admin'}</h4>
|
||||
<p class="help-block">
|
||||
{l s='Added to the trigger e-mail as Trustpilot structured data, so each customer gets the invitation in their own language. The template ID is optional: leave it empty to use your default template for that locale.' d='Modules.Wstrustpilotafsbcc.Admin'}
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Language' d='Modules.Wstrustpilotafsbcc.Admin'}</th>
|
||||
<th>{l s='Trustpilot locale (e.g. nl-BE)' d='Modules.Wstrustpilotafsbcc.Admin'}</th>
|
||||
<th>{l s='Invitation template ID (optional)' d='Modules.Wstrustpilotafsbcc.Admin'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $languages as $language}
|
||||
{assign var='idLang' value=$language.id_lang}
|
||||
<tr>
|
||||
<td>{$language.name|escape:'htmlall':'UTF-8'}</td>
|
||||
<td>
|
||||
<input
|
||||
type="text"
|
||||
name="afs_locale[{$idLang|intval}]"
|
||||
class="form-control"
|
||||
value="{if isset($afs_locales[$idLang])}{$afs_locales[$idLang]|escape:'htmlall':'UTF-8'}{/if}"
|
||||
>
|
||||
</td>
|
||||
<td>
|
||||
<input
|
||||
type="text"
|
||||
name="afs_template_id[{$idLang|intval}]"
|
||||
class="form-control"
|
||||
value="{if isset($afs_template_ids[$idLang])}{$afs_template_ids[$idLang]|escape:'htmlall':'UTF-8'}{/if}"
|
||||
>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-heading">
|
||||
<i class="icon-star"></i>
|
||||
{l s='TrustBox widget (homepage header)' d='Modules.Wstrustpilotafsbcc.Admin'}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p class="help-block">
|
||||
{l s='Shown on the homepage only: in the header bar on desktop, and in its own bar at the top on mobile. Copy the IDs from the TrustBox code in your Trustpilot Business Portal (Integrations > TrustBox library).' d='Modules.Wstrustpilotafsbcc.Admin'}
|
||||
</p>
|
||||
<div class="form-group">
|
||||
<label for="trustbox_enabled" class="control-label">
|
||||
{l s='Show TrustBox' d='Modules.Wstrustpilotafsbcc.Admin'}
|
||||
</label>
|
||||
<select id="trustbox_enabled" name="trustbox_enabled" class="form-control">
|
||||
<option value="0"{if !$trustbox_enabled} selected{/if}>{l s='No' d='Admin.Global'}</option>
|
||||
<option value="1"{if $trustbox_enabled} selected{/if}>{l s='Yes' d='Admin.Global'}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="trustbox_business_unit_id" class="control-label">
|
||||
{l s='Business unit ID (data-businessunit-id)' d='Modules.Wstrustpilotafsbcc.Admin'}
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
id="trustbox_business_unit_id"
|
||||
name="trustbox_business_unit_id"
|
||||
class="form-control"
|
||||
value="{$trustbox_business_unit_id|escape:'htmlall':'UTF-8'}"
|
||||
>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="trustbox_template_id" class="control-label">
|
||||
{l s='TrustBox template ID (data-template-id)' d='Modules.Wstrustpilotafsbcc.Admin'}
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
id="trustbox_template_id"
|
||||
name="trustbox_template_id"
|
||||
class="form-control"
|
||||
value="{$trustbox_template_id|escape:'htmlall':'UTF-8'}"
|
||||
>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="trustbox_theme" class="control-label">
|
||||
{l s='Theme' d='Modules.Wstrustpilotafsbcc.Admin'}
|
||||
</label>
|
||||
<select id="trustbox_theme" name="trustbox_theme" class="form-control">
|
||||
{foreach $trustbox_themes as $themeLabel => $themeValue}
|
||||
<option value="{$themeValue|escape:'htmlall':'UTF-8'}"{if $trustbox_theme == $themeValue} selected{/if}>
|
||||
{$themeLabel|escape:'htmlall':'UTF-8'}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<h4>{l s='Widget language and profile link per shop language' d='Modules.Wstrustpilotafsbcc.Admin'}</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Language' d='Modules.Wstrustpilotafsbcc.Admin'}</th>
|
||||
<th>{l s='Trustpilot locale (e.g. nl-BE)' d='Modules.Wstrustpilotafsbcc.Admin'}</th>
|
||||
<th>{l s='Trustpilot profile URL' d='Modules.Wstrustpilotafsbcc.Admin'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $languages as $language}
|
||||
{assign var='idLang' value=$language.id_lang}
|
||||
<tr>
|
||||
<td>{$language.name|escape:'htmlall':'UTF-8'}</td>
|
||||
<td>
|
||||
<input
|
||||
type="text"
|
||||
name="trustbox_locale[{$idLang|intval}]"
|
||||
class="form-control"
|
||||
value="{if isset($trustbox_locales[$idLang])}{$trustbox_locales[$idLang]|escape:'htmlall':'UTF-8'}{/if}"
|
||||
>
|
||||
</td>
|
||||
<td>
|
||||
<input
|
||||
type="url"
|
||||
name="trustbox_profile_url[{$idLang|intval}]"
|
||||
class="form-control"
|
||||
value="{if isset($trustbox_profile_urls[$idLang])}{$trustbox_profile_urls[$idLang]|escape:'htmlall':'UTF-8'}{/if}"
|
||||
>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<button type="submit" name="submitWsTrustpilotAfsBcc" class="btn btn-default pull-right">
|
||||
<i class="process-icon-save"></i>
|
||||
{l s='Save' d='Modules.Wstrustpilotafsbcc.Admin'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1,11 @@
|
||||
<div
|
||||
class="trustpilot-widget"
|
||||
data-locale="{$trustbox.locale}"
|
||||
data-template-id="{$trustbox.template_id}"
|
||||
data-businessunit-id="{$trustbox.business_unit_id}"
|
||||
data-style-height="24px"
|
||||
data-style-width="100%"
|
||||
data-theme="{$trustbox.theme}"
|
||||
>
|
||||
<a href="{$trustbox.profile_url}" target="_blank" rel="noopener">Trustpilot</a>
|
||||
</div>
|
||||
@@ -0,0 +1 @@
|
||||
<script type="application/json+trustpilot">{$snippet_placeholder nofilter}</script>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div class="ws-trustbox ws-trustbox--desktop col-auto">
|
||||
{include file='module:ws_trustpilotafsbcc/views/templates/hook/_partials/trustbox.tpl'}
|
||||
</div>
|
||||
@@ -0,0 +1,5 @@
|
||||
<div class="ws-trustbox ws-trustbox--mobile d-md-none">
|
||||
<div class="container">
|
||||
{include file='module:ws_trustpilotafsbcc/views/templates/hook/_partials/trustbox.tpl'}
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user