X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Insert <hr> between product rows on products_t.tpl but not on the last row (https://forum.x-cart.com/showthread.php?t=47537)

Christofer 05-13-2009 01:54 PM

Insert <hr> between product rows on products_t.tpl but not on the last row
 
I inserted an line between the products rows on multi column format, but i don't want it to appear on the bottom if there is no other row. IF you can't understand see there : http://www.gsmcorner.gr/handsfree/

on that page you will see two rows of products and two lines. On that exampe i want only one line to appear. Not the second, coz there is no products downside of the line.

The code i added on the .tpl is that : (see it, to tell me what to change if you know)
Code:

<tr>
    {foreach from=$row item=product}
          {if $product}
          <td colspan="3"><div style="border-bottom:1px solid #9d1500; width:100%; margin-top:8px; margin-bottom:1px;"></div></td>
          {/if}
        {/foreach}
      </tr>


geckoday 05-14-2009 07:33 AM

Re: Insert <hr> between product rows on products_t.tpl but not on the last row
 
Use {if not $smarty.foreach.products_matrix.last} ...line... {/if}

Christofer 05-14-2009 04:23 PM

Re: Insert <hr> between product rows on products_t.tpl but not on the last row
 
thank you. That did the trick..


All times are GMT -8. The time now is 06:54 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.