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)
-   -   Manufacturers Drop Down (https://forum.x-cart.com/showthread.php?t=11631)

pia 05-12-2010 06:48 AM

Re: Manufacturers Drop Down
 
I have this working in 4.3.1 with the following drop down code: (note... this is just a drop down not in a box as I have it in the header area)

Code:

<form name="form_manuf" method="get" action="manufacturers.php">
<select name="manufacturerid" onChange="document.form_manuf.submit()">
<option value="0" selected>Please Select Brand</option>
{section name=mid loop=$manufacturers_menu}
<option value="{$manufacturers_menu[mid].manufacturerid}">{$manufacturers_menu[mid].manufacturer|truncate:22:"...":true}</option>
{/section}
</select>
</form>


To have it in a menu box use:

Code:

{if $manufacturers_menu ne ''}
{capture name=menu}
<form name="form_manuf" method="get" action="manufacturers.php">
<select name="manufacturerid" onChange="document.form_manuf.submit()">
<option value="0" selected>Please Select Brand</option>
{section name=mid loop=$manufacturers_menu}
<option value="{$manufacturers_menu[mid].manufacturerid}">{$manufacturers_menu[mid].manufacturer|truncate:22:"...":true}</option>
{/section}
</select>
</form>
{/if}
{/capture}
{include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_manufacturers menu_content=$smarty.capture.menu}


FTI 05-13-2010 04:12 AM

Re: Manufacturers Drop Down
 
I just want to say that you are awesome pia. I've been banging my head for a week with this one. Thank you sooo much... You don't happen to know how to add the same thing but in search, do you? Look at point 2 in my post:

http://forum.x-cart.com/showthread.php?t=53342


Anyhow, thank you very much!

josebueso 05-14-2010 12:05 AM

Re: Manufacturers Drop Down
 
Hi

For X-cart 4.3.0 version
Your: modules/Manufacturers/menu_manufacturers.tpl should look like this.

{if $manufacturers_menu ne ''}
{capture name=menu}
<form name="form_manuf" method="get" action="manufacturers.php">
<select name="manufacturerid" onChange="document.form_manuf.submit()">
<option value="0" selected>Seleccionar Artista</option>
{section name=mid loop=$manufacturers_menu}
<option value="{$manufacturers_menu[mid].manufacturerid}">{$manufacturers_menu[mid].manufacturer|truncate:15:"...":true}</option>
{/section}
</select>
</form>
{/if}
{/capture}
{include file="customer/menu_dialog.tpl" title=$lng.lbl_manufacturers content=$smarty.capture.menu additional_class="menu-manufacturers"}


All times are GMT -8. The time now is 11:27 PM.

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