Jump to content

"New Products" Block To Display Like "Specials" Block


artofadornment

Recommended Posts

Hi, I hope someone can help.

 

I'm using 1.5.3.1 and have my New Products block set to show 2 products, with just their images and product title links displayed (no small description text or "read more") because I want to keep that block fairly small. But with these changes I think it would look a lot better if it had the same formatting as the Specials block. In the Specials block, the product title text link is displayed to the right of the product image, instead of somewhere below it (so essentially I'd like 1 product and its title per "line").

 

I've attached a screenshot of my current setup, and here's the code I'm currently using:

 

<!-- MODULE Block new products -->
<div id="new-products_block_right" class="block products_block">
<div class="title_block"><a href="{$link->getPageLink('new-products')}" title="{l s='New products' mod='blocknewproducts'}">{l s='New products' mod='blocknewproducts'}</a></div>
<div class="block_content">
{if $new_products !== false}
 <ul class="product_images clearfix">
 {foreach from=$new_products item='product' name='newProducts'}
  {if $smarty.foreach.newProducts.index < 2}
   <li{if $smarty.foreach.newProducts.first} class="first image"{/if}><a href="{$product.link}" title="{$product.legend|escape:html:'UTF-8'}">
   <img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'medium_default')}" height="{$mediumSize.height}" width="{$mediumSize.width}" alt="{$product.legend|escape:html:'UTF-8'}" /></a>
   </li>
  {/if}
 {/foreach}
 </ul>
 <ul class="products">
 {foreach from=$new_products item=newproduct name=myLoop}
			    <li class="clearfix{if $smarty.foreach.myLoop.last} last_item{elseif $smarty.foreach.myLoop.first} first_item{else} item{/if}">
				    <a class="title" href="{$newproduct.link}" title="{$newproduct.name|escape:html:'UTF-8'}">{$newproduct.name|strip_tags|escape:html:'UTF-8'}</a>
				    </li>
 {/foreach}
 </ul>
 <p><a href="{$link->getPageLink('new-products')}" title="{l s='All new products' mod='blocknewproducts'}">» {l s='All new products' mod='blocknewproducts'}</a></p>
{else}
 <p>» {l s='No new products at this time' mod='blocknewproducts'}</p>
{/if}
</div>
</div>
<!-- /MODULE Block new products -->

 

If anyone can figure out how to rearrange this code so the block will display like I've described, I'd sincerely appreciate it!

:D

 

~ Elaine

post-485533-0-60439700-1364341113_thumb.jpg

  • Like 2
Link to comment
Share on other sites

  • 2 months 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...