Results 1 to 10 of 2344

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    UK
    Posts
    449
    Plugin Contributions
    0

    Default Re: CSS Dropdown menu for your header- With Categories!

    The html TABLE For the currency dropdown is situated slightly over the Information box, and that is interfering with the drop down... to fix will take a bit of juggling with the CSS...
    ~Steve~

  2. #2
    Join Date
    Jan 2009
    Posts
    23
    Plugin Contributions
    0

    Default Re: CSS Dropdown menu for your header- With Categories!

    Hello All

    I've just installed this on a test site (using the excellent Cherry-Zen template) and it all works a dream.

    If possible, instead of having 'Categories' as a top level link, I'd like to have the second level of categories displayed instead (By Price, By Brand, By Type, By Activity).

    Categories
    * By Price (these all have sub-categories)
    * By Brand
    * By Type
    * By Activity

    I've found the relevant code in tpl_drop_menu.php (as below) but have no idea how to amend it, or even if it is possible to do.

    Any suggestions would be most appreciated.

    <?php

    // load the UL-generator class and produce the menu list dynamically from there
    require_once (DIR_WS_CLASSES . 'categories_ul_generator.php');
    $zen_CategoriesUL = new zen_categories_ul_generator;
    $menulist = $zen_CategoriesUL->buildTree(true);
    $menulist = str_replace('"level4"','"level5"',$menulist);
    $menulist = str_replace('"level3"','"level4"',$menulist);
    $menulist = str_replace('"level2"','"level3"',$menulist);
    $menulist = str_replace('"level1"','"level2"',$menulist);
    $menulist = str_replace('<li class="submenu">','<li class="submenu">',$menulist);
    $menulist = str_replace("</li>\n</ul>\n</li>\n</ul>\n","</li>\n</ul>\n",$menulist);
    echo $menulist;
    ?>

    Many thanks

  3. #3
    Join Date
    Sep 2008
    Posts
    3
    Plugin Contributions
    0

    Default Re: CSS Dropdown menu for your header- With Categories!

    Great work guys! Thanks!
    http://www.1800computers.com.au/shop

  4. #4
    Join Date
    Feb 2008
    Posts
    174
    Plugin Contributions
    0

    Default Re: CSS Dropdown menu for your header- With Categories!

    Yes thank you for an amazing job!! I was able to include all the pages the client wanted exactly as she requested! She couldn't be more thrilled!

    Here's the site I have it running on:

    http://www.countrycookieconnection.com/store/

    (PS. I just did the web site, I am not associated with the cookies themselves but they are amazing!)

  5. #5
    Join Date
    Apr 2004
    Posts
    191
    Plugin Contributions
    0

    Default Re: CSS Dropdown menu for your header- With Categories!

    Hi, I ran into a little problem and cannot find the answer. I added the CSS drop down menu but still have the above bar with Home & Log.

    I have attached a picture.

    How do I remove them?

    Thanks.
    Attached Images Attached Images  

  6. #6
    Join Date
    Dec 2007
    Posts
    52
    Plugin Contributions
    0

    Default Re: CSS Dropdown menu for your header- With Categories!

    Hi everyone,

    It's been ages since I've needed to ask for help here. I (thanks to Zen Cart and this forum) successfully setup a store for my wife (w w w dot i m a g i n a r t dot c o m dot a u) which has been working great. I have now been asked to do one for someone else, which I figured wouldn't be too hard now that I've done one. Wrong! I've only just started this site and I already have an issue! You can see the site at w w w dot h o l i s t i q u e c o s m e t i c s dot c o m / s h o p

    The site is very bare as I thought I'd get the module I hadn't used before working before I did anything else. The module I'm having issues with is the CSS Horizontal Drop Down Menu module - hence why I'm writing here! lol

    The main headings are fine, but under Information, I wanted to add two other menus. Privacy and FAQ. As you can see there are a few issues.

    I used the About Us module to add these two pages. I have used this many times on the site I did for my wife and didn't have a problem. The only difference I can see is the editing of the information.php file vs the editing of the tpl_drop_menu.php file.

    The issues are...

    1) The name in the drop down menu says HEADER_TITLE_X instead of just X. Where did I go wrong?

    2) If you click on FAQ, the bars down the bottom vanish, yet with Privacy they don't??? Also a back button has appeared on the Privacy page which I don't want.

    I'm not sure what code you need to see, but below is the includes/templates/YOUR_TEMPLATE/common/tpl_drop_menu.php - if you need to see any others then please let me know.

    Code:
    <?php
    //
    // +----------------------------------------------------------------------+
    // |zen-cart Open Source E-commerce                                       |
    // +----------------------------------------------------------------------+
    // | Copyright (c) 2003 The zen-cart developers                           |
    // |                                                                      |
    // | http://www.zen-cart.com/index.php                                    |
    // |                                                                      |
    // | Portions Copyright (c) 2003 osCommerce                               |
    // +----------------------------------------------------------------------+
    // | This source file is subject to version 2.0 of the GPL license,       |
    // | that is bundled with this package in the file LICENSE, and is        |
    // | available through the world-wide-web at the following url:           |
    // | http://www.zen-cart.com/license/2_0.txt.                             |
    // | If you did not receive a copy of the zen-cart license and are unable |
    // | to obtain it through the world-wide-web, please send a note to       |
    // | [email protected] so we can mail you a copy immediately.          |
    // +----------------------------------------------------------------------+
    // $Id: tpl_drop_menu.php  2005/06/15 15:39:05 DrByte Exp $
    //
    
    ?>
    <!-- menu area -->
    <div id="dropMenuWrapper">
      <div id="dropMenuWrapperb">
        <div id="dropMenuWrapperc">
          <div id="dropMenuWrapperd">
            <div id="dropMenu">
              <ul class="level1">
                <li class="submenu"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>"><?php echo HEADER_TITLE_CATALOG; ?></a>
                  <ul class="level2">
    <!--                <li><a href="<?php echo zen_href_link(FILENAME_PRODUCTS_NEW); ?>"><?php echo HEADER_TITLE_NEW_PRODUCTS; ?></a></li> -->
    <!--                <li><a href="<?php echo zen_href_link(FILENAME_PRODUCTS_ALL); ?>"><?php echo HEADER_TITLE_ALL_PRODUCTS; ?></a></li> -->
    <!--                <li><a href="<?php echo zen_href_link(FILENAME_SPECIALS); ?>"><?php echo HEADER_TITLE_SPECIALS; ?></a></li> -->
    <!--                <li><a href="<?php echo zen_href_link(FILENAME_ADVANCED_SEARCH); ?>"><?php echo HEADER_TITLE_SEARCH; ?></a></li> -->
                  </ul>
                </li>
                <li class="submenu"><a href="<?php echo zen_href_link(FILENAME_SITE_MAP); ?>"><?php echo HEADER_TITLE_CATEGORIES; ?></a>
                  <?php
    
     // load the UL-generator class and produce the menu list dynamically from there
     require_once (DIR_WS_CLASSES . 'categories_ul_generator.php');
     $zen_CategoriesUL = new zen_categories_ul_generator;
     $menulist = $zen_CategoriesUL->buildTree(true);
     $menulist = str_replace('"level4"','"level5"',$menulist);
     $menulist = str_replace('"level3"','"level4"',$menulist);
     $menulist = str_replace('"level2"','"level3"',$menulist);
     $menulist = str_replace('"level1"','"level2"',$menulist);
     $menulist = str_replace('<li class="submenu">','<li class="submenu">',$menulist);
     $menulist = str_replace("</li>\n</ul>\n</li>\n</ul>\n","</li>\n</ul>\n",$menulist);
     echo $menulist;
    ?>
                </li>
                <li class="submenu"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>"><?php echo HEADER_TITLE_INFORMATION; ?></a>
                  <ul class="level2">
    			    <?php if (DEFINE_SHIPPINGINFO_STATUS <= 1) { ?>
    <!--                <li><a href="<?php echo zen_href_link(FILENAME_SHIPPING); ?>"><?php echo HEADER_TITLE_SHIPPING_INFO; ?></a></li> -->
    				<?php } ?>
    				<?php if (DEFINE_CONDITIONS_STATUS <= 1) { ?>
    <!--                <li><a href="<?php echo zen_href_link(FILENAME_CONDITIONS); ?>"><?php echo HEADER_TITLE_CONDITIONS_OF_USE; ?></a></li> -->
    				<?php } ?>
                    <li><a href="<?php echo zen_href_link(FILENAME_FAQ); ?>"><?php echo HEADER_TITLE_FAQ; ?></a></li>
                    <li><a href="<?php echo zen_href_link(FILENAME_PRIVACY); ?>"><?php echo HEADER_TITLE_PRIVACY; ?></a></li>
                    <?php if (DEFINE_SITE_MAP_STATUS <= 1) { ?>
    <!--                <li><a href="<?php echo zen_href_link(FILENAME_SITE_MAP); ?>"><?php echo HEADER_TITLE_SITE_MAP; ?></a></li> -->
                    <?php } ?>
                    <?php if (MODULE_ORDER_TOTAL_GV_STATUS == 'true') { ?>
    <!--                <li><a href="<?php echo zen_href_link(FILENAME_GV_FAQ, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_GV_FAQ; ?></a></li> -->
                    <?php } ?>
                    <?php if (MODULE_ORDER_TOTAL_COUPON_STATUS == 'true') { ?>
    <!--                <li><a href="<?php echo zen_href_link(FILENAME_DISCOUNT_COUPON, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_DISCOUNT_COUPON; ?></a></li> -->
                    <?php } ?>
                    <?php if (SHOW_NEWSLETTER_UNSUBSCRIBE_LINK == 'true') { ?>
    <!--                <li><a href="<?php echo zen_href_link(FILENAME_UNSUBSCRIBE, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_UNSUBSCRIBE; ?></a></li> -->
                    <?php } ?>
                    <?php require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/' . 'ezpages_drop_menu.php'); ?>
                  </ul>
                </li>
                <li><a href="<?php echo zen_href_link(FILENAME_CONTACT_US, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CONTACT_US; ?></a></li>
                <li class="submenu"><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>
                  <ul class="level2">
                    <?php if ($_SESSION['customer_id']) { ?>
                    <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>
                    <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
                    <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT_NEWSLETTERS, '', 'SSL'); ?>"><?php echo HEADER_TITLE_NEWSLETTERS; ?></a></li>
                    <?php } else { ?>
                    <li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li>
                    <li><a href="<?php echo zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CREATE_ACCOUNT; ?></a></li>
                    <?php } ?>
                  </ul>
                </li>
                <?php if ($_SESSION['cart']->count_contents() != 0) { ?>
                <li class="submenu"><a class="noLine" href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>
                  <ul class="level2">
                    <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>
                  </ul>
                </li>
                <?php } else { ?>
                <li><a class="noLine" href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>
                <?php } ?>
              </ul>
            </div>
          </div>
        </div>
      </div>
    </div><!-- end dropMenuWrapper-->
    <div class="clearBoth"></div>
    Any help would be very much appreciated.

    Kind Regards,

    Brian

  7. #7
    Join Date
    Jan 2005
    Location
    USA, St. Louis
    Posts
    3,710
    Plugin Contributions
    9

    Default Re: CSS Dropdown menu for your header- With Categories!

    Quote Originally Posted by Brian Flanagan View Post
    Hi everyone,

    It's been ages since I've needed to ask for help here. I (thanks to Zen Cart and this forum) successfully setup a store for my wife (w w w dot i m a g i n a r t dot c o m dot a u) which has been working great. I have now been asked to do one for someone else, which I figured wouldn't be too hard now that I've done one. Wrong! I've only just started this site and I already have an issue! You can see the site at w w w dot h o l i s t i q u e c o s m e t i c s dot c o m / s h o p

    The site is very bare as I thought I'd get the module I hadn't used before working before I did anything else. The module I'm having issues with is the CSS Horizontal Drop Down Menu module - hence why I'm writing here! lol

    The main headings are fine, but under Information, I wanted to add two other menus. Privacy and FAQ. As you can see there are a few issues.

    I used the About Us module to add these two pages. I have used this many times on the site I did for my wife and didn't have a problem. The only difference I can see is the editing of the information.php file vs the editing of the tpl_drop_menu.php file.

    The issues are...

    1) The name in the drop down menu says HEADER_TITLE_X instead of just X. Where did I go wrong?

    2) If you click on FAQ, the bars down the bottom vanish, yet with Privacy they don't??? Also a back button has appeared on the Privacy page which I don't want.


    Any help would be very much appreciated.

    Kind Regards,

    Brian
    1. You haven't uploaded all files into their correct spots. Check, double and triple check, (hint, you're missing a language file)

    2. Reload the original files for the FAQ, you must have made a change somewhere.

  8. #8
    Join Date
    Dec 2007
    Posts
    52
    Plugin Contributions
    0

    Default Re: CSS Dropdown menu for your header- With Categories!

    Quote Originally Posted by jettrue View Post
    1. You haven't uploaded all files into their correct spots. Check, double and triple check, (hint, you're missing a language file)

    2. Reload the original files for the FAQ, you must have made a change somewhere.
    Thanks for that. Still having issues with point 1 and I am certain that all the files are where they should be. I have gone through it many times! I found a way around it, but just want to know if it is a bad thing to do???

    In the tpl_drop_menu.php files, I changed the last bit of each line (after echo) to say what I wanted the menu to say. The code now looks like this:

    Code:
                    <li><a href="<?php echo zen_href_link(FILENAME_FAQ_PAGE); ?>"><?php echo FAQ; ?></a></li>
                    <li><a href="<?php echo zen_href_link(FILENAME_PRIVACY_PAGE); ?>"><?php echo PRIVACY; ?></a></li>
    It seems to work fine now. Should I leave it as is?

    Thanks!

    Brian

  9. #9
    Join Date
    Jul 2009
    Posts
    34
    Plugin Contributions
    0

    Default Re: CSS Dropdown menu for your header- With Categories!

    Hi! I'm using 1.3.8 and I did rename the "shop by brand" to "shop by author" but I do not have a dropdown list of my manufacturers. Yes, I have two listed, and one test product for each of them.

    How can I make the manufacturers show as a drop down?
    And is there a way for the "shop by author/brands" link to not be the home page, but a manufacturers page?

    Tested in both IE7 and Firefox.

    Thanks!

    url: http://www.jupitergardens.com/zenstore

  10. #10
    Join Date
    Jul 2009
    Posts
    34
    Plugin Contributions
    0

    Default Re: CSS Dropdown menu for your header- With Categories!

    Quote Originally Posted by jupitergardens View Post
    Hi! I'm using 1.3.8 and I did rename the "shop by brand" to "shop by author" but I do not have a dropdown list of my manufacturers. Yes, I have two listed, and one test product for each of them.

    How can I make the manufacturers show as a drop down?
    And is there a way for the "shop by author/brands" link to not be the home page, but a manufacturers page?

    Tested in both IE7 and Firefox.

    Thanks!

    url: http://www.jupitergardens.com/zenstore
    And I fixed it!!!!!!!!!!!!!!!

    I apparenly had to add the <ul class=" tag and then close them at the bottom, but I got it to work!!!!!!

    Here's my code for the manufacturers section. Hope it helps!

    Code:
    <li class="submenu"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); 
    
    ?>" style="padding-left:5px;"><?php echo "Shop By Author"; ?></a>              
                    <ul class="level2">
    <li><?
     $show_manufacturers= true;
    // for large lists of manufacturers uncomment this section
    /*
      if (($_GET['main_page']==FILENAME_DEFAULT and ($_GET['cPath'] == '' or 
    
    $_GET['cPath'] == 0)) or  ($request_type == 'SSL')) {
        $show_manufacturers= false;
      } else {
        $show_manufacturers= true;
      }
    */
    // Set to true to display manufacturers images in place of names
    define('DISPLAY_MANUFACTURERS_IMAGES',false);
    if ($show_manufacturers) {
    // only check products if requested - this may slow down the processing of the 
    
    manufacturers sidebox
      if (PRODUCTS_MANUFACTURERS_STATUS == '1') {
        $manufacturer_sidebox_query = "select distinct m.manufacturers_id, 
    
    m.manufacturers_name, m.manufacturers_image
                                from " . TABLE_MANUFACTURERS . " m
                                left join " . TABLE_PRODUCTS . " p on 
    
    m.manufacturers_id = p.manufacturers_id
                                where m.manufacturers_id = p.manufacturers_id and 
    
    p.products_status= 1
                                order by manufacturers_name";
      } else {
        $manufacturer_sidebox_query = "select m.manufacturers_id, 
    
    m.manufacturers_name, m.manufacturers_image
                                from " . TABLE_MANUFACTURERS . " m
                                order by manufacturers_name";
      }
      $manufacturer_sidebox = $db->Execute($manufacturer_sidebox_query);
      if ($manufacturer_sidebox->RecordCount()>0) {
        $number_of_rows = $manufacturer_sidebox->RecordCount()+1;
    // Display a list
        $manufacturer_sidebox_array = array();
    //  kuroi: commented out to avoid starting list with text scrolling list entries 
    
    such as "reset" and "please select"
    //    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);
    //    }
        while (!$manufacturer_sidebox->EOF) {
          $manufacturer_sidebox_name = 
    
    ((strlen($manufacturer_sidebox->fields['manufacturers_name']) > 
    
    MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? 
    
    substr($manufacturer_sidebox->fields['manufacturers_name'], 0, 
    
    MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : 
    
    $manufacturer_sidebox->fields['manufacturers_name']);
       $manufacturer_sidebox_image = 
    
    $manufacturer_sidebox->fields['manufacturers_image'];
          $manufacturer_sidebox_array[] =
      array('id' => $manufacturer_sidebox->fields['manufacturers_id'],
         'text' => DISPLAY_MANUFACTURERS_IMAGES ?
        zen_image(DIR_WS_IMAGES . $manufacturer_sidebox_image, 
    
    $manufacturer_sidebox_name) :
        $manufacturer_sidebox_name);
          $manufacturer_sidebox->MoveNext();
        }
          
      }
    } // $show_manufacturers
        for ($i=0;$i<sizeof($manufacturer_sidebox_array);$i++) {
          $content = '';
       $content .= '<li ><a class="hide" href="' . zen_href_link(FILENAME_DEFAULT, 
    
    'manufacturers_id=' . $manufacturer_sidebox_array[$i]['id']) . '">';
          $content .= $manufacturer_sidebox_array[$i]['text'];
          $content .= '</a></li>' . "\n";
          echo $content;
     }
      ?> 
                 
          </li></ul>

 

 

Similar Threads

  1. Categories dropdown menu/css
    By KenshiroU in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 5 Apr 2013, 01:04 PM
  2. HIde categories mod with css dropdown menu
    By adowty in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 9 Feb 2012, 01:05 AM
  3. How to use ezpages/categories as dropdown menu in the header?
    By mdivk in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 21 Dec 2011, 06:32 PM
  4. whats wrong with this css for my dropdown menu?
    By 1kell in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 28 May 2010, 02:47 AM
  5. Header Dropdown Menu (CSS) Without the Dropdown???
    By hcd888 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 27 May 2009, 01:20 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