Jump to content

Display price in block of Viewed prod


Recommended Posts

Hello,

 

Block viewed products from homepage doesn't show Price of product. 

 

This code of this block ("blockvievew.tpl").

<!-- Block Viewed products -->
<div id="viewed-products_block_left" class="block products_block">
	<h4 class="title_block">{l s='Viewed products' 
mod='blockviewed'}</h4>
	<div class="block_content">
		<ul class="products clearfix">
			{foreach from=$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="{$viewedProduct-
>product_link|escape:'html'}" title="{l s='About' mod='blockviewed'} 
{$viewedProduct->name|escape:html:'UTF-8'}" class="content_img">
					<img src="{if isset
($viewedProduct->id_image) && $viewedProduct->id_image}{$link-
>getImageLink($viewedProduct->link_rewrite, $viewedProduct->cover, 
'medium_default')}{else}{$img_prod_dir}{$lang_iso}-default-
medium_default.jpg{/if}" alt="{$viewedProduct->legend|
escape:html:'UTF-8'}" />
					</a>
					<div class="text_desc">
						<h3 
class="s_title_block"><a href="{$viewedProduct->product_link|
escape:'html'}" title="{l s='More about' mod='blockviewed'} 
{$viewedProduct->name|escape:html:'UTF-8'}">{$viewedProduct->name|
escape:html:'UTF-8'}</a></h3>
						<p>{$viewedProduct-
>description_short|strip_tags:'UTF-8'|truncate:50}</p>

					</div>



<p class="price_container"><span class="price">{$viewedProduct->product_price}</span></p>

If i try with this piece of code, it doesn't work too!

 

<p class="price_container"><span class="price">{$product.price}</span></p>

 

 

</li> {/foreach} </ul> </div> </div>

 

Please, help me! What can i write in code for displaying product price in "blockvievew.tpl"?

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

  • 1 month later...

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...