kin6x Posted April 22, 2012 Share Posted April 22, 2012 The problem im having is that my New Products module isnt rendering like it should. Instead of the normal order of: -Picture -Description -Picture -Description. Its rendering like: -Picture -Picture -Description -Description The link to the store is http://www.kxrecords.com/store Link to comment Share on other sites More sharing options...
jhnstcks Posted April 22, 2012 Share Posted April 22, 2012 Its supposed to look like that Link to comment Share on other sites More sharing options...
kin6x Posted April 22, 2012 Author Share Posted April 22, 2012 Its supposed to look like that Really? Thats kind of confusing.. Hmm. Well alright, thank you for the reply Link to comment Share on other sites More sharing options...
jhnstcks Posted April 22, 2012 Share Posted April 22, 2012 Yes, not exactly the layout people expect, as you can see from the image I have attached, it doesn't look too bad when its fully populated and themes. Link to comment Share on other sites More sharing options...
jhnstcks Posted April 22, 2012 Share Posted April 22, 2012 (edited) I've had a play and you could try the following: Change your blocknewproducts.tpl to: <div id="new-products_block_right" class="block new_products_block"> <h4><a href="{$link->getPageLink('new-products.php')}" title="{l s='New products' mod='blocknewproducts'}">{l s='New products' mod='blocknewproducts'}</a></h4> <div class="new_block_content"> {if $new_products !== false} <ul class="product_images clearfix"> {foreach from=$new_products item='product' name='newProducts'} {if $smarty.foreach.newProducts.index < 0} {/if} {/foreach} </ul> <dl class="products"> {foreach from=$new_products item=newproduct name=myLoop} <h5 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></h5> {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:50:'...'}</a></dd>{/if} <a href="{$newproduct.link}" title="{$newproduct.name|escape:html:'UTF-8'}"><img src="{$link->getImageLink($newproduct.link_rewrite, $newproduct.id_image, 'medium')}" height="{$mediumSize.height}" width="{$mediumSize.width}" style="margin-left:3px" alt="{$product.legend|escape:html:'UTF-8'}" /></a> {/foreach} </dl> <p><a href="{$link->getPageLink('new-products.php')}" title="{l s='All new products' mod='blocknewproducts'}" class="button_large">{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> and change your css to: .new_products_block ul {padding-top:10px} .new_products_block ul li {float: left; margin:1px 10px} .new_products_block h5 a {font-weight:bold; float:right;margin-top:15px;width:147px} .new_products_block dl dt a {font-weight:bold} .new_products_block dl {clear:both;padding:2px 0 0 0;border-top:1px solid #ccc} .new_products_block dl dt {margin:9px 0 0 0} .new_products_block dl dd a {font-size: 11px;} .new_products_block dl dd a img {} .new_products_block dd {height:1em;margin-left:84px} .new_products_block p a.button_large {width:211px;margin:12px 0 0 0;color:#fff} Edited April 22, 2012 by jhnstcks a few changes (see edit history) Link to comment Share on other sites More sharing options...
kin6x Posted April 22, 2012 Author Share Posted April 22, 2012 (edited) I've had a play and you could try the following: Change your blocknewproducts.tpl to: <div id="new-products_block_right" class="block new_products_block"> <h4><a href="{$link->getPageLink('new-products.php')}" title="{l s='New products' mod='blocknewproducts'}">{l s='New products' mod='blocknewproducts'}</a></h4> <div class="new_block_content"> {if $new_products !== false} <ul class="product_images clearfix"> {foreach from=$new_products item='product' name='newProducts'} {if $smarty.foreach.newProducts.index < 0} {/if} {/foreach} </ul> <dl class="products"> {foreach from=$new_products item=newproduct name=myLoop} <h5 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></h5> {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:50:'...'}</a></dd>{/if} <a href="{$newproduct.link}" title="{$newproduct.name|escape:html:'UTF-8'}"><img src="{$link->getImageLink($newproduct.link_rewrite, $newproduct.id_image, 'medium')}" height="{$mediumSize.height}" width="{$mediumSize.width}" alt="{$product.legend|escape:html:'UTF-8'}" /></a> {/foreach} </dl> <p><a href="{$link->getPageLink('new-products.php')}" title="{l s='All new products' mod='blocknewproducts'}" class="button_large">{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> and change your css to: .new_products_block ul {padding-top:10px} .new_products_block ul li {float: left; margin:1px 10px} .new_products_block h5 a {font-weight:bold; float:right;margin-top:10px;width:150px} .new_products_block dl dt a {font-weight:bold} .new_products_block dl {clear:both;padding:2px 0 0 0;border-top:1px solid #ccc} .new_products_block dl dt {margin:9px 0 0 0} .new_products_block dl dd a {font-size: 11px;} .new_products_block dl dd a img {} .new_products_block dd {height:1em;margin-left:81px} .new_products_block p a.button_large {width:211px;margin:12px 0 0 0;color:#fff} Good god, you are a master with code my friend. Just when I thought id have to simply set the number at 1 and be happy that worked more than perfectly, thank you very much Since its been kind of hard for me to get too many replies here I wonder though if youd be willing to help me on 1 last issue? As youve probably already noticed on my site I removed the Prestashop logo but theres still a huge gap from the menu to the top. This is because I was unable to remove the header code completely. Everytime I try and remove it, it renders the entire store blank.. Can you think what may be causing this? Edited April 22, 2012 by kin6x (see edit history) Link to comment Share on other sites More sharing options...
jhnstcks Posted April 22, 2012 Share Posted April 22, 2012 (edited) I can't access your site at the moment to have a look, will check back tomorrow morning. Theres a few changes to the code to tidy the block up a bit Edited April 22, 2012 by jhnstcks (see edit history) Link to comment Share on other sites More sharing options...
kin6x Posted April 22, 2012 Author Share Posted April 22, 2012 Alright thanks. Have a good one Link to comment Share on other sites More sharing options...
jhnstcks Posted April 23, 2012 Share Posted April 23, 2012 In your global.css file, line 246 add top:-95px and change the height to 148px Link to comment Share on other sites More sharing options...
kin6x Posted April 25, 2012 Author Share Posted April 25, 2012 Worked like a charm, thank you again good sir! As soon as I figure out how i'll mark this as Solved. Good fortune to you and yours Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now