This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
/* Block store */
|
||||
.blockstore img { margin: 10px 0 0 0; }
|
||||
.blockstore p { text-align: center; font-weight: 10px; }
|
||||
@@ -1,124 +0,0 @@
|
||||
<?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: 1.4 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
exit;
|
||||
|
||||
class BlockStore extends Module
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
$this->name = 'blockstore';
|
||||
$this->tab = 'front_office_features';
|
||||
$this->version = 1.0;
|
||||
$this->author = 'PrestaShop';
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = $this->l('Stores block');
|
||||
$this->description = $this->l('Displays a block with a link to the store locator.');
|
||||
}
|
||||
|
||||
function install()
|
||||
{
|
||||
Configuration::updateValue('BLOCKSTORE_IMG', 'store.jpg');
|
||||
return (parent::install() AND $this->registerHook('rightColumn') AND $this->registerHook('header'));
|
||||
}
|
||||
|
||||
public function uninstall()
|
||||
{
|
||||
Configuration::deleteByName('BLOCKSTORE_IMG');
|
||||
return parent::uninstall();
|
||||
}
|
||||
|
||||
function hookLeftColumn($params)
|
||||
{
|
||||
return $this->hookRightColumn($params);
|
||||
}
|
||||
|
||||
function hookRightColumn($params)
|
||||
{
|
||||
global $smarty;
|
||||
|
||||
$smarty->assign('store_img', Configuration::get('BLOCKSTORE_IMG'));
|
||||
return $this->display(__FILE__, 'blockstore.tpl');
|
||||
}
|
||||
|
||||
function hookHeader($params)
|
||||
{
|
||||
Tools::addCSS(_THEME_CSS_DIR_.'modules/'.$this->name.'/blockstore.css', 'all');
|
||||
}
|
||||
|
||||
public function postProcess()
|
||||
{
|
||||
if (Tools::isSubmit('submitStoreConf'))
|
||||
{
|
||||
if (isset($_FILES['store_img']) AND isset($_FILES['store_img']['tmp_name']) AND !empty($_FILES['store_img']['tmp_name']))
|
||||
{
|
||||
if ($error = checkImage($_FILES['store_img'], 4000000))
|
||||
return $this->displayError($this->l('invalid image'));
|
||||
else
|
||||
{
|
||||
if (!move_uploaded_file($_FILES['store_img']['tmp_name'], dirname(__FILE__).'/'.$_FILES['store_img']['name']))
|
||||
return $this->displayError($this->l('an error occured on uploading file'));
|
||||
else
|
||||
{
|
||||
if (Configuration::get('BLOCKSTORE_IMG') != $_FILES['store_img']['name'])
|
||||
@unlink(dirname(__FILE__).'/'.Configuration::get('BLOCKSTORE_IMG'));
|
||||
Configuration::updateValue('BLOCKSTORE_IMG', $_FILES['store_img']['name']);
|
||||
return $this->displayConfirmation($this->l('Settings are updated'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
public function getContent()
|
||||
{
|
||||
$output = $this->postProcess().'
|
||||
<form action="'.$_SERVER['REQUEST_URI'].'" method="post" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<legend>'.$this->l('Store block configuration').'</legend>';
|
||||
if (Configuration::get('BLOCKSTORE_IMG'))
|
||||
$output .= '<div class="margin-form"><img src="'.Tools::getProtocol().Tools::getMediaServer($this->name)._MODULE_DIR_.$this->name.'/'.Configuration::get('BLOCKSTORE_IMG').'" alt="'.$this->l('Store image').'" style="height:115px;margin-left: 100px;width:174px"/></div>';
|
||||
$output .= '
|
||||
<label for="store_img">'.$this->l('Change image').'</label>
|
||||
<div class="margin-form">
|
||||
<input id="store_img" type="file" name="store_img" /> ( '.$this->l('image will be displayed as 174x115').' )
|
||||
</div>
|
||||
|
||||
<p class="center">
|
||||
<input class="button" type="submit" name="submitStoreConf" value="'.$this->l('Save').'"/>
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
';
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
{*
|
||||
* 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: 1.4 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<!-- Block stores module -->
|
||||
<div id="stores_block_left" class="block">
|
||||
<h4><a href="{$link->getPageLink('stores')}" title="{l s='Our stores' mod='blockstore'}">{l s='Our stores' mod='blockstore'}</a></h4>
|
||||
<div class="block_content blockstore">
|
||||
<p>
|
||||
<a href="{$link->getPageLink('stores')}" title="{l s='Our stores' mod='blockstore'}"><img src="{$module_dir}{$store_img}" alt="{l s='Our stores' mod='blockstore'}" width="174" height="115" /></a><br />
|
||||
<a href="{$link->getPageLink('stores')}" title="{l s='Our stores' mod='blockstore'}">{l s='Discover our stores' mod='blockstore'}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Block stores module -->
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>blockstore</name>
|
||||
<displayName>Stores block</displayName>
|
||||
<version>1</version>
|
||||
<description>Displays a block with a link to the store locator.</description>
|
||||
<author>PrestaShop</author>
|
||||
<tab>front_office_features</tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>1</need_instance>
|
||||
</module>
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_50d335623ef166aeea8da2a3c2c63a3e'] = 'Shop-Block';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_7118171dfc2981fd3d7f3aab97fb572d'] = 'Zeigt ein Block mit einem Link zu der Händlersuche';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_f32a6c9e15dd20152ee8b14c7f94b040'] = 'Bild ungültig';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_4dd95964f5b02106aeaa2dbf3e9d3c5e'] = 'ein Fehler ist beim Hochladen der Datei aufgetreten ';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_7ccf58c950043c9fbfed668df13ce608'] = 'Die Einstellungen werden aktualisiert';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_dbd41b964013caae2d73220618b5ae90'] = 'Shop-Block-Konfiguration';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_2dd1d28275cdb8b78ebd17f6e25aac0d'] = 'Shop-Bild';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_8c38cf08a0d0a01bd44c682479432350'] = 'Bild ändern';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_f6f1e75fd6d515138c3c802459aa384d'] = 'Bild wird als 174x115 angezeigt ';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_c9cc8cce247e49bae79f15173ce97354'] = 'Speichern';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_34c869c542dee932ef8cd96d2f91cae6'] = 'Unsere Shops';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_61d5070a61ce6eb6ad2a212fdf967d92'] = 'Entdecken Sie unsere Shops';
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_50d335623ef166aeea8da2a3c2c63a3e'] = 'Bloque tiendas';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_7118171dfc2981fd3d7f3aab97fb572d'] = 'Mostrar un bloque con un link hacia la lista de tiendas';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_f32a6c9e15dd20152ee8b14c7f94b040'] = 'imagen no válida';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_4dd95964f5b02106aeaa2dbf3e9d3c5e'] = 'se ha producido un error durante el envío';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_7ccf58c950043c9fbfed668df13ce608'] = 'Parámetros actualizados';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_dbd41b964013caae2d73220618b5ae90'] = 'Configuració del bloque tiendas';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_2dd1d28275cdb8b78ebd17f6e25aac0d'] = 'Imagen del bloque';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_8c38cf08a0d0a01bd44c682479432350'] = 'Cambiar de imagen:';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_f6f1e75fd6d515138c3c802459aa384d'] = 'la imagen se mostrará en formato 174x115';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_34c869c542dee932ef8cd96d2f91cae6'] = 'Nuestras tiendas';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_61d5070a61ce6eb6ad2a212fdf967d92'] = 'Descubra nuestras tiendas';
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_50d335623ef166aeea8da2a3c2c63a3e'] = 'Bloc magasins';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_7118171dfc2981fd3d7f3aab97fb572d'] = 'Affiche un bloc avec un lien vers la liste des magasins';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_f32a6c9e15dd20152ee8b14c7f94b040'] = 'image invalide';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_4dd95964f5b02106aeaa2dbf3e9d3c5e'] = 'une erreur s\'est produite lors de l\'envoi';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_7ccf58c950043c9fbfed668df13ce608'] = 'Paramètres mis à jour';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_dbd41b964013caae2d73220618b5ae90'] = 'Configuration du block magasins';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_2dd1d28275cdb8b78ebd17f6e25aac0d'] = 'Image du block';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_8c38cf08a0d0a01bd44c682479432350'] = 'Changer l\'image:';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_f6f1e75fd6d515138c3c802459aa384d'] = 'l\'image sera affiché au format 174x115';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_34c869c542dee932ef8cd96d2f91cae6'] = 'Nos magasins';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_61d5070a61ce6eb6ad2a212fdf967d92'] = 'Découvrez nos magasins';
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_50d335623ef166aeea8da2a3c2c63a3e'] = 'Blocco negozi ';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_7118171dfc2981fd3d7f3aab97fb572d'] = 'Visualizza un blocco con un link per il localizzatore del negozio';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_f32a6c9e15dd20152ee8b14c7f94b040'] = 'immagine non valida';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_4dd95964f5b02106aeaa2dbf3e9d3c5e'] = 'errore nel caricamento del file';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_7ccf58c950043c9fbfed668df13ce608'] = 'Le impostazioni sono aggiornate';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_dbd41b964013caae2d73220618b5ae90'] = 'Configurazione blocco negozio';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_2dd1d28275cdb8b78ebd17f6e25aac0d'] = 'Immagine blocco';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_8c38cf08a0d0a01bd44c682479432350'] = 'Cambia immagine';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_f6f1e75fd6d515138c3c802459aa384d'] = 'immagine verrà visualizzata come 174x115';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_c9cc8cce247e49bae79f15173ce97354'] = 'Salva';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_34c869c542dee932ef8cd96d2f91cae6'] = 'I nostri negozi';
|
||||
$_MODULE['<{blockstore}prestashop>blockstore_61d5070a61ce6eb6ad2a212fdf967d92'] = 'Scopri i nostri negozi';
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 280 B |
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB |
Reference in New Issue
Block a user