Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Insert <hr> between product rows on products_t.tpl but not on the last row

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-13-2009, 01:54 PM
 
Christofer Christofer is offline
 

eXpert
  
Join Date: Apr 2009
Location: Thessaloniki, Greece
Posts: 202
 

Default 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>
__________________
X-Cart Gold : 4.2.1 (on linux parallels plesk / mysql)
Php v5.2.9 (Zend: 2.2.0) - MySql v5.0.79 - LiteSpeed server
Modules : X-Offer & X-Aom & One page checkout
Product tabs & Product downloads & many more
Reply With Quote
  #2  
Old 05-14-2009, 07:33 AM
 
geckoday geckoday is offline
 

X-Wizard
  
Join Date: Aug 2005
Posts: 1,073
 

Default 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}
__________________
Manuka Bay Company
X-Cart Version 4.0.19 [Linux]

UGG Boots and other fine sheepskin products
http://www.snowriver.com
Reply With Quote

The following user thanks geckoday for this useful post:
Christofer (05-14-2009)
  #3  
Old 05-14-2009, 04:23 PM
 
Christofer Christofer is offline
 

eXpert
  
Join Date: Apr 2009
Location: Thessaloniki, Greece
Posts: 202
 

Default Re: Insert <hr> between product rows on products_t.tpl but not on the last row

thank you. That did the trick..
__________________
X-Cart Gold : 4.2.1 (on linux parallels plesk / mysql)
Php v5.2.9 (Zend: 2.2.0) - MySql v5.0.79 - LiteSpeed server
Modules : X-Offer & X-Aom & One page checkout
Product tabs & Product downloads & many more
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

   

 
X-Cart forums © 2001-2020