// Remove Module->templateAssign() from modules (use $this->smarty->assign() instead)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10914 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -100,7 +100,7 @@ class BlockNewProducts extends Module
|
||||
if (!$newProducts AND !Configuration::get('PS_BLOCK_NEWPRODUCTS_DISPLAY'))
|
||||
return;
|
||||
|
||||
$this->templateAssign(array(
|
||||
$this->smarty->assign(array(
|
||||
'new_products' => $newProducts,
|
||||
'mediumSize' => Image::getSize('medium'),
|
||||
));
|
||||
|
||||
@@ -28,16 +28,16 @@
|
||||
<div id="new-products_block_right" class="block products_block">
|
||||
<h4><a href="{$link->getPageLink('new-products')}" title="{l s='New products' mod='blocknewproducts'}">{l s='New products' mod='blocknewproducts'}</a></h4>
|
||||
<div class="block_content">
|
||||
{if $blocknewproducts_new_products !== false}
|
||||
{if $new_products !== false}
|
||||
<ul class="product_images clearfix">
|
||||
{foreach from=$blocknewproducts_new_products item='product' name='newProducts'}
|
||||
{foreach from=$new_products item='product' name='newProducts'}
|
||||
{if $smarty.foreach.newProducts.index < 2}
|
||||
<li{if $smarty.foreach.newProducts.first} class="first"{/if}><a href="{$product.link}" title="{$product.legend|escape:html:'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'medium')}" height="{$blocknewproducts_mediumSize.height}" width="{$blocknewproducts_mediumSize.width}" alt="{$product.legend|escape:html:'UTF-8'}" /></a></li>
|
||||
<li{if $smarty.foreach.newProducts.first} class="first"{/if}><a href="{$product.link}" title="{$product.legend|escape:html:'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'medium')}" height="{$mediumSize.height}" width="{$mediumSize.width}" alt="{$product.legend|escape:html:'UTF-8'}" /></a></li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
<dl class="products">
|
||||
{foreach from=$blocknewproducts_new_products item=newproduct name=myLoop}
|
||||
{foreach from=$new_products item=newproduct name=myLoop}
|
||||
<dt class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}"><a href="{$newproduct.link}" title="{$newproduct.name|escape:html:'UTF-8'}">{$newproduct.name|strip_tags|escape:html:'UTF-8'}</a></dt>
|
||||
{if $newproduct.description_short}<dd class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}"><a href="{$newproduct.link}">{$newproduct.description_short|strip_tags:'UTF-8'|truncate:75:'...'}</a><br /><a href="{$newproduct.link}" class="lnk_more">{l s='Read more'}</a></dd>{/if}
|
||||
{/foreach}
|
||||
|
||||
Reference in New Issue
Block a user