integration new theme standard

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8169 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
lCherifi
2011-08-23 14:27:30 +00:00
parent 2a1e42606b
commit 2d228a4fb8
60 changed files with 1912 additions and 0 deletions
@@ -0,0 +1,116 @@
<?php
/*
* 2007-2010 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-2010 Prestashop SA
* @version Release: $Revision: 1.4 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_CAN_LOAD_FILES_'))
exit;
class blockcontactinfos extends Module
{
public function __construct()
{
$this->name = 'blockcontactinfos';
if(version_compare(_PS_VERSION_, '1.4.0.0') >= 0)
$this->tab = 'front_office_features';
else
$this->tab = 'Blocks';
$this->version = '1.0';
parent::__construct();
$this->displayName = $this->l('Block contact infos');
$this->description = $this->l('Add a block to add some informations about contacting the shop');
}
public function install()
{
return (parent::install()
AND Configuration::updateValue('blockcontactinfos_company', Configuration::get('PS_SHOP_NAME'))
AND Configuration::updateValue('blockcontactinfos_address', '') AND Configuration::updateValue('blockcontactinfos_phone', '')
AND Configuration::updateValue('blockcontactinfos_email', Configuration::get('PS_SHOP_EMAIL')) AND $this->registerHook('footer'));
}
public function uninstall()
{
//Delete configuration
return (Configuration::deleteByName('blockcontactinfos_company')
AND Configuration::deleteByName('blockcontactinfos_address') AND Configuration::deleteByName('blockcontactinfos_phone')
AND Configuration::deleteByName('blockcontactinfos_email') AND parent::uninstall());
}
public function getContent()
{
// If we try to update the settings
if (isset($_POST['submitModule']))
{
Configuration::updateValue('blockcontactinfos_company', ((isset($_POST['company']) AND $_POST['company'] != '') ? $_POST['company'] : Configuration::get('PS_SHOP_NAME')));
Configuration::updateValue('blockcontactinfos_address', ((isset($_POST['address']) AND $_POST['address'] != '') ? $_POST['address'] : ''));
Configuration::updateValue('blockcontactinfos_phone', ((isset($_POST['phone']) AND $_POST['phone'] != '') ? $_POST['phone'] : ''));
Configuration::updateValue('blockcontactinfos_email', ((isset($_POST['email']) AND $_POST['email'] != '') ? $_POST['email'] : Configuration::get('PS_SHOP_EMAIL')));
echo '<div class="conf confirm"><img src="../img/admin/ok.gif"/>'.$this->l('Configuration updated').'</div>';
}
$content = '
<h2>'.$this->displayName.'</h2>
<form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post">
<fieldset class="width2">
<p><label for="company">'.$this->l('Company name').' :</label>
<input type="text" id="company" name="company" value="'.Configuration::get('blockcontactinfos_company').'" /></p>
<p><label for="address">'.$this->l('Address').' :</label>
<textarea id="address" name="address">'.Configuration::get('blockcontactinfos_address').'</textarea></p>
<p><label for="phone">'.$this->l('Phone number').' :</label>
<input type="text" id="phone" name="phone" value="'.Configuration::get('blockcontactinfos_phone').'" /></p>
<p><label for="email">'.$this->l('Email').' :</label>
<input type="text" id="email" name="email" value="'.Configuration::get('blockcontactinfos_email').'" /> </p>
<div class="clear">&nbsp;</div>
<br /><center><input type="submit" name="submitModule" value="'.$this->l('Update settings').'" class="button" /></center>
</fieldset>
</form>
<div class="clear">&nbsp;</div>
<fieldset>
<legend>Addons</legend>
'.$this->l('This module has been developped by PrestaShop and can only be sold through').' <a href="http://addons.prestashop.com">addons.prestashop.com</a>.<br />
'.$this->l('Please report all bugs to').' <a href="mailto:addons@prestashop.com">addons@prestashop.com</a> '.$this->l('or using our').' <a href="http://addons.prestashop.com/contact-form.php">'.$this->l('contact form').'</a>.
</fieldset>';
return $content;
}
public function hookFooter($params)
{
global $smarty;
$smarty->assign(array(
'company' => Configuration::get('blockcontactinfos_company'),
'address' => Configuration::get('blockcontactinfos_address'),
'phone' => Configuration::get('blockcontactinfos_phone'),
'email' => Configuration::get('blockcontactinfos_email')
));
return $this->display(__FILE__, 'blockcontactinfos.tpl');
}
}
?>
@@ -0,0 +1,37 @@
{*
* 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: 6594 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<!-- MODULE Block contact infos -->
<div id="block_contact_infos">
<h4>{l s='Contact us' mod='blockcontactinfos'}</h4>
<ul>
{if $company != ''}<li><strong>{$company}</strong></li>{/if}
{if $address != ''}<li><pre>{$address}</pre></li>{/if}
{if $phone != ''}<li>{l s='Tel:'} {$phone}</li>{/if}
{if $email != ''}<li>{l s='Email:'} <a href="mailto:{$email}">{$email}</a></li>{/if}
</ul>
</div>
<!-- /MODULE Block contact infos -->
+12
View File
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockcontactinfos</name>
<displayName><![CDATA[Block contact infos]]></displayName>
<version><![CDATA[1.0]]></version>
<description><![CDATA[Add a block to add some informations about contacting the shop]]></description>
<author><![CDATA[]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>
+17
View File
@@ -0,0 +1,17 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_6bde6531cb3dc89a517c203d2177315d'] = 'Bloc infos contact';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_94ef396566461a04e263191e90bdf447'] = 'Ajoute un bloc pour afficher certaines informations pour contacter la boutique';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_c281f92b77ba329f692077d23636f5c9'] = 'Nom de la société';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_1f8261d17452a959e013666c5df45e07'] = 'Numéro de téléphone';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'Email';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour la configuration';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_1b9441f293cd7307b59296f616bb858a'] = 'Ce module a été développé par PrestaShop et ne peut être vendu que sur';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_6df4dad510fb08e2e6df44b53cb2ce29'] = 'Pour toute demande d\'information n\'hésitez pas à nous contacter sur';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_d575acff7e1035a4212d2a53d5a8c115'] = 'ou en utilisant notre';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_23372c0d3713719764670087006fc1b6'] = 'formulaire de contact';
$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_02d4482d332e1aef3437cd61c9bcc624'] = 'Contactez-nous';
Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B