first commit
This commit is contained in:
35
modules/pk_favorites/views/templates/hook/index.php
Normal file
35
modules/pk_favorites/views/templates/hook/index.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2014 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-2014 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
4
modules/pk_favorites/views/templates/hook/my-account.tpl
Normal file
4
modules/pk_favorites/views/templates/hook/my-account.tpl
Normal file
@@ -0,0 +1,4 @@
|
||||
<a id="favorites-link" href="{$link->getModuleLink('pk_favorites', 'account')}">
|
||||
<i class="rts" data-size="24" data-color="#000000">{if isset($roythemes.nc_i_fav)}{$roythemes.nc_i_fav}{else}fav1{/if}</i>
|
||||
<span>{l s='Favorites' mod='pk_favorites'}</span>
|
||||
</a>
|
||||
@@ -0,0 +1,67 @@
|
||||
{*
|
||||
* Promokit Favorites Module
|
||||
*
|
||||
* @package alysum
|
||||
* @version 1.0
|
||||
* @author https://promokit.eu
|
||||
* @copyright Copyright Ⓒ 2018 promokit.eu <@email:support@promokit.eu>
|
||||
* @license GNU General Public License version 2
|
||||
*}
|
||||
{assign var="pkfp_text" value=''}
|
||||
{assign var="pkfp_class" value=''}
|
||||
{if !$isCustomerFavoriteProduct AND $customer.is_logged}
|
||||
{assign var="pkfp_text" value={l s='Add to favorites' mod='pk_favorites'}}
|
||||
{assign var="pkfp_class" value='addToFav'}
|
||||
{else if $isCustomerFavoriteProduct AND $customer.is_logged}
|
||||
{assign var="pkfp_text" value={l s='Remove from favorites' mod='pk_favorites'}}
|
||||
{assign var="pkfp_class" value='removeFromFav icon_checked'}
|
||||
{else if !$customer.is_logged}
|
||||
{assign var="pkfp_text" value={l s='Add to favorites' mod='pk_favorites'}}
|
||||
{assign var="pkfp_title" value={l s='You have to login to add product to Favorites' mod='pk_favorites'}}
|
||||
{assign var="pkfp_class" value='loginToAdd'}
|
||||
{/if}
|
||||
{if $pkfp_text != ''}
|
||||
<a href="#" class="{if $page.page_name !== 'product' || ($page.page_name == 'product' && !$customer.is_logged)}tip_inside{/if} {if isset($roythemes.pl_hover_lay) && $roythemes.pl_hover_lay == "2"}action-btn{/if} noeffect flex-container align-items-center favoritesButton icon-button {$pkfp_class}" title="" data-pid="{$pid}">
|
||||
<i class="rts" data-size="24" data-color="#000000">{if isset($roythemes.nc_i_fav)}{$roythemes.nc_i_fav}{else}fav1{/if}</i>
|
||||
|
||||
{if $page.page_name == 'product'}
|
||||
{if !$customer.is_logged}
|
||||
<span>
|
||||
{l s='Add to favorites' mod='pk_favorites'}
|
||||
</span>
|
||||
<span class="tip">
|
||||
{l s='You must be logged in' mod='pk_favorites'}
|
||||
</span>
|
||||
{/if}
|
||||
{if $customer.is_logged}
|
||||
{if $isCustomerFavoriteProduct}
|
||||
<span>
|
||||
{l s='This product is in your Favorites' mod='pk_favorites'}</a>
|
||||
</span>
|
||||
{else}
|
||||
<span>
|
||||
{$pkfp_text}
|
||||
</span>
|
||||
{/if}
|
||||
{/if}
|
||||
{else}
|
||||
{if !$customer.is_logged}
|
||||
<span class="tip">
|
||||
{l s='You must be logged in' mod='pk_favorites'}
|
||||
</span>
|
||||
{/if}
|
||||
{if $customer.is_logged}
|
||||
{if $isCustomerFavoriteProduct}
|
||||
<span class="tip">
|
||||
{l s='This product is in your Favorites' mod='pk_favorites'}</a>
|
||||
</span>
|
||||
{else}
|
||||
<span class="tip">
|
||||
{$pkfp_text}
|
||||
</span>
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
</a>
|
||||
{/if}
|
||||
Reference in New Issue
Block a user