first commit
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
|
||||
*}
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="card gamification_banner">
|
||||
<h3 class="card-header">
|
||||
<i class="material-icons">extension</i> {l s='Boost your sales by offering payment in 3 or 4 installments to your customers' mod='gamification'}
|
||||
</h3>
|
||||
<div class="card-block">
|
||||
<div class="module-item-list">
|
||||
<div class="row module-item-wrapper-list py-3">
|
||||
<div class="col-12 col-sm-2 col-md-2 col-lg-3">
|
||||
<img class="m-auto img-fluid" src="{$pspaylater_img_path|escape:'htmlall':'UTF-8'}" alt="{l s='PrestaShop Paylater with PayPlug & Oney' mod='gamification'}" title="{l s='PrestaShop Paylater with PayPlug & Oney' mod='gamification'}" />
|
||||
</div>
|
||||
<div class="col-12 col-sm-6 col-md-7 col-lg-7 pl-0">
|
||||
<p>{l s='PrestaShop Paylater is the official PrestaShop payment in installments solution.' mod='gamification'}</p>
|
||||
<ul class="text-muted">
|
||||
<li class="mb-1">{l s='Up to 70% increase in average shopping cart value on your store' mod='gamification'}</li>
|
||||
<li class="mb-1">{l s='Full coverage for fraud and outstanding payments' mod='gamification'}</li>
|
||||
<li class="mb-1">{l s='Up to 98% payment acceptance rate for your shoppers' mod='gamification'}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-12 col-sm-4 col-md-3 col-lg-2 mb-3 m-auto">
|
||||
<div class="text-xs-center">
|
||||
{if $pspaylater_enabled}
|
||||
<a href="{$pspaylater_configure_link|escape:'htmlall':'UTF-8'}" class="btn btn-primary-reverse btn-outline-primary light-button">
|
||||
{l s='Configure' mod='gamification'}
|
||||
</a>
|
||||
{else}
|
||||
<form class="btn-group form-action-button" method="post" action="{$pspaylater_install_link|escape:'htmlall':'UTF-8'}">
|
||||
<button type="submit" class="btn btn-primary-reverse btn-outline-primary module_action_menu_install" data-confirm_modal="module-modal-confirm-pspaylater-install">
|
||||
{l s='Install' mod='gamification'}
|
||||
</button>
|
||||
</form>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
45
modules/gamification/views/templates/hook/notification.tpl
Normal file
45
modules/gamification/views/templates/hook/notification.tpl
Normal file
@@ -0,0 +1,45 @@
|
||||
<script>
|
||||
var current_id_tab = {$current_id_tab|intval};
|
||||
var current_level_percent = {$current_level_percent|intval};
|
||||
var current_level = {$current_level|intval};
|
||||
var gamification_level = '{l s='Level' mod='gamification' js=1}';
|
||||
</script>
|
||||
<style>
|
||||
{literal}.gamification_progress-label {top:-1px!important;-moz-border-radius: 15px;-o-border-radius: 15px;-webkit-border-radius: 15px;border-radius: 15px;height:19px;background-image: url(../modules/gamification/views/img/gamification-bar-bg.png) ;width: {/literal}{$current_level_percent}{literal}%}{/literal}
|
||||
</style>
|
||||
<div id="gamification_notif" class="notifs">
|
||||
{if $notification}
|
||||
<span id="gamification_notif_number_wrapper" class="number_wrapper" style="display: inline;">
|
||||
<span id="gamification_notif_value">{$notification|intval}</span>
|
||||
</span>
|
||||
{/if}
|
||||
<div id="gamification_notif_wrapper" class="notifs_wrapper" style="width:340px">
|
||||
<div id="gamification_top">
|
||||
<h3>{l s='Your Merchant Expertise' mod='gamification'}</h3>
|
||||
</div>
|
||||
<span style="font-size: 15px;color: #585A69;text-shadow: 0 1px 0 #fff;">{l s='Level' mod='gamification'} {$current_level|intval} : {$current_level_percent|intval} %</span>
|
||||
<div id="gamification_progressbar">
|
||||
<span class="gamification_progress-label"></span>
|
||||
</div>
|
||||
<div id="gamification_badges_container">
|
||||
<ul id="gamification_badges_list" style="{if $badges_to_display|count <= 2} height:140px;{/if}">
|
||||
{foreach from=$badges_to_display name=badge_list item=badge}
|
||||
{if $badge->id}
|
||||
<li class="{if $badge->validated} unlocked {else} locked {/if}" style="float:left;">
|
||||
<span class="{if $badge->validated} unlocked_img {else} locked_img {/if}"></span>
|
||||
<div class="gamification_badges_title"><span>{if $badge->validated} {l s='Last badge:' mod='gamification'} {else} {l s='Next badge:' mod='gamification'} {/if}</span></div>
|
||||
<div class="gamification_badges_img"><img src="{$badge->getBadgeImgUrl()}" loading="lazy"></div>
|
||||
<div class="gamification_badges_name">{$badge->name|escape:html:'UTF-8'}</div>
|
||||
</li>
|
||||
{else}
|
||||
<li style="height:130px"></li>
|
||||
{/if}
|
||||
{if $smarty.foreach.badge_list.iteration is not odd && $badges_to_display|count > 2}
|
||||
<div class="clear"> </div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
<a id="gamification_see_more" href="{$link->getAdminLink('AdminGamification')}">{l s='View my complete profile' mod='gamification'}</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,97 @@
|
||||
<script>
|
||||
var current_id_tab = {$current_id_tab|intval};
|
||||
var current_level_percent = {$current_level_percent|intval};
|
||||
var current_level = {$current_level|intval};
|
||||
var gamification_level = '{l s='Level' mod='gamification' js=1}';
|
||||
var advice_hide_url = '{$advice_hide_url}';
|
||||
var hide_advice = '{l s='Do you really want to hide this advice?' mod='gamification' js=1}';
|
||||
|
||||
$('#dropdown_gamification .notifs_panel_header, #dropdown_gamification .tab-content').click(function () {
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#dropdown_gamification .panel-footer').click(function (elt) {
|
||||
window.location.href = '{$link->getAdminLink('AdminGamification')}';
|
||||
});
|
||||
|
||||
$('#gamification_tab li').click(function () {
|
||||
gamificationDisplayTab($(this).children('a'));
|
||||
return false;
|
||||
});
|
||||
|
||||
function gamificationDisplayTab(elt)
|
||||
{
|
||||
$('#gamification_tab li, .gamification-tab-pane').removeClass('active');
|
||||
$(elt).parent('li').addClass('active');
|
||||
$('#'+$(elt).data('target')).addClass('active');
|
||||
}
|
||||
|
||||
</script>
|
||||
<li id="gamification_notif" style="background:none" class="dropdown">
|
||||
<a href="javascript:void(0);" class="dropdown-toggle gamification_notif" data-toggle="dropdown">
|
||||
<img src="{$link->getBaseLink()}modules/gamification/views/img/trophy.png" alt="{$notification|intval}"/>
|
||||
<span id="gamification_notif_number_wrapper" class="notifs_badge">
|
||||
<span id="gamification_notif_value">{$notification|intval}</span>
|
||||
</span>
|
||||
</a>
|
||||
<div class="dropdown-menu notifs_dropdown" id="dropdown_gamification">
|
||||
<section id="gamification_notif_wrapper" class="notifs_panel">
|
||||
<header class="notifs_panel_header">
|
||||
<p>
|
||||
<span class="notifs-title">{l s='Your Merchant Expertise' mod='gamification'}</span>
|
||||
<span class="notifs-level">{l s='Level' mod='gamification'} {$current_level|intval} : {$current_level_percent|intval} %</span>
|
||||
</p>
|
||||
</header>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="{$current_level_percent|intval}" aria-valuemin="0" aria-valuemax="100" style="width: {$current_level_percent|intval}%;">
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs" id="gamification_tab">
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="#home" data-toggle="tab" data-target="gamification_1" onclick="gamificationDisplayTab(this); return false;">{l s='Last badge:' mod='gamification'}</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#profile" data-toggle="tab" data-target="gamification_2" onclick="gamificationDisplayTab(this); return false;">{l s='Next badge:' mod='gamification'}</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane gamification-tab-pane active" id="gamification_1">
|
||||
<ul id="gamification_badges_list" style="{if $badges_to_display|count <= 2} height:170px;{/if} padding-left:0">
|
||||
{foreach from=$unlock_badges name=badge_list item=badge key="i"}
|
||||
{if $badge->id}
|
||||
<li class="{if $badge->validated} unlocked {else} locked {/if}" style="float:left;">
|
||||
<span class="{if $badge->validated} unlocked_img {else} locked_img {/if}" {if $badge->validated}style="left: 12px;"{/if}></span>
|
||||
<div class="gamification_badges_title"><span>{if $badge->validated} {l s='Last badge:' mod='gamification'} {else} {l s='Next badge:' mod='gamification'} {/if}</span></div>
|
||||
<div class="gamification_badges_img" data-placement="{if $i <= 1}bottom{else}top{/if}" data-original-title="{$badge->description|escape:html:'UTF-8'}"><img src="{$badge->getBadgeImgUrl()}" loading="lazy"></div>
|
||||
<div class="gamification_badges_name">{$badge->name|escape:html:'UTF-8'}</div>
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tab-pane gamification-tab-pane" id="gamification_2">
|
||||
<ul id="gamification_badges_list" style="{if $badges_to_display|count <= 2} height:170px;{/if} padding-left:0">
|
||||
{foreach from=$next_badges name=badge_list item=badge key="i"}
|
||||
{if $badge->id && !$badge->awb}
|
||||
<li class="{if $badge->validated} unlocked {else} locked {/if}" style="float:left;">
|
||||
<span class="{if $badge->validated} unlocked_img {else} locked_img {/if}" {if $badge->validated}style="left: 12px;"{/if}></span>
|
||||
<div class="gamification_badges_title"><span>{if $badge->validated} {l s='Last badge:' mod='gamification'} {else} {l s='Next badge:' mod='gamification'} {/if}</span></div>
|
||||
<div class="gamification_badges_img" data-placement="{if $i <= 1}bottom{else}top{/if}"data-toggle="tooltip" data-original-title="{$badge->description|escape:html:'UTF-8'}"><img src="{$badge->getBadgeImgUrl()}" loading="lazy"></div>
|
||||
<div class="gamification_badges_name">{$badge->name|escape:html:'UTF-8'}</div>
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="panel-footer">
|
||||
<a href="{$link->getAdminLink('AdminGamification')}">{l s='View my complete profile' mod='gamification'} <i class="icon-chevron-right icon-fw"></i><i class="material-icons">chevron_right</i></a>
|
||||
</footer>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
Reference in New Issue
Block a user