Jump to content

how to hide non "available for order" product in "new products block"


Recommended Posts

I have this "new products" block in right column that shows every new items that I added to my website.

however I want to hide some products that is NOT "available for order". how do I do that?

any help will be very helpful

 

below is my blocknewproducts.tpl

<!-- MODULE Block new products -->
<div id="new-products_block_right" class="block products_block">
   <h4><a href="{$base_dir}new-products.php">{l s='New Products' mod='blocknewproducts'}</a></h4>
   <div class="block_content">
   {if $new_products|@count > 0}
    <ul>
    {foreach from=$new_products item=newproduct name=myLoop}
	    <li class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}"><a href="{$newproduct.link}" title="{$newproduct.legend|escape:htmlall:'UTF-8'}"><img src="{$link->getImageLink($newproduct.link_rewrite, $newproduct.id_image, 'medium')}" alt="{$newproduct.legend|escape:htmlall:'UTF-8'}" /></a><a href="{$newproduct.link}" title="{$newproduct.name|escape:htmlall:'UTF-8'}" class="title">{$newproduct.name|truncate:25:'...'|strip_tags:'UTF-8'} </a><br /><a href="{$newproduct.link}">{t text=$newproduct.description_short length='20' strip='true' encode='true'}</a><br />{if !$priceDisplay || $priceDisplay == 2}<p class="price_container"><span class="price">{convertPrice price=$newproduct.price}</span>{if $priceDisplay == 2} {l s='+Tx' mod='blocknewproducts'}{/if}</p>{/if}
				    {if $priceDisplay}<p class="price_container"><span class="price">{convertPrice price=$newproduct.price_tax_exc}</span>{if $priceDisplay == 2} {l s='-Tx' mod='blocknewproducts'}{/if}</p>{/if}</li>
    {/foreach}
    </ul>
   {else}
    <p>{l s='No new products at this time' mod='blocknewproducts'}</p>
   {/if}
   </div>
</div>
<!-- /MODULE Block new products -->
Link to comment
Share on other sites

  • 2 weeks later...
×
×
  • Create New...