Re: CSS Dropdown menu for your header- With Categories!
Quote:
Originally Posted by
disciple
Hi,
Is it possible to place the new products, all products, etc. under the categories menu dropdown rather than the home dropdown?
I would also like to take out one of the categories, a document category, from that categories dropdown as well. I have already placed that category in another dropdown menu section but can't seem to figure out how to keep it from showing in the categories dropdown.
Thanks in advance for your help and such a great contribution.
Rick
I tried putting the new products, etc. under the categories when I was working on this add on, and had a heck of a time. Unfortunately, its beyond my capabilities at this time.
As for excluding a category, one way to do this is prevent a certain category from being included in the database query.
Open up includes/classes/categories_ul_generator.
Find this line:
Code:
where c.categories_id = cd.categories_id
then directly after it add:
Code:
and c.categories_id !=15
replace 15 with the cPath number of the category you want to hide. (to find the number, click on the document category link, and look in the url for the cPath= section. Use that number. Unfortunately its a manual thing, but it works!
Re: CSS Dropdown menu for your header- With Categories!
Quote:
Originally Posted by
jettrue
There are two files that need to be added:
includes/modules/sideboxes/YOUR_TEMPLATE/ezpages_drop_menu.php
includes/templates/YOUR_TEMPLATE/tpl_ezpages_drop_menu.php
The last path should be:
includes/templates/YOUR_TEMPLATE/templates/tpl_ezpages_drop_menu.php :wink2:
Installing right now. Just wanted to post that tidbit before I forgot. Will report back how it goes. And thanks for doing this!
Woody
Re: CSS Dropdown menu for your header- With Categories!
Regards to installing EZ-pages into the drop down menu:
I'm a bit lost with STEP 2:
Quote:
Step 2.
Add this code to includes/templates/YOUR_TEMPLATE/tpl_drop_menu.php
I think you meant:
includes/templates/YOUR_TEMPLATE/common/tpl_drop_menu.php:
My default tpl_drop_menu.php looks like:
Code:
<li><a href="<?php echo zen_href_link(FILENAME_UNSUBSCRIBE, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_UNSUBSCRIBE; ?></a></li>
</ul>
</li>
<li class="submenu"><a href="<?php echo zen_href_link(FILENAME_CONTACT_US, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CONTACT_US; ?></a></li>
Following the example provided in your step 3 instructions I'm still uncertain where to insert:
Code:
<?php require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/' . 'ezpages_drop_menu.php'); ?>
You suggested to place after:
But I don't see that.
Maybe you can provide example file for the helpess? :wink2:
Question: If ez-pages are enabled for drop-down header then they also appear above the drop down menu. Is there an option available to allow display ez-page links in the drop downs but at same time disable ez-page links display above drop downs? Or do I have to remove the following ez-pages display code segment in common/tpl_header.php?
Code:
<!--bof-header ezpage links-->
<?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
<?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
<?php } ?>
<!--eof-header ezpage links-->
Woody
Re: CSS Dropdown menu for your header- With Categories!
Quote:
Originally Posted by
Woodymon
Regards to installing EZ-pages into the drop down menu:
I'm a bit lost with STEP 2:
I think you meant:
includes/templates/YOUR_TEMPLATE/common/tpl_drop_menu.php:
My default tpl_drop_menu.php looks like:
Code:
<li><a href="<?php echo zen_href_link(FILENAME_UNSUBSCRIBE, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_UNSUBSCRIBE; ?></a></li>
</ul>
</li>
<li class="submenu"><a href="<?php echo zen_href_link(FILENAME_CONTACT_US, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CONTACT_US; ?></a></li>
Following the example provided in your step 3 instructions I'm still uncertain where to insert:
Code:
<?php require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/' . 'ezpages_drop_menu.php'); ?>
You suggested to place after:
But I don't see that.
Maybe you can provide example file for the helpess? :wink2:
Yes, I updated tpl_drop_menu.php earlier in this thread, so that the unsubscribe link turns off if you have it turned off in the admin. SO you can change your unsubscribe section to this:
Code:
<?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 } ?>
Then you can insert:
Code:
<?php require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/' . 'ezpages_drop_menu.php'); ?>
Right after that.
Quote:
Originally Posted by
Woodymon
Question: If ez-pages are enabled for drop-down header then they also appear above the drop down menu. Is there an option available to allow display ez-page links in the drop downs but at same time disable ez-page links display above drop downs? Or do I have to remove the following ez-pages display code segment in common/tpl_header.php?
Code:
<!--bof-header ezpage links-->
<?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
<?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
<?php } ?>
<!--eof-header ezpage links-->
Woody
If I understand what you're asking, I addressed that in step 4 already:
Quote:
If you want to have the regular zen cart horizontal header bar off, go to "Configuration", "EZPages Settings", and turn the header bar display status to off (0).
Re: CSS Dropdown menu for your header- With Categories!
For those who are adding the ezpages functionality to this mod, I made errors in the file locations. They should be:
includes/modules/sideboxes/YOUR_TEMPLATE/ezpages_drop_menu.php
includes/templates/YOUR_TEMPLATE/templates/tpl_ezpages_drop_menu.php
and you have to make changes to:
includes/templates/YOUR_TEMPLATE/common/tpl_drop_menu.php
I wish I could edit old posts!
Re: CSS Dropdown menu for your header- With Categories!
wow nice!
gonna install the ez-pages addon right now.
Thanks this will be very helpful!
Re: CSS Dropdown menu for your header- With Categories!
Quote:
Originally Posted by
jettrue
Yes, I updated tpl_drop_menu.php earlier in this thread,
Thanks. I read the complete thread before posting and again read just now. I still don't see where that code change was suggested. More coffee please.
Quote:
Originally Posted by
jettrue
If I understand what you're asking, I addressed that in step 4 already:
Ahh...I did miss that one... as I was unable to proceed past step 2 ;-)
Thanks again.
Woody
Re: CSS Dropdown menu for your header- With Categories!
Quote:
Originally Posted by
jettrue
Yes, I updated tpl_drop_menu.php earlier in this thread, so that the unsubscribe link turns off if you have it turned off in the admin. SO you can change your unsubscribe section to this:
Code:
<?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 } ?>
Then you can insert:
Code:
<?php require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/' . 'ezpages_drop_menu.php'); ?>
Right after that.
Jade-
Would you be kind enough to offer a complete sample file. I've tried to follow your edit instructions but just not working out. Thanks.
Woody
Re: CSS Dropdown menu for your header- With Categories!
Below is what I've tried, but the menu (and the rest of the page) stops rendering after "Discount Coupons" link.
Code:
<ul class="level2">
<li><a href="<?php echo zen_href_link(FILENAME_SHIPPING); ?>"><?php echo HEADER_TITLE_SHIPPING_INFO; ?></a></li>
<li><a href="<?php echo zen_href_link(FILENAME_PRIVACY); ?>"><?php echo HEADER_TITLE_PRIVACY_POLICY; ?></a></li>
<li><a href="<?php echo zen_href_link(FILENAME_CONDITIONS); ?>"><?php echo HEADER_TITLE_CONDITIONS_OF_USE; ?></a></li>
<li><a href="<?php echo zen_href_link(FILENAME_ABOUT_US); ?>"><?php echo HEADER_TITLE_ABOUT_US; ?></a></li>
<?php if (defined('FILENAME_SITE_MAP')) { ?>
<li><a href="<?php echo zen_href_link(FILENAME_SITE_MAP); ?>"><?php echo HEADER_TITLE_SITE_MAP; ?></a></li>
<?php } ?>
<li><a href="<?php echo zen_href_link(FILENAME_GV_FAQ, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_GV_FAQ; ?></a></li>
<li><a href="<?php echo zen_href_link(FILENAME_DISCOUNT_COUPON, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_DISCOUNT_COUPON; ?></a></li>
<?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>
What's wrong with this picture?
Woody
Re: CSS Dropdown menu for your header- With Categories!
Quote:
Originally Posted by
Woodymon
Below is what I've tried, but the menu (and the rest of the page) stops rendering after "Discount Coupons" link.
Code:
<ul class="level2">
<li><a href="<?php echo zen_href_link(FILENAME_SHIPPING); ?>"><?php echo HEADER_TITLE_SHIPPING_INFO; ?></a></li>
<li><a href="<?php echo zen_href_link(FILENAME_PRIVACY); ?>"><?php echo HEADER_TITLE_PRIVACY_POLICY; ?></a></li>
<li><a href="<?php echo zen_href_link(FILENAME_CONDITIONS); ?>"><?php echo HEADER_TITLE_CONDITIONS_OF_USE; ?></a></li>
<li><a href="<?php echo zen_href_link(FILENAME_ABOUT_US); ?>"><?php echo HEADER_TITLE_ABOUT_US; ?></a></li>
<?php if (defined('FILENAME_SITE_MAP')) { ?>
<li><a href="<?php echo zen_href_link(FILENAME_SITE_MAP); ?>"><?php echo HEADER_TITLE_SITE_MAP; ?></a></li>
<?php } ?>
<li><a href="<?php echo zen_href_link(FILENAME_GV_FAQ, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_GV_FAQ; ?></a></li>
<li><a href="<?php echo zen_href_link(FILENAME_DISCOUNT_COUPON, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_DISCOUNT_COUPON; ?></a></li>
<?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>
What's wrong with this picture?
Woody
Hmm, what version of zen cart are you using?
Here is the Information section:
Code:
<li class="submenu"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>"><?php echo HEADER_TITLE_INFORMATION; ?></a>
<ul class="level2">
<li><a href="<?php echo zen_href_link(FILENAME_SHIPPING); ?>"><?php echo HEADER_TITLE_SHIPPING_INFO; ?></a></li>
<li><a href="<?php echo zen_href_link(FILENAME_PRIVACY); ?>"><?php echo HEADER_TITLE_PRIVACY_POLICY; ?></a></li>
<li><a href="<?php echo zen_href_link(FILENAME_CONDITIONS); ?>"><?php echo HEADER_TITLE_CONDITIONS_OF_USE; ?></a></li>
<li><a href="<?php echo zen_href_link(FILENAME_ABOUT_US); ?>"><?php echo HEADER_TITLE_ABOUT_US; ?></a></li>
<?php if (defined('FILENAME_SITE_MAP')) { ?>
<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 } ?>
<li><a href="<?php echo zen_href_link(FILENAME_DISCOUNT_COUPON, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_DISCOUNT_COUPON; ?></a></li>
<?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>
Though I don't see anything wrong with your code.