Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Manufacturers Drop Down

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-21-2005, 03:19 PM
 
johnwhdavies johnwhdavies is offline
 

Member
  
Join Date: Dec 2004
Posts: 20
 

Default 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
__________________
John Davies

X-Cart version 4.0.9
X-AOM: 4.0.9
X_RMA: 4.0.9
PHP 4.3.10
MySQL server 4.0.18
Operation system Linux

http://www.predeploy.com
Reply With Quote
  #2  
Old 02-01-2005, 10:26 AM
 
Jagmeister Jagmeister is offline
 

Member
  
Join Date: Dec 2004
Location: Colorado Springs, CO
Posts: 11
 

Default 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
__________________
X-Cart Version 4.0.9
Linux/Apache Server
Reply With Quote
  #3  
Old 02-14-2005, 02:12 PM
 
Danielle Danielle is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 138
 

Default

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
X-Cart Pro 4.0.10
X-Gift-Registry
X-AOM
Reply With Quote
  #4  
Old 03-02-2005, 09:56 AM
 
Danielle Danielle is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 138
 

Default

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!
__________________
Danielle
X-Cart Pro 4.0.10
X-Gift-Registry
X-AOM
Reply With Quote
  #5  
Old 04-20-2005, 03:47 PM
 
Tuner Tuner is offline
 

eXpert
  
Join Date: Jan 2003
Location: Scottsdale Arizona
Posts: 245
 

Default

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
__________________
\"Then again it could all be horse crap\"
by some old Guy.
4.013
Reply With Quote
  #6  
Old 04-20-2005, 03:54 PM
 
Danielle Danielle is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 138
 

Default

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...
__________________
Danielle
X-Cart Pro 4.0.10
X-Gift-Registry
X-AOM
Reply With Quote
  #7  
Old 04-21-2005, 09:35 AM
 
Tuner Tuner is offline
 

eXpert
  
Join Date: Jan 2003
Location: Scottsdale Arizona
Posts: 245
 

Default

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.
__________________
\"Then again it could all be horse crap\"
by some old Guy.
4.013
Reply With Quote
  #8  
Old 04-21-2005, 10:41 AM
 
Danielle Danielle is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 138
 

Default

That worked great, thank you! 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}
__________________
Danielle
X-Cart Pro 4.0.10
X-Gift-Registry
X-AOM
Reply With Quote
  #9  
Old 06-12-2005, 10:33 PM
 
virtualdynamix virtualdynamix is offline
 

Newbie
  
Join Date: Jun 2003
Posts: 8
 

Default

Danielle,

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

Regards,
__________________
Virtual Dynamix
4.0.13
Reply With Quote
  #10  
Old 06-12-2005, 11:25 PM
 
Tuner Tuner is offline
 

eXpert
  
Join Date: Jan 2003
Location: Scottsdale Arizona
Posts: 245
 

Default

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>
__________________
\"Then again it could all be horse crap\"
by some old Guy.
4.013
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 05:37 AM.

   

 
X-Cart forums © 2001-2020