Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2015
    Location
    Texas
    Posts
    12
    Plugin Contributions
    0

    Default Modifying Top Menu - Westminster New

    Hi!

    I am really not very familiar with php but have been able to figure out *most* things so far.

    On my site (http://thevegansexshop.co/shop/ --homepage is SFW, though there is a banner that reads "The Vegan S3x Shop"), I have the Westminster New template installed, and on the top menu bar I want to remove the "Categories" and "Contact" links and replace with an autopopulating list of my categories. I know how to remove "Categories" and "Contacts," BUT I don't understand php enough to figure out how to put my categories list there (especially automaticall). I would prefer to be able to have them auto fill (like how the drop down menu for Products autofills), BUT if that's not possible, I don't mind manually adding them and changing as necessary.

    Here is an image of what I have now:
    Screen shot 2015-03-27 at 2.35.24 AM.png
    (I removed my banner from the image so as not to offend anyone. This is completely SFW)

    Here is an example of what I want:
    Screen shot 2015-03-27 at 2.35.24EDITED AM.jpg
    (also SFW)

    I'm pretttttty sure the file I need to modify is includes/templates/override/templates/tpl_modules_mobile_categories_tabs.php (at least, that is what I used to remove a link that was in the menu by default and it worked...) Here is the code for that file:

    Code:
    <?php
    /**
     * Module Template - categories_tabs
     *
     * Template stub used to display categories-tabs output
     *
     * @package templateSystem
     * @copyright Copyright 2003-2005 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_modules_categories_tabs.php 3395 2006-04-08 21:13:00Z ajeh $
     */
    
    
    ?>
    
    
    
    <div id="menu">
    <ul class="slimmenu">
    
        <li class="test"><a href="<?php HTTP_SERVER . DIR_WS_CATALOG;?>" class="mshop"><?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>','<li>',$menulist);
    $menulist = str_replace("</li>\n</ul>\n</li>\n</ul>\n","</li>\n</ul>\n",$menulist);
    echo $menulist;
    ?>                        
    </li>
    
    
        <li><a href="<?php echo zen_href_link(FILENAME_CONTACT_US, '', 'NONSSL'); ?>" class="mcontact"><?php echo BOX_INFORMATION_CONTACT; ?></a></li>
    
    </ul>
    
    </div>
    
    <script src="<?php echo $template->get_template_dir('jquery.slimmenu.min.js',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/jquery.slimmenu.min.js' ?>" type="text/javascript"></script>
    <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js" type="text/javascript"></script> 
    
    	<?php if ($detect->isMobile() && !$detect->isTablet() or $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $_SESSION['display_mode']=='isMobile') { ?>
    
    <script type="text/javascript">
        $('ul.slimmenu').slimmenu(
    			      {
    			      resizeWidth: '800',
    				  collapserTitle: '',
    				  animSpeed: 'medium',
    				  easingEffect: null,
    				  indentChildren: false,
    				  childrenIndenter: '&nbsp;'
    				  });
    </script>
    
    <?php } else if ($detect->isTablet() or $detect->isMobile() && $_SESSION['display_mode']=='isTablet' or $detect->isTablet() && $_SESSION['display_mode']=='isTablet' or $_SESSION['display_mode']=='isTablet'){ ?>
    
    <script type="text/javascript">
        $('ul.slimmenu').slimmenu(
    			      {
    			      resizeWidth: '800',
    				  collapserTitle: '',
    				  animSpeed: 'medium',
    				  easingEffect: null,
    				  indentChildren: false,
    				  childrenIndenter: '&nbsp;'
    				  });
    </script>
    
    <?php } else if ($detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isDesktop' or $detect->isTablet() && $_SESSION['display_mode']=='isDesktop' or $_SESSION['display_mode']=='isNonResponsive'){ ?>
    
    <script type="text/javascript">
        $('ul.slimmenu').slimmenu(
    			      {
    			      resizeWidth: '0',
    				  collapserTitle: '',
    				  animSpeed: 'medium',
    				  easingEffect: null,
    				  indentChildren: false,
    				  childrenIndenter: '&nbsp;'
    				  });
    </script>
    
    <?php } else { ?>
    
    <script type="text/javascript">
        $('ul.slimmenu').slimmenu(
    			      {
    			      resizeWidth: '800',
    				  collapserTitle: '',
    				  animSpeed: 'medium',
    				  easingEffect: null,
    				  indentChildren: false,
    				  childrenIndenter: '&nbsp;'
    				  });
    </script>
    
      <?php } ?>
    Can someone help me? Even if you can offer an example code and let me know how to modify it or point me to a tutorial on something like this.

    Thanks in advance! :) I apologoize if the nature of the site offends anyone, but you know, there is a market segment out there...

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

    Default Re: Modifying Top Menu - Westminster New

    You might be best asking in the addon template section for this template

    http://www.zen-cart.com/showthread.p...ter-Responsive
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Mar 2015
    Location
    Texas
    Posts
    12
    Plugin Contributions
    0

    Default Re: Modifying Top Menu - Westminster New

    Thanks, I just posted there as well (that entire thread has been my bible the past week) but wanted to see if anyone here could help me too. Thank you! :)

  4. #4
    Join Date
    Jul 2009
    Location
    picaflor-azul.com
    Posts
    6,939
    Plugin Contributions
    45

    Default Re: Modifying Top Menu - Westminster New

    Quote Originally Posted by chelseaneedshelp View Post
    Thanks, I just posted there as well (that entire thread has been my bible the past week) but wanted to see if anyone here could help me too. Thank you! :)
    there is no need to post the same question 3 times

    Thanks,

    Anne
    Mobile Friendly Responsive Zen Cart Design
    Convert your zen cart easily with our Free Responsive Zen Cart Templates
    Check them out!

 

 

Similar Threads

  1. Westminster New
    By picaflor-azul in forum Addon Templates
    Replies: 1756
    Last Post: 20 Feb 2020, 05:35 PM
  2. Replies: 10
    Last Post: 11 Oct 2017, 08:09 PM
  3. Westminster New doesn't work on mobile phone
    By Pompidompie in forum Addon Templates
    Replies: 3
    Last Post: 26 Mar 2015, 10:34 PM
  4. v151 westminster new Share and Connect
    By Larry0652 in forum Addon Templates
    Replies: 8
    Last Post: 24 Oct 2014, 03:30 PM
  5. Easy way to edit header/top menu, footer menu, and sidebar menu?
    By templar2 in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 30 Jun 2009, 11:14 AM

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