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)

johnwhdavies 01-21-2005 03:19 PM

Manufacturers Drop Down
 
I have a drop down for the manufacturers MODULES->MANUFACTURERS->MENU_MANUFACTURERS.TPL, code here

<form name="form_manuf" method="get" action="manufacturers.php">
<select name="manufacturerid" onChange="document.form_manuf.submit()">
<option value="0" selected>Search By Manufacturer</option>
{section name=mid loop=$manufacturers_menu}
<option value="{$manufacturers_menu[mid].manufacturerid}">{$manufacturers_menu[mid].manufacturer}</option>
{/section}
</select>
</form>

However it does not seem to display more than 10 records and is not in alphabetical order, could anyone point me in the right direction to resolve these 2 issues.

Many Thanks in Advance

John

Jagmeister 02-01-2005 10:26 AM

Manufacturer Drop-Down Menu
 
Hi John,

Did you ever get this figured out? It sounds like something I would like to be able to do as well.

If not, I'll add it to my list of things to look at.

Thanks,
Matt

Danielle 02-14-2005 02:12 PM

However you have the order setup in the manufacturers in admin is how it will display. Also, in I believe general settings, you can adjust how many records are displayed in the manufacturers list. It worked fine for me, and showed the whole list, the only thing I didn't like was that it didn't really fit in with the rest of the store, also some of my manufacturer names are long and it doesn't wrap them, so it pushes my whole store out of whack...any idea how to fix this?

Danielle 03-02-2005 09:56 AM

OK, I almost have this working the way I want, except before, the manufacturer names would get wrapped if they were too long, now they're pushing over the rest of my store. Does anyone know how I can make the manufacturer names wrap? You can see my problem at http://www.themommymarketplace.com/~themomm//pages.php?pageid=1.

Thanks!

Tuner 04-20-2005 03:47 PM

One way to keep the names short is to use the same technique they use in Product.tpl to keep the description to only 300 words. Use Truncate to limit the lenght of the name. However this will cut off part of the name.

Did you ever get this so that it will work.

I made similar code myself almost identicle. I even used your code. and when I select a manufacture it does not load the page.
Grrrrrrrrrrrrrrrr.
Any Suggestions.

4.013
http://seabass.handsonwebhosting.com/~scalecar

Danielle 04-20-2005 03:54 PM

Nope I gave up...very frustrating. It seems like it should be easy since the normal manufacturers box wraps the text, but I just couldn't figure out how to get the dropdown to do it...

Tuner 04-21-2005 09:35 AM

Try THis
Code:

<option value="{$manufacturers_menu[mid].manufacturerid}">{$manufacturers_menu[mid].manufacturer|truncate:17:"...":true}</option>

This will limit the lenght of the name to only 17 characters. you may want to adjust the number accordingly. It allso ads ... at the end of any name it cuts off.

Can you at least get this menu to work I shure can not it will not select the manufacture and display the product if I make a selelction.

Danielle 04-21-2005 10:41 AM

That worked great, thank you! :D Here is my whole code from menu_manufacturers.tpl, try just copying and pasting it and hopefully it will work for you too!
Quote:

{* $Id: menu_manufacturers.tpl,v 1.4 2004/06/22 05:38:52 max Exp $ *}
{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>Search</option>
{section name=mid loop=$manufacturers_menu}
<option value="{$manufacturers_menu[mid].manufacturerid}">{$manufacturers_menu[mid].manufacturer|truncate:12:"...":true}</option>
{/section}
</select>
</form>
{if $show_other_manufacturers}


{$lng.lbl_other_manufacturers}

{/if}
{/capture}
{include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_manufacturers menu_content=$smarty.capture.menu}


{/if}

virtualdynamix 06-12-2005 10:33 PM

Danielle,

Thanks, your code worked great. My site is now much cleaner with the pulldown list.

Regards,

Tuner 06-12-2005 11:25 PM

Just a little heads up Any pull down list like this will not allow search engines to crawl your categories or Manufacuturers unless you have a site map or other NON JAVA meathods for linking
I prefer this modification because it uses actual URL I am not sure if a crawler will index this but their is definately more of a possibitlity bexause it actualy sees a link vor the value rather than just a Manuid I used this for my Categories also.

menu_manufacturers.tpl line:6
Code:

  <form name="ManufacturerMenu">
    <select onChange="location=this.options[this.selectedIndex].value;" style="font-size:11px; color:#333333; width:160px;">
    <option value="{$http_location}/manufacturers.php?manufacturerid=0">Click for Manufacturers</option>
{section name=mid loop=$manufacturers_menu}
{if $manufacturers_menu[mid].products_count gt "0"}<option value="{$http_location}/manufacturers.php?manufacturerid={$manufacturers_menu[mid].manufacturerid}"{if $manufacturerid==$manufacturers_menu[mid].manufacturerid} selected {/if}>{$manufacturers_menu[mid].manufacturer}</option>
{/if}{/section}
    </select>
  </form>


This is my Source Granted it is still java script but their at leas is and obvious link.(Im using a URL mod to get the .html not a catalog)
Quote:

<select onChange="location=this.options[this.selectedIndex].value;" style="font-size:11px; color:#333333; width:160px;">
<option value="http://www.scalecars.com/manufacturers.php">Click for Manufacturers</option>

<option value="http://www.scalecars.com/Action-Performance-mid-22.html">Action Performance</option>
<option value="http://www.scalecars.com/Amalgam-mid-47.html">Amalgam</option>
<option value="http://www.scalecars.com/Anson-mid-6.html">Anson</option>


All times are GMT -8. The time now is 03:20 AM.

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