View Single Post
  #4  
Old 10-26-2004, 03:20 PM
  jds580s's Avatar 
jds580s jds580s is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 38
 

Default

Thanks Boomer and pmstudios.

pmstudios, I actually use what you helped me with earlier in another section of the cart. I was able to solve this issue in the template (well almost, I've still got a few things to work out) but it's 90% of the way there.

Code:
{*** ########## Manufacture Heading for products ########## ***} {assign var="manid" value=$products[product].manufacturerid} {if $manufacturers[$manid].manufacturerid ne $last_manufacturerid} {if $manufacturers[$manid].manufacturerid ne "0"} {if $first_product eq"false"} </td></tr><tr><td colspan="3"> <hr> {else} <td colspan="3"> {/if} {$manufacturers[$manid].manufacturer} {if $manufacturers[$manid].descr ne ""} <span class="maintext">{$manufacturers[$manid].descr} </span> {if $manufacturers[$manid].image ne ""} Manufacture Logo<hr> {/if}{/if}</td></tr><tr valign="top">{/if}{/if} {assign var="last_manufacturerid" value=$products[product].manufacturerid} {assign var="first_product" value="false"} {*** ########## End Manufacture Heading for products ########## ***}

My original approach of looking ahead seemed way to hard, but I thought, why look ahead when I can look back?!
I just set a variable towards the end of the loop that remembers what the manufacture was of the last product and if it is the same, it just skips the code.
__________________
animator for hire
onthez.com
------------------------
x-cart v4.0.5 Linux
_________________
Reply With Quote