Jump to content

features in blocknewproduct


vermich

Recommended Posts

Hi everybody,

 

I would like to get features in my blocknewproduct

 

I do this but that take origin (the first in bdd i think ) and show it in every sheet:

 

<dl class="products">
 {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}</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}"><p><a href="{$newproduct.link}">{$newproduct.description_short|truncate:75:'...'}</a><br /><a href="{$newproduct.link}" class="lnk_more">{l s='Read more' mod='blocknewproducts'}</a></p></dd>{/if} -->
  {if $product.features}<dd>
<!-- product's features -->
 {foreach from=$product.features item=feature name=features}
  {if $feature.id_feature != 10 && $feature.id_feature != 9}
   <span>{$feature.value|escape:'htmlall':'UTF-8'}</span><br />
  {/if}
   {if $feature.id_feature == 9 }
   <span>{$feature.name|escape:'htmlall':'UTF-8'}: {$feature.value|escape:'htmlall':'UTF-8'}</span><br />
  {/if}
 {/foreach}
<!-- product's features -->
  </dd>
  {/if}
 {/foreach}
 </dl>

Edited by vermich (see edit history)
Link to comment
Share on other sites

I really need your help.

 

i put this into blockviewed in order to get feature :

 

$obj->features = Product::getFrontFeaturesStatic((int)$this->context->language->id, (int)$obj->id);
$productsViewedObj[] = $obj;

 

 

And smarty get it here:

 

 

$this->smarty->assign(array(
'productsViewedObj' => $productsViewedObj,
[size=4]'mediumSize' => Image::getSize('medium')));[/size]

 

But in blocknewproduct there is no $Obj so i don't no how to replace (int)$obj->id.

 

I'm lost and my brain is burning.

 

Thanks for your time.

Edited by vermich (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...