Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Width of "Limit to Manufacturer" under advanced search

Width of "Limit to Manufacturer" under advanced search

12 May 2011, 2:57 PM
#1
elena1707 avatar

elena1707

New Zenner

Join Date:
Apr 2011
Posts:
8
Plugin Contributions:
0

Post #1 by elena1707

Hi all,

how do i change the width of "Limit to Manufacturer" drop down box under "Advanced Search"?
Thank you

12 May 2011, 9:39 PM
#2
celtic avatar

celtic

Zen Follower

Join Date:
Feb 2010
Posts:
154
Plugin Contributions:
0

Post #2 by celtic

elena,

You will need to edit one of your zencart php files. You haven't given a link to your site so I can't be specific as I don't know what template you are using.

The file to edit is: /includes/template_default/templates/tpl_advanced_search_default.php

Where it has 'template_default' in the above path, you need to replace that with the name of your template to find the file to be edited.

Inside tpl_advanced_search_default.php, you should find the following code on about line 39...

<fieldset class="floatingBox forward">
    <legend><?php echo ENTRY_MANUFACTURERS; ?></legend>
    <?php echo zen_draw_pull_down_menu('manufacturers_id', zen_get_manufacturers(array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)), PRODUCTS_MANUFACTURERS_STATUS), $sData['manufacturers_id']); ?>

Change the third line to be...

    <?php echo zen_draw_pull_down_menu('manufacturers_id', zen_get_manufacturers(array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)), PRODUCTS_MANUFACTURERS_STATUS), $sData['manufacturers_id'], "id='advsrchmanufacturer'"); ?>

You'll see that I've added an extra parameter to the end of the line, adding an id='advsrchmanufacturer' to the select box.

Now edit your CSS file and add a definition for this id, making it the size you require.

eg.

#advsrchmanufacturer { width: 200px }
12 May 2011, 10:20 PM
#3
elena1707 avatar

elena1707

New Zenner

Join Date:
Apr 2011
Posts:
8
Plugin Contributions:
0

Post #3 by elena1707

Perfect, thank you very much! I was trying to stick it inside of a "div" and change it's width, but, of course, that would change the width of a div...Thank you again, it worked