This commit is contained in:
rGaillard
2011-07-06 10:10:43 +00:00
parent 31d94236ac
commit d1a13007b9
4695 changed files with 0 additions and 339293 deletions
-111
View File
@@ -1,111 +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
*/
class BlockSpecials extends Module
{
private $_html = '';
private $_postErrors = array();
function __construct()
{
$this->name = 'blockspecials';
$this->tab = 'pricing_promotion';
$this->version = 0.8;
$this->author = 'PrestaShop';
parent::__construct();
$this->displayName = $this->l('Specials block');
$this->description = $this->l('Adds a block with current product specials.');
}
public function install()
{
return (parent::install() AND $this->registerHook('rightColumn') AND $this->registerHook('header'));
}
public function getContent()
{
$output = '<h2>'.$this->displayName.'</h2>';
if (Tools::isSubmit('submitSpecials'))
{
Configuration::updateValue('PS_BLOCK_SPECIALS_DISPLAY', (int)(Tools::getValue('always_display')));
$output .= '<div class="conf confirm"><img src="../img/admin/ok.gif" alt="'.$this->l('Confirmation').'" />'.$this->l('Settings updated').'</div>';
}
return $output.$this->displayForm();
}
public function displayForm()
{
return '
<form action="'.$_SERVER['REQUEST_URI'].'" method="post">
<fieldset>
<legend><img src="'.$this->_path.'logo.gif" alt="" title="" />'.$this->l('Settings').'</legend>
<label>'.$this->l('Always display block').'</label>
<div class="margin-form">
<input type="radio" name="always_display" id="display_on" value="1" '.(Tools::getValue('always_display', Configuration::get('PS_BLOCK_SPECIALS_DISPLAY')) ? 'checked="checked" ' : '').'/>
<label class="t" for="display_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label>
<input type="radio" name="always_display" id="display_off" value="0" '.(!Tools::getValue('always_display', Configuration::get('PS_BLOCK_SPECIALS_DISPLAY')) ? 'checked="checked" ' : '').'/>
<label class="t" for="display_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
<p class="clear">'.$this->l('Show the block even if no product is available.').'</p>
</div>
<center><input type="submit" name="submitSpecials" value="'.$this->l('Save').'" class="button" /></center>
</fieldset>
</form>';
}
public function hookRightColumn($params)
{
if (Configuration::get('PS_CATALOG_MODE'))
return ;
global $smarty;
if (!$special = Product::getRandomSpecial((int)($params['cookie']->id_lang)) AND !Configuration::get('PS_BLOCK_SPECIALS_DISPLAY'))
return;
$smarty->assign(array(
'special' => $special,
'priceWithoutReduction_tax_excl' => Tools::ps_round($special['price_without_reduction'] / (1 + (int)$special['rate'] / 100), 2),
'mediumSize' => Image::getSize('medium')
));
return $this->display(__FILE__, 'blockspecials.tpl');
}
public function hookLeftColumn($params)
{
return $this->hookRightColumn($params);
}
public function hookHeader($params)
{
if (Configuration::get('PS_CATALOG_MODE'))
return ;
Tools::addCSS(($this->_path).'blockspecials.css', 'all');
}
}
-59
View File
@@ -1,59 +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
*}
<!-- MODULE Block specials -->
<div id="special_block_right" class="block products_block exclusive blockspecials">
<h4><a href="{$link->getPageLink('prices-drop')}" title="{l s='Specials' mod='blockspecials'}">{l s='Specials' mod='blockspecials'}</a></h4>
<div class="block_content">
{if $special}
<ul class="products">
<li class="product_image">
<a href="{$special.link}"><img src="{$link->getImageLink($special.link_rewrite, $special.id_image, 'medium')}" alt="{$special.legend|escape:html:'UTF-8'}" height="{$mediumSize.height}" width="{$mediumSize.width}" title="{$special.name|escape:html:'UTF-8'}" /></a>
</li>
<li>
<h5><a href="{$special.link}" title="{$special.name|escape:html:'UTF-8'}">{$special.name|escape:html:'UTF-8'}</a></h5>
<span class="price-discount">{if !$priceDisplay}{displayWtPrice p=$special.price_without_reduction}{else}{displayWtPrice p=$priceWithoutReduction_tax_excl}{/if}</span>
{if $special.specific_prices}
{assign var='specific_prices' value=$special.specific_prices}
{if $specific_prices.reduction_type == 'percentage' && ($specific_prices.from == $specific_prices.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $specific_prices.from))}
<span class="reduction">(-{$specific_prices.reduction * 100|floatval}%)</span>
{/if}
{/if}
<span class="price">{if !$priceDisplay}{displayWtPrice p=$special.price}{else}{displayWtPrice p=$special.price_tax_exc}{/if}</span>
</li>
</ul>
<p>
<a href="{$link->getPageLink('prices-drop')}" title="{l s='All specials' mod='blockspecials'}" class="button_large">{l s='All specials' mod='blockspecials'}</a>
</p>
{else}
<p>{l s='No specials at this time' mod='blockspecials'}</p>
{/if}
</div>
</div>
<!-- /MODULE Block specials -->
-12
View File
@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockspecials</name>
<displayName>Specials block</displayName>
<version>0.8</version>
<description>Adds a block with current product specials.</description>
<author>PrestaShop</author>
<tab>pricing_promotion</tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>
-17
View File
@@ -1,17 +0,0 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{blockspecials}prestashop>blockspecials_c19ed4ea98cbf319735f6d09bde6c757'] = 'Specials Block';
$_MODULE['<{blockspecials}prestashop>blockspecials_c2fb79a6eca86e519f938a1ef15c3e69'] = 'Fügt einen Block mit aktuellen Produkt-Specials hinzu';
$_MODULE['<{blockspecials}prestashop>blockspecials_f4d1ea475eaa85102e2b4e6d95da84bd'] = 'Bestätigung';
$_MODULE['<{blockspecials}prestashop>blockspecials_c888438d14855d7d96a2724ee9c306bd'] = 'Einstellungen aktualisiert';
$_MODULE['<{blockspecials}prestashop>blockspecials_f4f70727dc34561dfde1a3c529b6205c'] = 'Einstellungen';
$_MODULE['<{blockspecials}prestashop>blockspecials_530c88f8210e022b39128e3f0409bbcf'] = 'Block immer anzeigen';
$_MODULE['<{blockspecials}prestashop>blockspecials_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Aktiviert';
$_MODULE['<{blockspecials}prestashop>blockspecials_b9f5c797ebbf55adccdd8539a65a0241'] = 'Deaktiviert';
$_MODULE['<{blockspecials}prestashop>blockspecials_a8a670d89a6d2f3fa59942fc591011ef'] = 'Block anzeigen, auch wenn kein Produkt verfügbar ist.';
$_MODULE['<{blockspecials}prestashop>blockspecials_c9cc8cce247e49bae79f15173ce97354'] = 'Speichern';
$_MODULE['<{blockspecials}prestashop>blockspecials_d1aa22a3126f04664e0fe3f598994014'] = 'Specials';
$_MODULE['<{blockspecials}prestashop>blockspecials_b4f95c1ea534936cc60c6368c225f480'] = 'Alle Specials';
$_MODULE['<{blockspecials}prestashop>blockspecials_fd21fcc9fc4c1d5202d6fc11597b3fca'] = 'Keine Specials zu diesem Zeitpunkt';
-4
View File
@@ -1,4 +0,0 @@
<?php
global $_MODULE;
$_MODULE = array();
-17
View File
@@ -1,17 +0,0 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{blockspecials}prestashop>blockspecials_c19ed4ea98cbf319735f6d09bde6c757'] = 'Bloque promociones especiales';
$_MODULE['<{blockspecials}prestashop>blockspecials_c2fb79a6eca86e519f938a1ef15c3e69'] = 'Añadir un bloque con promociones especiales';
$_MODULE['<{blockspecials}prestashop>blockspecials_f4d1ea475eaa85102e2b4e6d95da84bd'] = 'Confirmación';
$_MODULE['<{blockspecials}prestashop>blockspecials_c888438d14855d7d96a2724ee9c306bd'] = 'Parámetros actualizados';
$_MODULE['<{blockspecials}prestashop>blockspecials_f4f70727dc34561dfde1a3c529b6205c'] = 'Parámetros ';
$_MODULE['<{blockspecials}prestashop>blockspecials_530c88f8210e022b39128e3f0409bbcf'] = 'Mostrar este bloque siempre';
$_MODULE['<{blockspecials}prestashop>blockspecials_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activado';
$_MODULE['<{blockspecials}prestashop>blockspecials_b9f5c797ebbf55adccdd8539a65a0241'] = 'Desactivado';
$_MODULE['<{blockspecials}prestashop>blockspecials_a8a670d89a6d2f3fa59942fc591011ef'] = 'Mostrar este bloque aunque no haya productos disponibles';
$_MODULE['<{blockspecials}prestashop>blockspecials_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar';
$_MODULE['<{blockspecials}prestashop>blockspecials_d1aa22a3126f04664e0fe3f598994014'] = 'Promociones especiales';
$_MODULE['<{blockspecials}prestashop>blockspecials_b4f95c1ea534936cc60c6368c225f480'] = 'Todas los promociones especiales';
$_MODULE['<{blockspecials}prestashop>blockspecials_fd21fcc9fc4c1d5202d6fc11597b3fca'] = 'No hay promociones especiales en este momento';
-17
View File
@@ -1,17 +0,0 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{blockspecials}prestashop>blockspecials_c19ed4ea98cbf319735f6d09bde6c757'] = 'Bloc promotions';
$_MODULE['<{blockspecials}prestashop>blockspecials_c2fb79a6eca86e519f938a1ef15c3e69'] = 'Ajoute un bloc proposant les produits en promotion actuellement';
$_MODULE['<{blockspecials}prestashop>blockspecials_f4d1ea475eaa85102e2b4e6d95da84bd'] = 'Confirmation';
$_MODULE['<{blockspecials}prestashop>blockspecials_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour';
$_MODULE['<{blockspecials}prestashop>blockspecials_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres';
$_MODULE['<{blockspecials}prestashop>blockspecials_530c88f8210e022b39128e3f0409bbcf'] = 'Toujours afficher ce bloc';
$_MODULE['<{blockspecials}prestashop>blockspecials_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé';
$_MODULE['<{blockspecials}prestashop>blockspecials_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé';
$_MODULE['<{blockspecials}prestashop>blockspecials_a8a670d89a6d2f3fa59942fc591011ef'] = 'Afficher le bloc même si aucun produit n\'est disponible';
$_MODULE['<{blockspecials}prestashop>blockspecials_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer';
$_MODULE['<{blockspecials}prestashop>blockspecials_d1aa22a3126f04664e0fe3f598994014'] = 'Réductions';
$_MODULE['<{blockspecials}prestashop>blockspecials_b4f95c1ea534936cc60c6368c225f480'] = 'Toutes les promos';
$_MODULE['<{blockspecials}prestashop>blockspecials_fd21fcc9fc4c1d5202d6fc11597b3fca'] = 'Pas de promotion actuellement';
-17
View File
@@ -1,17 +0,0 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{blockspecials}prestashop>blockspecials_c19ed4ea98cbf319735f6d09bde6c757'] = 'Blocco offerte speciali ';
$_MODULE['<{blockspecials}prestashop>blockspecials_c2fb79a6eca86e519f938a1ef15c3e69'] = 'Aggiunge un blocco con le offerte speciali del momento';
$_MODULE['<{blockspecials}prestashop>blockspecials_f4d1ea475eaa85102e2b4e6d95da84bd'] = 'Conferma';
$_MODULE['<{blockspecials}prestashop>blockspecials_c888438d14855d7d96a2724ee9c306bd'] = 'Impostazioni aggiornate';
$_MODULE['<{blockspecials}prestashop>blockspecials_f4f70727dc34561dfde1a3c529b6205c'] = 'Impostazioni';
$_MODULE['<{blockspecials}prestashop>blockspecials_530c88f8210e022b39128e3f0409bbcf'] = 'Visualizza sempre il blocco';
$_MODULE['<{blockspecials}prestashop>blockspecials_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Attivato';
$_MODULE['<{blockspecials}prestashop>blockspecials_b9f5c797ebbf55adccdd8539a65a0241'] = 'Disattivato';
$_MODULE['<{blockspecials}prestashop>blockspecials_a8a670d89a6d2f3fa59942fc591011ef'] = 'Mostra il blocco anche se nessun prodotto è disponibile.';
$_MODULE['<{blockspecials}prestashop>blockspecials_c9cc8cce247e49bae79f15173ce97354'] = 'Salva';
$_MODULE['<{blockspecials}prestashop>blockspecials_d1aa22a3126f04664e0fe3f598994014'] = 'Speciali';
$_MODULE['<{blockspecials}prestashop>blockspecials_b4f95c1ea534936cc60c6368c225f480'] = 'Tutte le offerte speciali';
$_MODULE['<{blockspecials}prestashop>blockspecials_fd21fcc9fc4c1d5202d6fc11597b3fca'] = 'Non ci sono offerte speciali in questo momento';
Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 B