All you need to do is create an ez-page link and include it in your menu and it works perfectly. I use one or two in our menus
All you need to do is create an ez-page link and include it in your menu and it works perfectly. I use one or two in our menus
Hi There,
I've come up with a solution for this... its a bit of a work around, but is working well. You can see it in action at http://www.zencart137.jadetrue.com.
I'm not sure whether to release this as part of the module for everyone and update it, OR to just offer the files for this add on separately. I know its going to cause me problems for people who don't want this, LOL.
I've set this up so that any ezpages added show up BELOW the regular information pages (shipping, privacy, conditions of use, etc.). This can of course be manually changed for people who may want to have the ezpages first, or who may want to remove some of the regular information links.
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
and then of course there is a change to:
includes/templates/YOUR_TEMPLATE/common/tpl_drop_menu.php
I'm going to attach the two new files mentioned above in a zip file, for those that want this functionality now. I think I will eventually add this to the download, just need to test this out with people that want it now, so I know better what I need to add to the instructions.
STEP 1.
Upload the files included in the zip file to these locations:
includes/modules/sideboxes/YOUR_TEMPLATE/ezpages_drop_menu.php
includes/templates/YOUR_TEMPLATE/tpl_ezpages_drop_menu.php
Step 2.
Add this code to includes/templates/YOUR_TEMPLATE/tpl_drop_menu.php:
<?php require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/' . 'ezpages_drop_menu.php'); ?>
I personally added the above code right after the last item in the "INFORMATION" drop down, so I put it right after:
<li><a href="<?php echo zen_href_link(FILENAME_UNSUBSCRIBE, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_UNSUBSCRIBE; ?></a></li>
<?php } ?>
You can add it anywhere in the INFORMATION box, or basically anywhere inside of a current drop down, but I did not design this mod to be its OWN main drop down.
Step 3.
Then you have to go to your admin, and go to "Tools", "Layout Boxes controller". There should be a new sidebox, if you'd uploaded things correctly. You must turn the SINGLE COLUMN STATUS TO ON, leave the LEFT/RIGHT COLUMN STATUS off.
Step 4.
Under "Tools", "EZPages", make sure the ezpages are set to ON for the header. The sort orders also have to be greater than "0". 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).
I think that's it.![]()
So now you can have any number of EZPages setups. You can have the regular EZPages horizontal header bar on, or have the regular EZpages sidebox on, or you can have them in your css drop down menu, OR any combination of the three.
Regards to installing EZ-pages into the drop down menu:
I'm a bit lost with STEP 2:
I think you meant:Step 2.
Add this code to includes/templates/YOUR_TEMPLATE/tpl_drop_menu.php
includes/templates/YOUR_TEMPLATE/common/tpl_drop_menu.php:
My default tpl_drop_menu.php looks like:
Following the example provided in your step 3 instructions I'm still uncertain where to insert: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>
You suggested to place after:Code:<?php require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/' . 'ezpages_drop_menu.php'); ?>
But I don't see that.Code:<?php } ?>
Maybe you can provide example file for the helpess?
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?
WoodyCode:<!--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-->
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:
Then you can insert: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 } ?>
Right after that.Code:<?php require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/' . 'ezpages_drop_menu.php'); ?>
If I understand what you're asking, I addressed that in step 4 already:
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).
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!
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.
Ahh...I did miss that one... as I was unable to proceed past step 2 ;-)
Thanks again.
Woody