Quote Originally Posted by chelseaneedshelp View Post
Hi! I loooooove this template and this thread and the add-ons one have basically been like my bible the past week while I modify my site! But I haven't found anything on what I need...

For starters, I am really not very familiar with php (I'll be honest, not well-versed in anything more advanced than html) 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 automatically). 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:
Attachment 15092
(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:
Attachment 15093
(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: ' '
				  });
</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: ' '
				  });
</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: ' '
				  });
</script>

<?php } else { ?>

<script type="text/javascript">
    $('ul.slimmenu').slimmenu(
			      {
			      resizeWidth: '800',
				  collapserTitle: '',
				  animSpeed: 'medium',
				  easingEffect: null,
				  indentChildren: false,
				  childrenIndenter: ' '
				  });
</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...

Out of the box the template pulls all of the categories/ sub categories dynamically and displays them in the drop down menu.

Thanks,

Anne