[+] FO : New Responsive, Bootstrap template
This commit is contained in:
@@ -0,0 +1,212 @@
|
||||
{*
|
||||
* 2007-2013 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* 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.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2013 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{capture name=path}<a href="{$link->getPageLink('my-account', true)|escape:'html'}" title="{l s='Manage my account' mod='loyalty'}" rel="nofollow">{l s='My account' mod='loyalty'}</a><span class="navigation-pipe">{$navigationPipe}</span><span class="navigation_page">{l s='My loyalty points' mod='loyalty'}</span>{/capture}
|
||||
|
||||
<h1 class="page-heading">{l s='My loyalty points' mod='loyalty'}</h1>
|
||||
|
||||
{if $orders}
|
||||
<div class="block-center" id="block-history">
|
||||
{if $orders && count($orders)}
|
||||
<table id="order-list" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="first_item">{l s='Order' mod='loyalty'}</th>
|
||||
<th class="item">{l s='Date' mod='loyalty'}</th>
|
||||
<th class="item">{l s='Points' mod='loyalty'}</th>
|
||||
<th class="last_item">{l s='Points Status' mod='loyalty'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr class="alternate_item">
|
||||
<td colspan="2" class="history_method bold" style="text-align:center;">{l s='Total points available:' mod='loyalty'}</td>
|
||||
<td class="history_method" style="text-align:left;">{$totalPoints|intval}</td>
|
||||
<td class="history_method"> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
{foreach from=$displayorders item='order'}
|
||||
<tr class="alternate_item">
|
||||
<td class="history_link bold">{l s='#' mod='loyalty'}{$order.id|string_format:"%06d"}</td>
|
||||
<td class="history_date">{dateFormat date=$order.date full=1}</td>
|
||||
<td class="history_method">{$order.points|intval}</td>
|
||||
<td class="history_method">{$order.state|escape:'htmlall':'UTF-8'}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="block-order-detail" class="unvisible"> </div>
|
||||
{else}
|
||||
<p class="alert alert-warning">{l s='You have not placed any orders.'}</p>
|
||||
{/if}
|
||||
</div>
|
||||
<div id="pagination" class="pagination">
|
||||
{if $nbpagination < $orders|@count}
|
||||
<ul class="pagination">
|
||||
{if $page != 1}
|
||||
{assign var='p_previous' value=$page-1}
|
||||
<li id="pagination_previous">
|
||||
<a href="{summarypaginationlink p=$p_previous n=$nbpagination}" title="{l s='Previous' mod='loyalty'}" rel="nofollow">« {l s='Previous' mod='loyalty'}</a>
|
||||
</li>
|
||||
{else}
|
||||
<li id="pagination_previous" class="disabled"><span>« {l s='Previous' mod='loyalty'}</span></li>
|
||||
{/if}
|
||||
{if $page > 2}
|
||||
<li><a href="{summarypaginationlink p='1' n=$nbpagination}" rel="nofollow">1</a></li>
|
||||
{if $page > 3}
|
||||
<li class="truncate">...</li>
|
||||
{/if}
|
||||
{/if}
|
||||
{section name=pagination start=$page-1 loop=$page+2 step=1}
|
||||
{if $page == $smarty.section.pagination.index}
|
||||
<li class="current"><span>{$page|escape:'htmlall':'UTF-8'}</span></li>
|
||||
{elseif $smarty.section.pagination.index > 0 && $orders|@count+$nbpagination > ($smarty.section.pagination.index)*($nbpagination)}
|
||||
<li><a href="{summarypaginationlink p=$smarty.section.pagination.index n=$nbpagination}">{$smarty.section.pagination.index|escape:'htmlall':'UTF-8'}</a></li>
|
||||
{/if}
|
||||
{/section}
|
||||
{if $max_page-$page > 1}
|
||||
{if $max_page-$page > 2}
|
||||
<li class="truncate">...</li>
|
||||
{/if}
|
||||
<li><a href="{summarypaginationlink p=$max_page n=$nbpagination}">{$max_page}</a></li>
|
||||
{/if}
|
||||
{if $orders|@count > $page * $nbpagination}
|
||||
{assign var='p_next' value=$page+1}
|
||||
<li id="pagination_next"><a href="{summarypaginationlink p=$p_next n=$nbpagination}" title="Next" rel="nofollow">{l s='Next' mod='loyalty'} »</a></li>
|
||||
{else}
|
||||
<li id="pagination_next" class="disabled"><span>{l s='Next' mod='loyalty'} »</span></li>
|
||||
{/if}
|
||||
</ul>
|
||||
{/if}
|
||||
{if $orders|@count > 10}
|
||||
<form action="{$pagination_link}" method="get" class="pagination">
|
||||
<p>
|
||||
<input type="submit" class="button_mini" value="{l s='OK'}" />
|
||||
<label for="nb_item">{l s='items:' mod='loyalty'}</label>
|
||||
<select name="n" id="nb_item">
|
||||
{foreach from=$nArray item=nValue}
|
||||
{if $nValue <= $orders|@count}
|
||||
<option value="{$nValue|escape:'htmlall':'UTF-8'}" {if $nbpagination == $nValue}selected="selected"{/if}>{$nValue|escape:'htmlall':'UTF-8'}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
<input type="hidden" name="p" value="1" />
|
||||
</p>
|
||||
</form>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<p>{l s='Vouchers generated here are usable in the following categories : ' mod='loyalty'}
|
||||
{if $categories}{$categories}{else}{l s='All' mod='loyalty'}{/if}</p>
|
||||
|
||||
{if $transformation_allowed}
|
||||
<p class="text-center">
|
||||
<a class="btn btn-default" href="{$link->getModuleLink('loyalty', 'default', ['process' => 'transformpoints'])|escape:'html'}" onclick="return confirm('{l s='Are you sure you want to transform your points into vouchers?' mod='loyalty' js=1}');">{l s='Transform my points into a voucher of' mod='loyalty'} <span class="price">{convertPrice price=$voucher}</span>.</a>
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
<h1 class="page-heading">{l s='My vouchers from loyalty points' mod='loyalty'}</h1>
|
||||
|
||||
{if $nbDiscounts}
|
||||
<div class="block-center" id="block-history">
|
||||
<table id="order-list" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="first_item">{l s='Created' mod='loyalty'}</th>
|
||||
<th class="item">{l s='Value' mod='loyalty'}</th>
|
||||
<th class="item">{l s='Code' mod='loyalty'}</th>
|
||||
<th class="item">{l s='Valid from' mod='loyalty'}</th>
|
||||
<th class="item">{l s='Valid until' mod='loyalty'}</th>
|
||||
<th class="item">{l s='Status' mod='loyalty'}</th>
|
||||
<th class="last_item">{l s='Details' mod='loyalty'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$discounts item=discount name=myLoop}
|
||||
<tr class="alternate_item">
|
||||
<td class="history_date">{dateFormat date=$discount->date_add}</td>
|
||||
<td class="history_price"><span class="price">{if $discount->reduction_percent > 0}
|
||||
{$discount->reduction_percent}%
|
||||
{elseif $discount->reduction_amount}
|
||||
{displayPrice price=$discount->reduction_amount currency=$discount->reduction_currency}
|
||||
{else}
|
||||
{l s='Free shipping' mod='loyalty'}
|
||||
{/if}</span></td>
|
||||
<td class="history_method bold">{$discount->code}</td>
|
||||
<td class="history_date">{dateFormat date=$discount->date_from}</td>
|
||||
<td class="history_date">{dateFormat date=$discount->date_to}</td>
|
||||
<td class="history_method bold">{if $discount->quantity > 0}{l s='To use' mod='loyalty'}{else}{l s='Used' mod='loyalty'}{/if}</td>
|
||||
<td class="history_method">
|
||||
<a class="tips" onclick="return false" data-content="
|
||||
<ul>
|
||||
{foreach from=$discount->orders item=myorder name=myLoop}
|
||||
<li>
|
||||
{$myorder.id_order|string_format:{l s='Order #%d' mod='loyalty'}}
|
||||
({displayPrice price=$myorder.total_paid currency=$myorder.id_currency}) :
|
||||
{if $myorder.points > 0}{$myorder.points|string_format:{l s='%d points.' mod='loyalty'}}{else}{l s='Cancelled' mod='loyalty'}{/if}
|
||||
{if !$smarty.foreach.myLoop.last}{/if}
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
" data-original-title="{l s='Generated by these following orders' mod='loyalty'}" title="" data-toggle="popover" href="{$smarty.server.SCRIPT_NAME|escape:'htmlall':'UTF-8'}" data-original-title="">{l s='more...' mod='loyalty'}</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="block-order-detail" class="unvisible"> </div>
|
||||
</div>
|
||||
|
||||
{if $minimalLoyalty > 0}<p>{l s='The minimum order amount in order to use these vouchers is:'} {convertPrice price=$minimalLoyalty}</p>{/if}
|
||||
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('.tips').popover({
|
||||
placement : 'top',
|
||||
title : false,
|
||||
html: 'true'
|
||||
});
|
||||
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
{else}
|
||||
<p class="alert alert-warning">{l s='No vouchers yet.' mod='loyalty'}</p>
|
||||
{/if}
|
||||
{else}
|
||||
<p class="alert alert-warning">{l s='No reward points yet.' mod='loyalty'}</p>
|
||||
{/if}
|
||||
|
||||
<ul class="footer_links clearfix">
|
||||
<li>
|
||||
<a class="btn btn-default button button-small" href="{$link->getPageLink('my-account', true)|escape:'html'}" title="{l s='Back to Your Account' mod='loyalty'}" rel="nofollow"><span><i class="icon-chevron-left"></i>{l s='Back to Your Account' mod='loyalty'}</span></a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-default button button-small" href="{$base_dir}" title="{l s='Home' mod='loyalty'}"><span><i class="icon-chevron-left"></i>{l s='Home' mod='loyalty'}</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -0,0 +1,30 @@
|
||||
{*
|
||||
* 2007-2013 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* 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.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2013 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<!-- MODULE Loyalty -->
|
||||
<li class="loyalty">
|
||||
<a href="{$link->getModuleLink('loyalty', 'default', ['process' => 'summary'])|escape:'html'}" title="{l s='My loyalty points' mod='loyalty'}" rel="nofollow"><i class="icon-flag"></i><span>{l s='My loyalty points' mod='loyalty'}</span></a>
|
||||
</li>
|
||||
<!-- END : MODULE Loyalty -->
|
||||
@@ -0,0 +1,84 @@
|
||||
{*
|
||||
* 2007-2013 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* 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.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2013 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<script type="text/javascript">
|
||||
var point_rate = {$point_rate};
|
||||
var point_value = {$point_value};
|
||||
var points_in_cart = {$points_in_cart};
|
||||
var none_award = {$none_award};
|
||||
|
||||
$(document).ready(function() {
|
||||
// Force color "button" to fire event change
|
||||
$('#color_to_pick_list').click(function() {
|
||||
$('#color_pick_hidden').triggerHandler('change');
|
||||
});
|
||||
|
||||
// Catch all attribute changeent of the product
|
||||
$('.product_attributes input, .product_attributes select').change(function() {
|
||||
if (typeof(productPrice) == 'undefined' || typeof(productPriceWithoutReduction) == 'undefined')
|
||||
return;
|
||||
|
||||
var points = Math.round(productPrice / point_rate);
|
||||
var total_points = points_in_cart + points;
|
||||
var voucher = total_points * point_value;
|
||||
if (!none_award && productPriceWithoutReduction != productPrice) {
|
||||
$('#loyalty').html("{l s='No reward points for this product because there\'s already a discount.' mod='loyalty'}");
|
||||
} else if (!points) {
|
||||
$('#loyalty').html("{l s='No reward points for this product.' mod='loyalty'}");
|
||||
} else {
|
||||
var content = "{l s='By buying this product you can collect up to' mod='loyalty'} <b><span id=\"loyalty_points\">"+points+'</span> ';
|
||||
if (points > 1)
|
||||
content += "{l s='loyalty points' mod='loyalty'}</b>. ";
|
||||
else
|
||||
content += "{l s='loyalty point' mod='loyalty'}</b>. ";
|
||||
|
||||
content += "{l s='Your cart will total' mod='loyalty'} <b><span id=\"total_loyalty_points\">"+total_points+'</span> ';
|
||||
if (total_points > 1)
|
||||
content += "{l s='points' mod='loyalty'}";
|
||||
else
|
||||
content += "{l s='point' mod='loyalty'}";
|
||||
|
||||
content += "</b> {l s='that can be converted into a voucher of' mod='loyalty'} ";
|
||||
content += '<span id="loyalty_price">'+formatCurrency(voucher, currencyFormat, currencySign, currencyBlank)+'</span>.';
|
||||
$('#loyalty').html(content);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<p id="loyalty" class="align_justify">
|
||||
{if $points}
|
||||
{l s='By buying this product you can collect up to' mod='loyalty'} <b><span id="loyalty_points">{$points}</span>
|
||||
{if $points > 1}{l s='loyalty points' mod='loyalty'}{else}{l s='loyalty point' mod='loyalty'}{/if}</b>.
|
||||
{l s='Your cart will total' mod='loyalty'} <b><span id="total_loyalty_points">{$total_points}</span>
|
||||
{if $total_points > 1}{l s='points' mod='loyalty'}{else}{l s='point' mod='loyalty'}{/if}</b> {l s='that can be converted into a voucher of' mod='loyalty'}
|
||||
<span id="loyalty_price">{convertPrice price=$voucher}</span>.
|
||||
{else}
|
||||
{if isset($no_pts_discounted) && $no_pts_discounted == 1}
|
||||
{l s='No reward points for this product because there\'s already a discount.' mod='loyalty'}
|
||||
{else}
|
||||
{l s='No reward points for this product.' mod='loyalty'}
|
||||
{/if}
|
||||
{/if}
|
||||
</p>
|
||||
<br class="clear" />
|
||||
@@ -0,0 +1,38 @@
|
||||
{*
|
||||
* 2007-2013 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* 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.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2013 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<!-- MODULE Loyalty -->
|
||||
<p id="loyalty">
|
||||
<i class="icon-flag"></i>
|
||||
{if $points > 0}
|
||||
{l s='By checking out this shopping cart you can collect up to' mod='loyalty'} <b>
|
||||
{if $points > 1}{l s='%d loyalty points' sprintf=$points mod='loyalty'}{else}{l s='%d loyalty point' sprintf=$points mod='loyalty'}{/if}</b>
|
||||
{l s='that can be converted into a voucher of' mod='loyalty'} {convertPrice price=$voucher}{if isset($guest_checkout) && $guest_checkout}<sup>*</sup>{/if}.<br />
|
||||
{if isset($guest_checkout) && $guest_checkout}<sup>*</sup> {l s='Not available for Instant checkout order' mod='loyalty'}{/if}
|
||||
{else}
|
||||
{l s='Add some products to your shopping cart to collect some loyalty points.' mod='loyalty'}
|
||||
{/if}
|
||||
</p>
|
||||
<!-- END : MODULE Loyalty -->
|
||||
Reference in New Issue
Block a user