Results 1 to 6 of 6
  1. #1
    Join Date
    May 2008
    Posts
    402
    Plugin Contributions
    0

    Default Manufacturers and other dropdown options

    A couple years ago I modified my template, and now I want to add some features back to it, specifically the manufacturers dropdown to sort products on the listing pages. Would anyone be kind enough to help me get the proper code back where it needs to be?

    Also wondering if there are any other ways to create sorting orders based on other features such as color, size, etc...

    Grateful for any help, thank you!

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Manufacturers and other dropdown options

    If you followed the override schema with your template - - then
    in your admin >config>Product Listing >Display Category/Manufacturer Filter

    If not you need to provide much more information
    Zen-Venom Get Bitten

  3. #3
    Join Date
    May 2008
    Posts
    402
    Plugin Contributions
    0

    Default Re: Manufacturers and other dropdown options

    Thank you so much. I went to the admin>configuration and the settings you mentioned didn't change anything. So I dug around in the tpl_index_product_list.php file and noticed it was missing a lot of code compared to the stock version. I added the following code after the category description and it worked!

    PHP Code:
    <?php
      $check_for_alpha 
    $listing_sql;
      
    $check_for_alpha $db->Execute($check_for_alpha);

      if (
    $do_filter_list || ($check_for_alpha->RecordCount() > && PRODUCT_LIST_ALPHA_SORTER == 'true')) {
      
    $form zen_draw_form('filter'zen_href_link(FILENAME_DEFAULT), 'get') . '<label class="inputLabel">' .TEXT_SHOW '</label>';
    ?>

    <?php
      
    echo $form;
      echo 
    zen_draw_hidden_field('main_page'FILENAME_DEFAULT);
      echo 
    zen_hide_session_id();
    ?>
    <?php
      
    // draw cPath if known
      
    if (!$getoption_set) {
        echo 
    zen_draw_hidden_field('cPath'$cPath);
      } else {
        
    // draw manufacturers_id
        
    echo zen_draw_hidden_field($get_option_variable$_GET[$get_option_variable]);
      }

      
    // draw music_genre_id
      
    if (isset($_GET['music_genre_id']) && $_GET['music_genre_id'] != '') echo zen_draw_hidden_field('music_genre_id'$_GET['music_genre_id']);

      
    // draw record_company_id
      
    if (isset($_GET['record_company_id']) && $_GET['record_company_id'] != '') echo zen_draw_hidden_field('record_company_id'$_GET['record_company_id']);

      
    // draw typefilter
      
    if (isset($_GET['typefilter']) && $_GET['typefilter'] != '') echo zen_draw_hidden_field('typefilter'$_GET['typefilter']);

      
    // draw manufacturers_id if not already done earlier
      
    if ($get_option_variable != 'manufacturers_id' && isset($_GET['manufacturers_id']) && $_GET['manufacturers_id'] > 0) {
        echo 
    zen_draw_hidden_field('manufacturers_id'$_GET['manufacturers_id']);
      }

      
    // draw sort
      
    echo zen_draw_hidden_field('sort'$_GET['sort']);

      
    // draw filter_id (ie: category/mfg depending on $options)
      
    if ($do_filter_list) {
        echo 
    zen_draw_pull_down_menu('filter_id'$options, (isset($_GET['filter_id']) ? $_GET['filter_id'] : ''), 'onchange="this.form.submit()"');
      }

      
    // draw alpha sorter
      
    require(DIR_WS_MODULES zen_get_module_directory(FILENAME_PRODUCT_LISTING_ALPHA_SORTER));
    ?>
    </form>
    <?php
      
    }
    ?>
    <br class="clearBoth" />


    Now the Filter Results By Manufacturers or Items Starting With... are showing!

    I was wondering if there are any other things that can be filtered or sorted via dropdown?

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Manufacturers and other dropdown options

    I added the following code after the category description
    Why are you not using the complete file as delivered??
    Zen-Venom Get Bitten

  5. #5
    Join Date
    May 2008
    Posts
    402
    Plugin Contributions
    0

    Default Re: Manufacturers and other dropdown options

    Because I started with no coding background and have been hacking away at this for years (which speaks volumes since it seems that browsing this forum most of the links people post of their ZC sites are no longer existing) through updates and theme modifications, and frankly I would be too concerned that other things would break. Thank you very much for the help.

  6. #6
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Manufacturers and other dropdown options

    I would be too concerned that other things would break
    Seems to me that it is time for you to break out an app like beyond compare or winmerge and correctly make these changes to your site using the override system

    Can be done to a copy of your install either in a folder on the server or locally using a wamp install
    Zen-Venom Get Bitten

 

 

Similar Threads

  1. v150 missing items on admin dropdown menu and other problems
    By delia in forum Installing on a Linux/Unix Server
    Replies: 9
    Last Post: 30 Sep 2012, 12:49 AM
  2. Free Shipping and Other Options
    By KenHaynes in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 22 Oct 2011, 01:47 AM
  3. Moving Search bar into header image and manufacturers dropdown
    By rickiesdiscount in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 11 Jan 2009, 08:21 PM
  4. How to put the title and dropdown list next to each other?
    By mishutkadesign in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 3 Aug 2008, 05:17 PM
  5. Adding Colour and Size Dropdown options
    By v.kirk in forum Setting Up Categories, Products, Attributes
    Replies: 8
    Last Post: 15 Aug 2006, 11:08 AM

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