I can't get what kind of borders you need but I can also give common recipe:
just add name to foreach f.e.
foreach name=prods
then youll be able treat it like this:
Code:
class="item {if $smarty.foreach.prods.first}left-item{else}{if $smarty.foreach.prods.last}right-item{/if}{/if}"
after adding this to css:
Code:
.item{border:#000 1px solid}
.left-item{border-left:0px none}
.right-item{border-right:0px none}
you will get no borders for left and right element