View Single Post
  #8  
Old 12-09-2008, 04:29 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Manufacturers Module - Option box need it

We have dozens of manufacturers. While not exactly what you want, here is our solution....
skin1/modules/Manufacturers/menu_manufacturers.tpl
Code:
{if $manufacturers_menu ne ''} {capture name=menu} <form name="form_manuf" method="get" action="manufacturers.php"> <select size="12" name="manufacturerid" onchange="document.form_manuf.submit()"> {section name=mid loop=$manufacturers_menu} <option value="{$manufacturers_menu[mid].manufacturerid}">{$manufacturers_menu[mid].manufacturer|truncate:18:"...":true}</option> {/section} </select> </form> {/capture} {include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_manufacturers menu_content=$smarty.capture.menu} {/if}

What it does is makes a "scroll box" that lists your manufacturers.

The <select size="12".. specifies how many manufacturers are displayed at one time. In this case it is 12 manufacturers high.

The {$manufacturers_menu[mid].manufacturer|truncate:18:"...":true} specifies how long the displayed name is (so it will fit in your column and not wrap). In this case it is 18 characters long.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote