Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    May 2009
    Posts
    43
    Plugin Contributions
    0

    Default Manufacturer side box drop down list

    Hi there,

    I want to change the form element in the manufacturers sidebox to a drop down list. How is this done?

    Thanks for your time

  2. #2
    Join Date
    May 2009
    Posts
    43
    Plugin Contributions
    0

    Default Re: Manufacturer side box drop down list

    ok, I did using the following code. It seems to work but can anyone tell me if there are any errors, or things I need to add?

    Code:
    $content = "";
        $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
        $content .= zen_draw_form('manufacturers_form', zen_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get');
        $content .= zen_draw_pull_down_menu('manufacturers_id', $manufacturer_sidebox_array, (isset($_GET['manufacturers_id']) ? $_GET['manufacturers_id'] : ''), 'onchange="this.form.submit();"') . zen_hide_session_id();
        $content .= '</form>';
        $content .= '</div>';
    Thanks for your time

  3. #3
    Join Date
    May 2009
    Posts
    43
    Plugin Contributions
    0

    Default Re: Manufacturer side box drop down list

    I found a problem.

    The drop down box starts off by saying Please Select which is fine.

    When you select a manufacturer, it redirects to that page and says Please Select again. EXCEPT when you select the last name in the list and then it displays that name even after re-directing and if you select again, there is another option that says --Reset--

    Could someone explain to me what's happening?

  4. #4
    Join Date
    May 2009
    Posts
    43
    Plugin Contributions
    0

    Default Re: Manufacturer side box drop down list

    After a bit of checking I found that this isn't a probelm with the dropdown box code but rather a problem with the manufacturers sidebar in general.
    When I select the --RESET-- option it takes me back to a messed-up version of my home page.
    Obviously this isn't what I need!
    How have other people fixed this bug?

    Thanks

  5. #5
    Join Date
    May 2009
    Posts
    43
    Plugin Contributions
    0

    Default Re: Manufacturer side box drop down list

    Oh yeah, and I also realised that it already WAS a dropdown box and all I had to change was the size definition. duh!

  6. #6
    Join Date
    Oct 2008
    Posts
    9
    Plugin Contributions
    0

    Default Re: Manufacturer side box drop down list

    Where do you put this code? Is it possible to do the same with any sidebox?

  7. #7
    Join Date
    Jul 2009
    Posts
    234
    Plugin Contributions
    1

    Default Re: Manufacturer side box drop down list

    Best way to change teh manufactures list into a dropdown list is to do it in the Admin....no need to add in extra code!


    Go to Admin panel - Configuration - Maximum values.
    Then find Manufacturers List - Scroll Box Size/Style (about 7 down) If you set this to a 1 or a 0 then it will be a dropdown box

  8. #8
    Join Date
    Apr 2010
    Posts
    1
    Plugin Contributions
    0

    Default Re: Manufacturer side box drop down list

    Quote Originally Posted by Wilbo View Post
    After a bit of checking I found that this isn't a probelm with the dropdown box code but rather a problem with the manufacturers sidebar in general.
    When I select the --RESET-- option it takes me back to a messed-up version of my home page.
    Obviously this isn't what I need!
    How have other people fixed this bug?

    Thanks
    Did you ever figure out how to fix the problem of the -RESET- link taking you to a version of your home page with the wrong stylesheet? I can't seem to find a solution to this problem.

    Thanks!

  9. #9
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,586
    Plugin Contributions
    30

    Default Re: Manufacturer side box drop down list

    I have the same problem.
    The Reset selection passes a url with a missing id:

    for example
    http://...../index.php?main_page=index&manufacturers_id=
    instead of
    http://...../index.php?main_page=index&manufacturers_id=1

    The "missing id" is (not) defined in the "else" in
    \includes\modules\sideboxes\YOUR_TEMPLATE\manufacturers.php

    Code:
    // Display a list
        $manufacturer_sidebox_array = array();
        if (!isset($_GET['manufacturers_id']) || $_GET['manufacturers_id'] == '' ) {
          $manufacturer_sidebox_array[] = array('id' => '', 'text' => PULL_DOWN_ALL);
        } else {
          $manufacturer_sidebox_array[] = array('id' => '', 'text' => PULL_DOWN_MANUFACTURERS);
        }
    However I don't think this is a bug but a template issue.
    I have three templates and it is only in the extensively-modified (by others) one that things go wrong.
    So anyone with this problem (page with broken layout) has to find their own solution.

    regards
    Steve

  10. #10
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,586
    Plugin Contributions
    30

    Default Re: Manufacturer side box drop down list

    As is usually the case I have changed my mind, and have reported this as a bug:

    http://www.zen-cart.com/forum/showthread.php?t=159774

    regards
    Steve

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Changing the Manufacturers drop down box to a list
    By Zammo in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 5 Sep 2011, 03:44 PM
  2. Disable Manufacturer drop down box, also currency and language
    By Apple Pet Supply in forum Basic Configuration
    Replies: 3
    Last Post: 8 Oct 2010, 06:26 PM
  3. manufacturer/category drop down box in product listing page
    By buckit in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 8 Jan 2010, 11:34 PM
  4. drop down list and check box
    By gsdcypher in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 5 Dec 2008, 03:05 PM
  5. Limit content of drop down catagorie side box to one catagorie?
    By CoolCarPartsOnline in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 18 Apr 2008, 09:33 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR