[+] Project : default theme added
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
/* block myaccount */
|
||||
.myaccount ul {margin-bottom:10px}
|
||||
.myaccount li {border-bottom: 1px solid #eee}
|
||||
.myaccount li a {
|
||||
display: block;
|
||||
padding: 7px 11px 5px 22px;
|
||||
color: #333;
|
||||
}
|
||||
.myaccount p.logout {
|
||||
padding-bottom:0;
|
||||
font-weight:bold;
|
||||
text-align:right
|
||||
}
|
||||
|
||||
|
||||
/* block myaccount in footer */
|
||||
#footer .myaccount {padding:15px 10px;}
|
||||
#footer .myaccount h4 {background: none;}
|
||||
#footer .myaccount .logout {display:none;}
|
||||
#footer .myaccount h4 {
|
||||
padding:0 0 10px 0;
|
||||
background:#333
|
||||
}
|
||||
#footer .myaccount ul {margin-bottom:0}
|
||||
#footer .myaccount li {border-bottom:none}
|
||||
#footer .myaccount li a {
|
||||
display: block;
|
||||
padding:0;
|
||||
color: #fff;
|
||||
background: none
|
||||
}
|
||||
#footer .myaccount li.lnk_wishlist img {display:none
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class blockmyaccountfooter extends Module
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->name = 'blockmyaccountfooter';
|
||||
$this->tab = 'front_office_features';
|
||||
$this->version = '1.2';
|
||||
$this->author = 'PrestaShop';
|
||||
$this->need_instance = 0;
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = $this->l('My Account block on footer');
|
||||
$this->description = $this->l('Displays a block with links relative to user account.');
|
||||
}
|
||||
|
||||
public function install()
|
||||
{
|
||||
if (!$this->addMyAccountBlockHook() OR !parent::install() OR !$this->registerHook('footer') OR !$this->registerHook('header'))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public function uninstall()
|
||||
{
|
||||
return (parent::uninstall() AND $this->removeMyAccountBlockHook());
|
||||
}
|
||||
|
||||
public function hookLeftColumn($params)
|
||||
{
|
||||
global $smarty;
|
||||
|
||||
if (!$params['cookie']->isLogged())
|
||||
return false;
|
||||
$smarty->assign(array(
|
||||
'voucherAllowed' => (int)(Configuration::get('PS_VOUCHERS')),
|
||||
'returnAllowed' => (int)(Configuration::get('PS_ORDER_RETURN')),
|
||||
'HOOK_BLOCK_MY_ACCOUNT' => Hook::exec('myAccountBlock')
|
||||
));
|
||||
return $this->display(__FILE__, $this->name.'.tpl');
|
||||
}
|
||||
|
||||
public function hookRightColumn($params)
|
||||
{
|
||||
return $this->hookLeftColumn($params);
|
||||
}
|
||||
|
||||
private function addMyAccountBlockHook()
|
||||
{
|
||||
return Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'hook` (`name`, `title`, `description`, `position`) VALUES (\'myAccountBlockfooter\', \'My account block\', \'Display extra informations inside the "my account" block\', 1)');
|
||||
}
|
||||
|
||||
private function removeMyAccountBlockHook()
|
||||
{
|
||||
return Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'hook` WHERE `name` = \'myAccountBlockfooter\'');
|
||||
}
|
||||
function hookHeader($params)
|
||||
{
|
||||
$this->context->controller->addCSS(($this->_path).'blockmyaccount.css', 'all');
|
||||
}
|
||||
function hookFooter($params)
|
||||
{
|
||||
global $smarty;
|
||||
|
||||
$smarty->assign(array(
|
||||
'voucherAllowed' => (int)(Configuration::get('PS_VOUCHERS')),
|
||||
'returnAllowed' => (int)(Configuration::get('PS_ORDER_RETURN')),
|
||||
'HOOK_BLOCK_MY_ACCOUNT' => Hook::exec('myAccountBlock')
|
||||
));
|
||||
return $this->display(__FILE__, $this->name.'.tpl');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<!-- Block myaccount module -->
|
||||
<div class="block myaccount">
|
||||
<h4><a href="{$link->getPageLink('my-account.php', true)}">{l s='My account' mod='blockmyaccountfooter'}</a></h4>
|
||||
<div class="block_content">
|
||||
<ul class="bullet">
|
||||
<li><a href="{$link->getPageLink('history.php', true)}" title="">{l s='My orders' mod='blockmyaccountfooter'}</a></li>
|
||||
{if $returnAllowed}<li><a href="{$link->getPageLink('order-follow.php', true)}" title="">{l s='My merchandise returns' mod='blockmyaccountfooter'}</a></li>{/if}
|
||||
<li><a href="{$link->getPageLink('order-slip.php', true)}" title="">{l s='My credit slips' mod='blockmyaccountfooter'}</a></li>
|
||||
<li><a href="{$link->getPageLink('addresses.php', true)}" title="">{l s='My addresses' mod='blockmyaccountfooter'}</a></li>
|
||||
<li><a href="{$link->getPageLink('identity.php', true)}" title="">{l s='My personal info' mod='blockmyaccountfooter'}</a></li>
|
||||
{if $voucherAllowed}<li><a href="{$link->getPageLink('discount.php', true)}" title="">{l s='My vouchers' mod='blockmyaccountfooter'}</a></li>{/if}
|
||||
{$HOOK_BLOCK_MY_ACCOUNT}
|
||||
</ul>
|
||||
<p class="logout"><a href="{$link->getPageLink('index.php')}?mylogout" title="{l s='Sign out' mod='blockmyaccountfooter'}">{l s='Sign out' mod='blockmyaccount'}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Block myaccount module -->
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>blockmyaccountfooter</name>
|
||||
<displayName><![CDATA[My Account block on footer]]></displayName>
|
||||
<version><![CDATA[1.2]]></version>
|
||||
<description><![CDATA[Displays a block with links relative to user account.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[front_office_features]]></tab>
|
||||
<is_configurable>0</is_configurable>
|
||||
<need_instance>0</need_instance>
|
||||
<limited_countries></limited_countries>
|
||||
</module>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 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/osl-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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 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;
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 600 B |
Reference in New Issue
Block a user