Subida del módulo y tema de PrestaShop

This commit is contained in:
Kaloyan
2026-04-09 18:31:51 +02:00
parent 12c253296f
commit 16b3ff9424
39262 changed files with 7418797 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>ps_customeraccountlinks</name>
<displayName><![CDATA[Customer account links]]></displayName>
<version><![CDATA[3.2.0]]></version>
<description><![CDATA[Displays a block with links relative to a user&#039;s account.]]></description>
<author><![CDATA[PrestaShop]]></author>
<is_configurable>0</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,34 @@
<?php
/**
* 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 3.0 (AFL-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.
*
* 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 https://devdocs.prestashop.com/ for more information.
*
* @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 3.0 (AFL-3.0)
*/
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: 7.1 KiB

View File

@@ -0,0 +1,151 @@
<?php
/**
* 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 3.0 (AFL-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.
*
* 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 https://devdocs.prestashop.com/ for more information.
*
* @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 3.0 (AFL-3.0)
*/
if (!defined('_PS_VERSION_')) {
exit;
}
use PrestaShop\PrestaShop\Core\Module\WidgetInterface;
class Ps_Customeraccountlinks extends Module implements WidgetInterface
{
private $templateFile;
public function __construct()
{
$this->name = 'ps_customeraccountlinks';
$this->tab = 'front_office_features';
$this->author = 'PrestaShop';
$this->version = '3.2.0';
$this->need_instance = 0;
parent::__construct();
$this->displayName = $this->trans('My Account block', [], 'Modules.Customeraccountlinks.Admin');
$this->description = $this->trans('Welcome your customers with their personal information displayed right on your footer.', [], 'Modules.Customeraccountlinks.Admin');
$this->ps_versions_compliancy = ['min' => '1.7.4.0', 'max' => _PS_VERSION_];
$this->templateFile = 'module:ps_customeraccountlinks/ps_customeraccountlinks.tpl';
}
public function install()
{
return parent::install()
&& $this->registerHook('actionModuleRegisterHookAfter')
&& $this->registerHook('actionModuleUnRegisterHookAfter')
&& $this->registerHook('displayFooter')
;
}
public function uninstall()
{
return parent::uninstall();
}
public function hookActionModuleUnRegisterHookAfter($params)
{
if ('displayMyAccountBlock' === $params['hook_name']) {
$this->_clearCache('*');
}
}
public function hookActionModuleRegisterHookAfter($params)
{
if ($params['hook_name'] == 'displayMyAccountBlock') {
$this->_clearCache('*');
}
}
public function _clearCache($template, $cache_id = null, $compile_id = null)
{
parent::_clearCache($this->templateFile);
}
public function renderWidget($hookName = null, array $configuration = [])
{
$tpl_key = 'ps_customeraccountlinks';
if ($this->context->smarty->tpl_vars['customer']->value['addresses']) {
$tpl_key .= '_multiple';
}
if (!$this->isCached($this->templateFile, $this->getCacheId($tpl_key))) {
$this->smarty->assign($this->getWidgetVariables($hookName, $configuration));
}
return $this->fetch($this->templateFile, $this->getCacheId($tpl_key));
}
public function getWidgetVariables($hookName = null, array $configuration = [])
{
$link = $this->context->link;
$my_account_urls = [
2 => [
'title' => $this->trans('Orders', [], 'Admin.Global'),
'url' => $link->getPageLink('history', true),
],
3 => [
'title' => $this->trans('Credit slips', [], 'Modules.Customeraccountlinks.Admin'),
'url' => $link->getPageLink('order-slip', true),
],
4 => [
'title' => $this->trans('Addresses', [], 'Shop.Theme.Global'),
'url' => $link->getPageLink('addresses', true),
],
0 => [
'title' => $this->trans('Personal info', [], 'Modules.Customeraccountlinks.Admin'),
'url' => $link->getPageLink('identity', true),
],
];
if ((int) Configuration::get('PS_ORDER_RETURN')) {
$my_account_urls[1] = [
'title' => $this->trans('Merchandise returns', [], 'Modules.Customeraccountlinks.Admin'),
'url' => $link->getPageLink('order-follow', true),
];
}
if (CartRule::isFeatureActive()) {
$my_account_urls[5] = [
'title' => $this->trans('Vouchers', [], 'Shop.Theme.Customeraccount'),
'url' => $link->getPageLink('discount', true),
];
}
// Sort Account links base in his index
ksort($my_account_urls);
return [
/*
* @deprecated
*/
'my_account_urls' => $my_account_urls,
/*
* @deprecated
*/
'logout_url' => $link->getPageLink('index', true, null, 'mylogout'),
];
}
}

View File

@@ -0,0 +1,57 @@
{**
* 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 3.0 (AFL-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.
*
* 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 https://devdocs.prestashop.com/ for more information.
*
* @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 3.0 (AFL-3.0)
*}
<div id="block_myaccount_infos">
<h4><a href="{$urls.pages.my_account}" title="{l s='Your account' d='Shop.Theme.Customeraccount'}" rel="nofollow">{l s='Your account' d='Shop.Theme.Customeraccount'}</a></h4>
<ul>
{if $customer.is_logged}
<li><a href="{$urls.pages.identity}" title="{l s='Information' d='Shop.Theme.Customeraccount'}" rel="nofollow">{l s='Information' d='Shop.Theme.Customeraccount'}</a></li>
{if $customer.addresses|count}
<li><a href="{$urls.pages.addresses}" title="{l s='Addresses' d='Shop.Theme.Customeraccount'}" rel="nofollow">{l s='Addresses' d='Shop.Theme.Customeraccount'}</a></li>
{else}
<li><a href="{$urls.pages.address}" title="{l s='Add first address' d='Shop.Theme.Customeraccount'}" rel="nofollow">{l s='Add first address' d='Shop.Theme.Customeraccount'}</a></li>
{/if}
{if !$configuration.is_catalog}
<li><a href="{$urls.pages.history}" title="{l s='Orders' d='Shop.Theme.Customeraccount'}" rel="nofollow">{l s='Orders' d='Shop.Theme.Customeraccount'}</a></li>
{/if}
{if !$configuration.is_catalog}
<li><a href="{$urls.pages.order_slip}" title="{l s='Credit slips' d='Shop.Theme.Customeraccount'}" rel="nofollow">{l s='Credit slips' d='Shop.Theme.Customeraccount'}</a></li>
{/if}
{if $configuration.voucher_enabled && !$configuration.is_catalog}
<li><a href="{$urls.pages.discount}" title="{l s='Vouchers' d='Shop.Theme.Customeraccount'}" rel="nofollow">{l s='Vouchers' d='Shop.Theme.Customeraccount'}</a></li>
{/if}
{if $configuration.return_enabled && !$configuration.is_catalog}
<li><a href="{$urls.pages.order_follow}" title="{l s='Merchandise returns' d='Shop.Theme.Customeraccount'}" rel="nofollow">{l s='Merchandise returns' d='Shop.Theme.Customeraccount'}</a></li>
{/if}
{hook h="displayMyAccountBlock"}
<li><a href="{$urls.actions.logout}" title="{l s='Log me out' d='Shop.Theme.Customeraccount'}" rel="nofollow">{l s='Sign out' d='Shop.Theme.Actions'}</a></li>
{else}
<li><a href="{$urls.pages.guest_tracking}" title="{l s='Order tracking' d='Shop.Theme.Customeraccount'}" rel="nofollow">{l s='Order tracking' d='Shop.Theme.Customeraccount'}</a></li>
<li><a href="{$urls.pages.my_account}" title="{l s='Log in to your customer account' d='Shop.Theme.Customeraccount'}" rel="nofollow">{l s='Sign in' d='Shop.Theme.Actions'}</a></li>
<li><a href="{$urls.pages.register}" title="{l s='Create account' d='Shop.Theme.Customeraccount'}" rel="nofollow">{l s='Create account' d='Shop.Theme.Customeraccount'}</a></li>
{hook h="displayMyAccountBlock"}
{/if}
</ul>
</div>

View File

@@ -0,0 +1,34 @@
<?php
/**
* 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 3.0 (AFL-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.
*
* 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 https://devdocs.prestashop.com/ for more information.
*
* @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 3.0 (AFL-3.0)
*/
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;