Remove blockpaymentlogo
This commit is contained in:
@@ -68,7 +68,6 @@
|
||||
<module action="disable" name="blocklayered"/>
|
||||
<module action="disable" name="blocklink"/>
|
||||
<module action="disable" name="blockmyaccountfooter"/>
|
||||
<module action="disable" name="blockpaymentlogo"/>
|
||||
<module action="disable" name="pscleaner"/>
|
||||
<module action="disable" name="trackingfront"/>
|
||||
<module action="disable" name="vatnumber"/>
|
||||
|
||||
@@ -2097,7 +2097,6 @@ class AdminThemesControllerCore extends AdminController
|
||||
'blockmyaccount',
|
||||
'blockmyaccountfooter',
|
||||
'blocknewsletter',
|
||||
'blockpaymentlogo',
|
||||
'blocksocial',
|
||||
'blockuserinfo',
|
||||
'carriercompare',
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
2014-04-22 18:57:32 +0200 // Changelog updated
|
||||
2014-03-24 11:43:28 +0100 / MO blockpaymentlogo : ps_versions_compliancy modified (1.5.6.1 => 1.6)
|
||||
2014-03-24 11:03:15 +0100 / MO blockpaymentlogo : ps_versions_compliancy added
|
||||
2014-03-20 14:23:14 +0100 Initial commit
|
||||
@@ -1,178 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2016 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-2016 PrestaShop SA
|
||||
* @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 BlockPaymentLogo extends Module
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->name = 'blockpaymentlogo';
|
||||
$this->tab = 'front_office_features';
|
||||
$this->version = '0.4.1';
|
||||
$this->author = 'PrestaShop';
|
||||
$this->need_instance = 0;
|
||||
|
||||
$this->bootstrap = true;
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = $this->l('Payment logos block');
|
||||
$this->description = $this->l('Adds a block which displays all of your payment logos.');
|
||||
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => '1.6.99.99');
|
||||
}
|
||||
|
||||
public function install()
|
||||
{
|
||||
Configuration::updateValue('PS_PAYMENT_LOGO_CMS_ID', 0);
|
||||
return (parent::install() && $this->registerHook('header') && $this->registerHook('leftColumn'));
|
||||
}
|
||||
|
||||
public function uninstall()
|
||||
{
|
||||
Configuration::deleteByName('PS_PAYMENT_LOGO_CMS_ID');
|
||||
return parent::uninstall();
|
||||
}
|
||||
|
||||
public function getContent()
|
||||
{
|
||||
$html = '';
|
||||
|
||||
if (Tools::isSubmit('submitConfiguration'))
|
||||
if (Validate::isUnsignedInt(Tools::getValue('PS_PAYMENT_LOGO_CMS_ID')))
|
||||
{
|
||||
Configuration::updateValue('PS_PAYMENT_LOGO_CMS_ID', (int)(Tools::getValue('PS_PAYMENT_LOGO_CMS_ID')));
|
||||
$this->_clearCache('blockpaymentlogo.tpl');
|
||||
$html .= $this->displayConfirmation($this->l('The settings have been updated.'));
|
||||
}
|
||||
|
||||
$cmss = CMS::listCms($this->context->language->id);
|
||||
|
||||
if (!count($cmss))
|
||||
$html .= $this->displayError($this->l('No CMS page is available.'));
|
||||
else
|
||||
$html .= $this->renderForm();
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns module content
|
||||
*
|
||||
* @param array $params Parameters
|
||||
* @return string Content
|
||||
*/
|
||||
public function hookLeftColumn($params)
|
||||
{
|
||||
if (Configuration::get('PS_CATALOG_MODE'))
|
||||
return;
|
||||
|
||||
if (!$this->isCached('blockpaymentlogo.tpl', $this->getCacheId()))
|
||||
{
|
||||
if (!Configuration::get('PS_PAYMENT_LOGO_CMS_ID'))
|
||||
return;
|
||||
$cms = new CMS(Configuration::get('PS_PAYMENT_LOGO_CMS_ID'), $this->context->language->id);
|
||||
if (!Validate::isLoadedObject($cms))
|
||||
return;
|
||||
$this->smarty->assign('cms_payement_logo', $cms);
|
||||
}
|
||||
|
||||
return $this->display(__FILE__, 'blockpaymentlogo.tpl', $this->getCacheId());
|
||||
}
|
||||
|
||||
public function hookRightColumn($params)
|
||||
{
|
||||
return $this->hookLeftColumn($params);
|
||||
}
|
||||
|
||||
public function hookFooter($params)
|
||||
{
|
||||
return $this->hookLeftColumn($params);
|
||||
}
|
||||
public function hookHeader($params)
|
||||
{
|
||||
if (Configuration::get('PS_CATALOG_MODE'))
|
||||
return;
|
||||
$this->context->controller->addCSS(($this->_path).'blockpaymentlogo.css', 'all');
|
||||
}
|
||||
|
||||
public function renderForm()
|
||||
{
|
||||
$fields_form = array(
|
||||
'form' => array(
|
||||
'legend' => array(
|
||||
'title' => $this->l('Settings'),
|
||||
'icon' => 'icon-cogs'
|
||||
),
|
||||
'input' => array(
|
||||
array(
|
||||
'type' => 'select',
|
||||
'label' => $this->l('Destination page for the block\'s link'),
|
||||
'name' => 'PS_PAYMENT_LOGO_CMS_ID',
|
||||
'required' => false,
|
||||
'default_value' => (int)$this->context->country->id,
|
||||
'options' => array(
|
||||
'query' => CMS::listCms($this->context->language->id),
|
||||
'id' => 'id_cms',
|
||||
'name' => 'meta_title'
|
||||
)
|
||||
),
|
||||
),
|
||||
'submit' => array(
|
||||
'title' => $this->l('Save'),
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
$helper = new HelperForm();
|
||||
$helper->show_toolbar = false;
|
||||
$helper->table = $this->table;
|
||||
$lang = new Language((int)Configuration::get('PS_LANG_DEFAULT'));
|
||||
$helper->default_form_language = $lang->id;
|
||||
$helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
|
||||
$helper->identifier = $this->identifier;
|
||||
$helper->submit_action = 'submitConfiguration';
|
||||
$helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;
|
||||
$helper->token = Tools::getAdminTokenLite('AdminModules');
|
||||
$helper->tpl_vars = array(
|
||||
'fields_value' => $this->getConfigFieldsValues(),
|
||||
'languages' => $this->context->controller->getLanguages(),
|
||||
'id_language' => $this->context->language->id
|
||||
);
|
||||
|
||||
return $helper->generateForm(array($fields_form));
|
||||
}
|
||||
|
||||
public function getConfigFieldsValues()
|
||||
{
|
||||
return array(
|
||||
'PS_PAYMENT_LOGO_CMS_ID' => Tools::getValue('PS_PAYMENT_LOGO_CMS_ID', Configuration::get('PS_PAYMENT_LOGO_CMS_ID')),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
{*
|
||||
* 2007-2016 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-2016 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<!-- Block payment logo module -->
|
||||
<div id="paiement_logo_block_left" class="paiement_logo_block">
|
||||
<a href="{$link->getCMSLink($cms_payement_logo)|escape:'html'}">
|
||||
<img src="{$img_dir}logo_paiement_visa.jpg" alt="visa" width="33" height="21" />
|
||||
<img src="{$img_dir}logo_paiement_mastercard.jpg" alt="mastercard" width="32" height="21" />
|
||||
<img src="{$img_dir}logo_paiement_paypal.jpg" alt="paypal" width="61" height="21" />
|
||||
</a>
|
||||
</div>
|
||||
<!-- /Block payment logo module -->
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2016 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-2016 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;
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB |
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2016 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-2016 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;
|
||||
Reference in New Issue
Block a user