[*] Front: move front controllers in controllers/front/ directory
// Refactoring of front controllers part 1 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8721 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -55,7 +55,7 @@ class BlockManufacturer extends Module
|
||||
function hookLeftColumn($params)
|
||||
{
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
$this->smartyAssign(array(
|
||||
'manufacturers' => Manufacturer::getManufacturers(),
|
||||
'text_list' => Configuration::get('MANUFACTURER_DISPLAY_TEXT'),
|
||||
'text_list_nb' => Configuration::get('MANUFACTURER_DISPLAY_TEXT_NB'),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{*
|
||||
* 2007-2011 PrestaShop
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
@@ -26,24 +26,24 @@
|
||||
|
||||
<!-- Block manufacturers module -->
|
||||
<div id="manufacturers_block_left" class="block blockmanufacturer">
|
||||
<h4>{if $display_link_manufacturer}<a href="{$link->getPageLink('manufacturer')}" title="{l s='Manufacturers' mod='blockmanufacturer'}">{/if}{l s='Manufacturers' mod='blockmanufacturer'}{if $display_link_manufacturer}</a>{/if}</h4>
|
||||
<h4>{if $blockmanufacturer_display_link_manufacturer}<a href="{$link->getPageLink('manufacturer')}" title="{l s='Manufacturers' mod='blockmanufacturer'}">{/if}{l s='Manufacturers' mod='blockmanufacturer'}{if $blockmanufacturer_display_link_manufacturer}</a>{/if}</h4>
|
||||
<div class="block_content">
|
||||
{if $manufacturers}
|
||||
{if $text_list}
|
||||
{if $blockmanufacturer_manufacturers}
|
||||
{if $blockmanufacturer_text_list}
|
||||
<ul class="bullet">
|
||||
{foreach from=$manufacturers item=manufacturer name=manufacturer_list}
|
||||
{if $smarty.foreach.manufacturer_list.iteration <= $text_list_nb}
|
||||
{foreach from=$blockmanufacturer_manufacturers item=manufacturer name=manufacturer_list}
|
||||
{if $smarty.foreach.manufacturer_list.iteration <= $blockmanufacturer_text_list_nb}
|
||||
<li class="{if $smarty.foreach.manufacturer_list.last}last_item{elseif $smarty.foreach.manufacturer_list.first}first_item{else}item{/if}"><a href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)}" title="{l s='More about' mod='blockmanufacturer'} {$manufacturer.name}">{$manufacturer.name|escape:'htmlall':'UTF-8'}</a></li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
{if $form_list}
|
||||
{if $blockmanufacturer_form_list}
|
||||
<form action="{$smarty.server.SCRIPT_NAME}" method="get">
|
||||
<p>
|
||||
<select id="manufacturer_list" onchange="autoUrl('manufacturer_list', '');">
|
||||
<option value="0">{l s='All manufacturers' mod='blockmanufacturer'}</option>
|
||||
{foreach from=$manufacturers item=manufacturer}
|
||||
{foreach from=$blockmanufacturer_manufacturers item=manufacturer}
|
||||
<option value="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)}">{$manufacturer.name|escape:'htmlall':'UTF-8'}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
@@ -60,10 +60,11 @@ class BlockMyAccount extends Module
|
||||
{
|
||||
if (!$this->context->customer->isLogged())
|
||||
return false;
|
||||
$this->context->smarty->assign(array(
|
||||
'voucherAllowed' => (int)(Configuration::get('PS_VOUCHERS')),
|
||||
'returnAllowed' => (int)(Configuration::get('PS_ORDER_RETURN')),
|
||||
'HOOK_BLOCK_MY_ACCOUNT' => Module::hookExec('myAccountBlock')
|
||||
|
||||
$this->smartyAssign(array(
|
||||
'voucherAllowed' => (int)Configuration::get('PS_VOUCHERS'),
|
||||
'returnAllowed' => (int)Configuration::get('PS_ORDER_RETURN'),
|
||||
'HOOK_BLOCK_MY_ACCOUNT' => Module::hookExec('myAccountBlock'),
|
||||
));
|
||||
return $this->display(__FILE__, $this->name.'.tpl');
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{*
|
||||
* 2007-2011 PrestaShop
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
@@ -30,12 +30,12 @@
|
||||
<div class="block_content">
|
||||
<ul class="bullet">
|
||||
<li><a href="{$link->getPageLink('history', true)}" title="">{l s='My orders' mod='blockmyaccount'}</a></li>
|
||||
{if $returnAllowed}<li><a href="{$link->getPageLink('order-follow', true)}" title="">{l s='My merchandise returns' mod='blockmyaccount'}</a></li>{/if}
|
||||
{if $blockmyaccount_returnAllowed}<li><a href="{$link->getPageLink('order-follow', true)}" title="">{l s='My merchandise returns' mod='blockmyaccount'}</a></li>{/if}
|
||||
<li><a href="{$link->getPageLink('order-slip', true)}" title="">{l s='My credit slips' mod='blockmyaccount'}</a></li>
|
||||
<li><a href="{$link->getPageLink('addresses', true)}" title="">{l s='My addresses' mod='blockmyaccount'}</a></li>
|
||||
<li><a href="{$link->getPageLink('identity', true)}" title="">{l s='My personal info' mod='blockmyaccount'}</a></li>
|
||||
{if $voucherAllowed}<li><a href="{$link->getPageLink('discount', true)}" title="">{l s='My vouchers' mod='blockmyaccount'}</a></li>{/if}
|
||||
{$HOOK_BLOCK_MY_ACCOUNT}
|
||||
{if $blockmyaccount_voucherAllowed}<li><a href="{$link->getPageLink('discount', true)}" title="">{l s='My vouchers' mod='blockmyaccount'}</a></li>{/if}
|
||||
{$blockmyaccount_HOOK_BLOCK_MY_ACCOUNT}
|
||||
</ul>
|
||||
<p class="logout"><a href="{$link->getPageLink('index', true, NULL, "mylogout")}" title="{l s='Sign out' mod='blockmyaccount'}">{l s='Sign out' mod='blockmyaccount'}</a></p>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
@@ -152,7 +152,7 @@ class BlockViewed extends Module
|
||||
LEFT JOIN `'._DB_PREFIX_.'category_group` cg ON (cg.`id_category` = cp.`id_category`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'customer_group` cug ON (cug.`id_group` = cg.`id_group`)
|
||||
WHERE p.`id_product` = '.(int)($id_product).'
|
||||
'.($this->context->customer->id ? 'AND cug.`id_customer` = '.(int)$this->context->customer->id :
|
||||
'.($this->context->customer->id ? 'AND cug.`id_customer` = '.(int)$this->context->customer->id :
|
||||
'AND cg.`id_group` = 1')
|
||||
);
|
||||
if ($result['total'])
|
||||
@@ -166,7 +166,7 @@ class BlockViewed extends Module
|
||||
if (!sizeof($productsViewedObj))
|
||||
return ;
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
$this->smartyAssign(array(
|
||||
'productsViewedObj' => $productsViewedObj,
|
||||
'mediumSize' => Image::getSize('medium')));
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{*
|
||||
* 2007-2011 PrestaShop
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
@@ -29,9 +29,9 @@
|
||||
<h4>{l s='Viewed products' mod='blockviewed'}</h4>
|
||||
<div class="block_content">
|
||||
<ul class="products clearfix">
|
||||
{foreach from=$productsViewedObj item=viewedProduct name=myLoop}
|
||||
{foreach from=$blockviewed_productsViewedObj item=viewedProduct name=myLoop}
|
||||
<li class="clearfix{if $smarty.foreach.myLoop.last} last_item{elseif $smarty.foreach.myLoop.first} first_item{else} item{/if}">
|
||||
<a href="{$link->getProductLink($viewedProduct->id, $viewedProduct->link_rewrite, $viewedProduct->category_rewrite)}" title="{l s='More about' mod='blockviewed'} {$viewedProduct->name|escape:html:'UTF-8'}"><img src="{$link->getImageLink($viewedProduct->link_rewrite, $viewedProduct->cover, 'medium')}" height="{$mediumSize.height}" width="{$mediumSize.width}" alt="{$viewedProduct->legend|escape:html:'UTF-8'}" /></a>
|
||||
<a href="{$link->getProductLink($viewedProduct->id, $viewedProduct->link_rewrite, $viewedProduct->category_rewrite)}" title="{l s='More about' mod='blockviewed'} {$viewedProduct->name|escape:html:'UTF-8'}"><img src="{$link->getImageLink($viewedProduct->link_rewrite, $viewedProduct->cover, 'medium')}" height="{$blockviewed_mediumSize.height}" width="{$blockviewed_mediumSize.width}" alt="{$viewedProduct->legend|escape:html:'UTF-8'}" /></a>
|
||||
<h5><a href="{$link->getProductLink($viewedProduct->id, $viewedProduct->link_rewrite, $viewedProduct->category_rewrite)}" title="{l s='More about' mod='blockviewed'} {$viewedProduct->name|escape:html:'UTF-8'}">{$viewedProduct->name|truncate:14:'...'|escape:html:'UTF-8'}</a></h5>
|
||||
<p>{$viewedProduct->description_short|strip_tags:'UTF-8'|truncate:44}<a href="{$link->getProductLink($viewedProduct->id, $viewedProduct->link_rewrite, $viewedProduct->category_rewrite)}" title="{l s='More about' mod='blockviewed'} {$viewedProduct->name|escape:html:'UTF-8'}"><img src="{$img_dir}bullet.gif" alt=">>" width="10" height="7" /></a></p>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user