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

Manufacturers in a dropdown

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 11-16-2004, 07:57 PM
 
mffowler mffowler is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Melbourne, Australia
Posts: 811
 

Default Manufacturers in a dropdown

In an endless effort to make X-Cart less obsessed with column menus (new feature=new column menu), I put the manufacturers in a dropdown selector. Just a cut and paste of codes, but maybe someone can use the solution. The "if" statement is in there, so manufacturers should be enabled or disabled in "Modules" respectively.

Be sure to keep the "absolute" URL in value, as the links won't work correctly when in the html catalog. I'm using it in the head.tpl inside one of the tables <TD> tag sets.

Code:
{if $manufacturers_menu ne ''} <form name="ManufacturerMenu"> <select onChange="location=this.options[this.selectedIndex].value;" style="font-size:11px; color:#333333; width:140px;"> <option>Shop By Manufacturer</option><option value="http://yourdomain.com/store/home.php">---------------------------</option> {section name=mid loop=$manufacturers_menu} <option value="http://yourdomain.com/store/manufacturers.php?manufacturerid={$manufacturers_menu[mid].manufacturerid}">{$manufacturers_menu[mid].manufacturer}</option> {/section} </select> </form> {else} {/if}

- Mike
__________________
4.1.9
Reply With Quote
  #2  
Old 11-16-2004, 09:41 PM
  EnriqueHavoc's Avatar 
EnriqueHavoc EnriqueHavoc is offline
 

eXpert
  
Join Date: Jul 2004
Posts: 232
 

Default

Thanks... how would you make it so "Shop by Manufacturer" and "------------------" dont bring up broken links if selected?
__________________
X-Cart 4.0.12
PHP 4.3.11
MySQL 4.0.23
Linux/Apache
Net::SSLeay 1.25
libCURL libcurl/7.12.0 OpenSSL/0.9.7a zlib/1.1.4
www.ewdhosting.com
Reply With Quote
  #3  
Old 11-17-2004, 03:35 AM
 
mffowler mffowler is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Melbourne, Australia
Posts: 811
 

Default

I fixed that - correct code above now. As the "----" is an <option>, just add the absolute home page of: http://yourdomain.com/store/home.php and it will return the user to the main home page of the site.

I quite like the dropdown for manufacturers ...

- Mike
__________________
4.1.9
Reply With Quote
  #4  
Old 11-23-2004, 07:28 PM
 
wpd911 wpd911 is offline
 

Member
  
Join Date: Jun 2004
Posts: 10
 

Default

Is there a way to get the dropdown to list ALL the manufacturers? It seems to stop at 10.
Reply With Quote
  #5  
Old 11-24-2004, 12:40 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 3,940
 

Default

this might help you
http://forum.x-cart.com/viewtopic.php?t=7167&start=15
__________________
XCARTMODS.CO.UK | reBOOT Template | Changelog
Reply With Quote
  #6  
Old 01-25-2005, 01:00 PM
 
brightway brightway is offline
 

Member
  
Join Date: Jan 2005
Posts: 27
 

Default

Hi.

I am wanting to add the drop down menu into the
modules/Manufacturers/menu_manufacturers.tpl file.

Removing the standard list of manufacturers and having the drop down instead..but still having the standard xcart manufactures heading.
Where would I stick this code, in this .tpl file?

Thanks.
__________________
4.0.11gold
Reply With Quote
  #7  
Old 02-14-2005, 02:34 PM
 
Danielle Danielle is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 138
 

Default

Yeah I would like this too, I found another mod that does edit the code in the menu_manufacturers.tpl file, but it still made a new area. I would like the dropdown to be under the existing Manufacturer heading and then for the existing list to be gone.

Anyone know how to make this work???

Thanks!
__________________
Danielle
X-Cart Pro 4.0.10
X-Gift-Registry
X-AOM
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


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 12:26 AM.

   

 
X-Cart forums © 2001-2020