Zen Cart Logo
Forums / Addon Templates / Help with some PHP editing a new template (Picaflor)

Help with some PHP editing a new template (Picaflor)

Views: 7,260

Results 21 to 40 of 85
12 Apr 2013, 9:08 AM
#21
johnnyscience avatar

johnnyscience

Zen Follower

Join Date:
Jan 2013
Posts:
104
Plugin Contributions:
0

Help with some PHP editing a new template (Picaflor)

Ok so should I upload a clean copy of the tpl.mega_menu.php?

I mean what I edited I'm pretty sure I did correctly as nothing broke on the website & it took away the tabs properly?

12 Apr 2013, 9:11 AM
#22
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Help with some PHP editing a new template (Picaflor)

SO...

Best way forward is to RESTORE the original files that you edited (as KOBRA advises) and to then make the changes as we suggest, using COMMENTED sections etc...

12 Apr 2013, 9:14 AM
#23
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Help with some PHP editing a new template (Picaflor)

JohnnyScience:

Ok so should I upload a clean copy of the tpl.mega_menu.php?

I mean what I edited I'm pretty sure I did correctly as nothing broke on the website & it took away the tabs properly?

Well... you may be comfortable with this and there is no RULE that says you can't DELETE code.

I find that by leaving the core code in the files (and using comments), if there are problems then all I have to do is "un-comment" the affected lines to restore core behaviour. Then I can try whatever I was doing again, with corrections.

Secondly, I often find OTHER uses for functions (such as the Mega Menu header) and by leaving core code in place, I can "adapt" it later to suit some new idea I may have.

12 Apr 2013, 9:25 AM
#24
johnnyscience avatar

johnnyscience

Zen Follower

Join Date:
Jan 2013
Posts:
104
Plugin Contributions:
0

Re: Help with some PHP editing a new template (Picaflor)

Yeah I understand what you're saying.

I've restored everything I think but there still seems to be a file that I edited/deleted and I can't remember which ones, it was whatever one has the actual Li name brackets.

I will try editing the code as you suggested to get the changes I need done.

Thanks.

12 Apr 2013, 10:13 AM
#25
johnnyscience avatar

johnnyscience

Zen Follower

Join Date:
Jan 2013
Posts:
104
Plugin Contributions:
0

Re: Help with some PHP editing a new template (Picaflor)

So when I'm trying to edit the tpl_mega_menu.php with the /**/ it's not blocking the code out for some reason?

/*       <li class="quicklinks-li"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>" class="drop"><?php echo HEADER_TITLE_QUICK_LINKS; ?></a><!-- bof quick links  -->
             <div class="dropdown_1column">
                <div class="col_1 firstcolumn">
                   <ul class="levels">
                       <li><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>"><?php echo HEADER_TITLE_CATALOG; ?></a></li>
                       <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_FEATURED_PRODUCTS); ?>"><?php echo TABLE_HEADING_FEATURED_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>   
                </div>
               </div>
        </li><!-- eof quick links --> */
12 Apr 2013, 10:35 AM
#26
johnnyscience avatar

johnnyscience

Zen Follower

Join Date:
Jan 2013
Posts:
104
Plugin Contributions:
0

Re: Help with some PHP editing a new template (Picaflor)

Nevermind I got it to work, need to use <!-- --> on that part not /**/

12 Apr 2013, 7:53 PM
#27
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Help with some PHP editing a new template (Picaflor)

JohnnyScience:

Nevermind I got it to work, need to use <!-- --> on that part not /**/

Yes... I was going to say... that's HTML.

In a LOT of PHP files, you will see HTML as well. Particularly TEMPLATE files.

In SOME instances that HTML needs to be commented using <!-- xxxxxxxxxxxxxx -->

14 Apr 2013, 5:23 AM
#28
johnnyscience avatar

johnnyscience

Zen Follower

Join Date:
Jan 2013
Posts:
104
Plugin Contributions:
0

Re: Help with some PHP editing a new template (Picaflor)

So there is a hovermenu over the "Info" tab & there are some things I'd like to edit out, even completely disable one of the two columns & maybe just combine one of the links from the left & put it in the single list.

Say I want to ghost out the entire General Info column, where/what would I put to do so?

Here is the code that I can't seem to ghost out:

          <li class="information-li"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>" class="drop"><?php echo HEADER_TITLE_INFORMATION; ?></a><!-- bof information -->
 
	    <div class="dropdown_info">
        
		<div class="col_1">
            	    <h3><?php echo TITLE_GENERAL; ?></h3>
                    <ul>
			<li><a href="<?php echo zen_href_link(FILENAME_ABOUT_US); ?>"><?php echo BOX_INFORMATION_ABOUT_US; ?></a></li>
                	<?php if (DEFINE_SITE_MAP_STATUS <= 1) { ?>
                	<li><a href="<?php echo zen_href_link(FILENAME_SITE_MAP); ?>"><?php echo BOX_INFORMATION_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 BOX_INFORMATION_GV; ?></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 BOX_INFORMATION_DISCOUNT_COUPONS; ?></a></li>
                	<?php } ?>
               		<?php if (SHOW_NEWSLETTER_UNSUBSCRIBE_LINK == 'true') { ?>
                	<li><a href="<?php echo zen_href_link(FILENAME_UNSUBSCRIBE, '', 'NONSSL'); ?>"><?php echo BOX_INFORMATION_UNSUBSCRIBE; ?></a></li>
                	<?php } ?>
                     </ul>   
                 </div>
    
		<div class="col_1">
                     <h3><?php echo TITLE_CUSTOMERS; ?></h3>
                     <ul>
			<?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 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 } ?>
                    	<li><a href="<?php echo zen_href_link(FILENAME_CONTACT_US, '', 'NONSSL'); ?>"><?php echo BOX_INFORMATION_CONTACT; ?></a></li>
                        <?php if (DEFINE_SHIPPINGINFO_STATUS <= 1) { ?>
                	<li><a href="<?php echo zen_href_link(FILENAME_SHIPPING); ?>"><?php echo BOX_INFORMATION_SHIPPING; ?></a></li>
                        <?php } ?>
                        <?php if (DEFINE_PRIVACY_STATUS <= 1)  { ?>
                	<li><a href="<?php echo zen_href_link(FILENAME_PRIVACY); ?>"><?php echo BOX_INFORMATION_PRIVACY; ?></a></li>
                        <?php } ?>
                        <?php if (DEFINE_CONDITIONS_STATUS <= 1) { ?>
                	<li><a href="<?php echo zen_href_link(FILENAME_CONDITIONS); ?>"><?php echo BOX_INFORMATION_CONDITIONS; ?></a></li>
                        <?php } ?>
                     </ul>   
                 </div>
14 Apr 2013, 5:35 AM
#29
johnnyscience avatar

johnnyscience

Zen Follower

Join Date:
Jan 2013
Posts:
104
Plugin Contributions:
0

Re: Help with some PHP editing a new template (Picaflor)

Actually I was able to force it to a single column by changing the width of the .mega-menu .dropdown_info

But I'd still like to be able to ghost out or move a few things. Every time I try to copy & paste the exact link & paste it in a different order, it doesn't seem to show up?

14 Apr 2013, 6:17 AM
#30
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Help with some PHP editing a new template (Picaflor)

JohnnyScience:

Actually I was able to force it to a single column by changing the width of the .mega-menu .dropdown_info

But I'd still like to be able to ghost out or move a few things. Every time I try to copy & paste the exact link & paste it in a different order, it doesn't seem to show up?

What program are you using to make edits to code files?

14 Apr 2013, 6:25 AM
#31
johnnyscience avatar

johnnyscience

Zen Follower

Join Date:
Jan 2013
Posts:
104
Plugin Contributions:
0

Re: Help with some PHP editing a new template (Picaflor)

Dreamweaver with the local file on my desktop that I then upload to the server once I make the correct edits.

14 Apr 2013, 3:07 PM
#32
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Help with some PHP editing a new template (Picaflor)

Questions about the mega menu really would best go in that mod's support thread, where Anne gives great support.
http://www.zen-cart.com/showthread.php?202140-Pure-CSS-Mega-Menu

14 Apr 2013, 4:31 PM
#33
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Help with some PHP editing a new template (Picaflor)

JohnnyScience:

Dreamweaver with the local file on my desktop that I then upload to the server once I make the correct edits.

Not really a good idea unless you have a good deal of competence working with DW for PHP files.

Generally, it is better to put DW back in its box, send it back to Adobe, and ask for a small refund.

PHP files are best edited using proper plain-text editors.

15 Apr 2013, 11:02 AM
#34
johnnyscience avatar

johnnyscience

Zen Follower

Join Date:
Jan 2013
Posts:
104
Plugin Contributions:
0

Re: Help with some PHP editing a new template (Picaflor)

I only use the code function of it. I've been using it for a few years now with no issues & enjoy it.

Any luck on getting the code in red to ghost out so it won't show on the drop down menu?

what/where do I add <!-- --> or /**/

I tried both in multiple areas/configurations & I couldn't get any of the code to ghost out.

<li class="information-li"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>" class="drop"><?php echo HEADER_TITLE_INFORMATION; ?></a><!-- bof information -->
 
	    <div class="dropdown_info">
        
		<div class="col_1">
            	    <h3><?php echo TITLE_GENERAL; ?></h3>
                    <ul>
			<li><a href="<?php echo zen_href_link(FILENAME_ABOUT_US); ?>"><?php echo BOX_INFORMATION_ABOUT_US; ?></a></li>
                	<?php if (DEFINE_SITE_MAP_STATUS <= 1) { ?>
                	<li><a href="<?php echo zen_href_link(FILENAME_SITE_MAP); ?>"><?php echo BOX_INFORMATION_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 BOX_INFORMATION_GV; ?></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 BOX_INFORMATION_DISCOUNT_COUPONS; ?></a></li>
                	<?php } ?>
               		<?php if (SHOW_NEWSLETTER_UNSUBSCRIBE_LINK == 'true') { ?>
                	<li><a href="<?php echo zen_href_link(FILENAME_UNSUBSCRIBE, '', 'NONSSL'); ?>"><?php echo BOX_INFORMATION_UNSUBSCRIBE; ?></a></li>
                	<?php } ?>
                     </ul>   
                 </div>
    
		<div class="col_1">
                     <h3><?php echo TITLE_CUSTOMERS; ?></h3>
                     <ul>
			<?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 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 } ?>
                    	<li><a href="<?php echo zen_href_link(FILENAME_CONTACT_US, '', 'NONSSL'); ?>"><?php echo BOX_INFORMATION_CONTACT; ?></a></li>
                        <?php if (DEFINE_SHIPPINGINFO_STATUS <= 1) { ?>
                	<li><a href="<?php echo zen_href_link(FILENAME_SHIPPING); ?>"><?php echo BOX_INFORMATION_SHIPPING; ?></a></li>
                        <?php } ?>
                        <?php if (DEFINE_PRIVACY_STATUS <= 1)  { ?>
                	<li><a href="<?php echo zen_href_link(FILENAME_PRIVACY); ?>"><?php echo BOX_INFORMATION_PRIVACY; ?></a></li>
                        <?php } ?>
                        <?php if (DEFINE_CONDITIONS_STATUS <= 1) { ?>
                	<li><a href="<?php echo zen_href_link(FILENAME_CONDITIONS); ?>"><?php echo BOX_INFORMATION_CONDITIONS; ?></a></li>
                        <?php } ?>
                     </ul>   
                 </div>
16 Apr 2013, 12:32 AM
#35
johnnyscience avatar

johnnyscience

Zen Follower

Join Date:
Jan 2013
Posts:
104
Plugin Contributions:
0

Re: Help with some PHP editing a new template (Picaflor)

I'm still stuck on the hover menu

But also I'm trying to figure out how to remove some links in the footer pop up menu. I was able to disable a few of them through EZ Pages, but for some reason not all of the footer links were listed in EZ Pages?

What other way/place can I remove certain footer pop up menu links?

Thanks.

16 Apr 2013, 12:35 AM
#36
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Help with some PHP editing a new template (Picaflor)

Use the developers tool kit in the admin and search for the files that contain the text

16 Apr 2013, 3:55 AM
#37
johnnyscience avatar

johnnyscience

Zen Follower

Join Date:
Jan 2013
Posts:
104
Plugin Contributions:
0

Re: Help with some PHP editing a new template (Picaflor)

kobra:

Use the developers tool kit in the admin and search for the files that contain the text

I was FINALLY able to get the top menu customized how I wanted.

Now I just need to finish the footer, I was able to disable a few of the links in the pop up footer by EZ Pages, but for some reason they all aren't listed under EZ Pages?

I'll try through the Developers Tool Kit, but I've already ran a couple of searches & didn't come up with anything.

There has to be an easier way to edit the foot links?

What the heck is EZ Pages anyways?

16 Apr 2013, 4:14 AM
#38
johnnyscience avatar

johnnyscience

Zen Follower

Join Date:
Jan 2013
Posts:
104
Plugin Contributions:
0

Re: Help with some PHP editing a new template (Picaflor)

So I'm confused on the Footer now & editing the footer_menu_defines.php file:

I was able to d a couple links in EZ Pages to shut off, but can not seem to find the others in the Admin panel, so I assume just editing the code would be a lot easier.

I've tried commenting out things & it turns orange in DW which usually means the code is correct and the entire section turns this color (which it does)

But when I upload the file, there aren't any changes? I've highlighted in orange what I'm trying to comment out:

NOTE** This is the original file - NOT my edits.

<?php
/**
 * Footer Menu Definitions
 *
 * @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 V3.0
 * @version $Id: footer_menu_deines.php 1.0 5/9/2009 Clyde Jones $
 */

/*BOF Menu Column 1 link Definitions*/
Define('TITLE_ONE', '<li class="menuTitle">Contact Information</li>');
Define('EMAIL', '<li class="footer-email"><a href="' . zen_href_link(FILENAME_CONTACT_US) . '">Email Us</a></li>');
/*EOF Menu Column 1 link Definitions*/

/*OF Menu Column 2 link Definitions*/
Define('TITLE_TWO', '<li class="menuTitle">Information</li>');
Define('ABOUT', '<li><a href="' . zen_href_link(FILENAME_ABOUT_US) . '">' . BOX_INFORMATION_ABOUT_US . '</a></li>');
Define('SITEMAP', '<li><a href="' . zen_href_link(FILENAME_SITE_MAP) . '">' . BOX_INFORMATION_SITE_MAP . '</a></li>');
Define('GVFAQ', '<li><a href="' . zen_href_link(FILENAME_GV_FAQ) . '">' . BOX_INFORMATION_GV . '</a></li>');
Define('COUPON', '<li><a href="' . zen_href_link(FILENAME_DISCOUNT_COUPON) . '">' .  BOX_INFORMATION_DISCOUNT_COUPONS . '</a></li>');
Define('UNSUBSCRIBE', '<li><a href="' . zen_href_link(FILENAME_UNSUBSCRIBE) . '">' . BOX_INFORMATION_UNSUBSCRIBE . '</a></li>');
/*EOF Menu Column 2 link Definitions*/

/*BOF Menu Column 3 link Definitions*/
Define('TITLE_THREE', '<li class="menuTitle">Customer Support</li>');
Define('CONTACT','<li><a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a></li>');
Define('SHIPPING', '<li><a href="' . zen_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a></li>');
Define('PRIVACY', '<li><a href="' . zen_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a></li>');
Define('CONDITIONS','<li><a href="' . zen_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a></li>');
Define('ACCOUNT', '<li><a href="' . zen_href_link(FILENAME_ACCOUNT, '', 'SSL') .'">' . HEADER_TITLE_MY_ACCOUNT . '</a></li>');
/*EOF Menu Column 3 link Definitions*/

/*BOF Menu Column 4 link Definitions*/
Define('TITLE_FOUR', '<li class="menuTitle">Useful Links</li>');
The actual links are determined by "footer links" set in EZ-Pages
/*EOF Menu Column 4 link Definitions*/

/*bof bottom footer definitions*/
Define('FACEBOOK_ICON', 'facebook.png');
Define('TWITTER_ICON', 'twitter.png');
Define('YOUTUBE_ICON', 'youtube.png');
Define('PINTEREST_ICON', 'pinterest.png');
Define('GOOGLE_ICON', 'google.png');
Define('BLOG_ICON', 'blog.png');

/*bof bottom footer text definitions*/
Define('FACEBOOK_TEXT', 'Become a Fan');
Define('TWITTER_TEXT', 'Follow Us');
Define('YOUTUBE_TEXT', 'Subscribe');
Define('PINTEREST_TEXT', 'Pin with Us');
Define('GOOGLE_TEXT', 'Recommend Us');
Define('BLOG_TEXT', 'Our Blog');

/*bof bottom footer urls*/
Define('FACEBOOK','http://www.facebook.com/Custom.Zen.Cart.Design');
Define('TWITTER', 'http://www.twitter.com/picaflorazul');
Define('YOUTUBE', 'http://www.youtube.com/user/ZenCartEasyHelp');
Define('PINTEREST', 'http://www.pinterest.com/picaflorazul');
Define('GOOGLE', 'https://plus.google.com/113609090217058276980/posts');
Define('BLOG', 'http://www.picaflor-azul.com/blog');

/*BOF Footer Menu Definitions*/
Define('QUICKLINKS', '<dd class="first">
<ul>' . TITLE_ONE . EMAIL . '</ul></dd>');
Define('INFORMATION', '<dd class="second">
<ul>' . TITLE_TWO . ABOUT . SITEMAP . GVFAQ . COUPON . UNSUBSCRIBE . '</ul></dd>');
Define('CUSTOMER_SERVICE', '<dd class="third">
<ul>' . TITLE_THREE . CONTACT . SHIPPING . PRIVACY . CONDITIONS . ACCOUNT . '</ul></dd>');
Define('IMPORTANT', '<dd><ul>' . TITLE_FOUR);
Define('IMPORTANT_END', '</ul></dd>');
/*EOF Footer Menu Definitions*/

 

//EOF
16 Apr 2013, 4:15 AM
#39
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Help with some PHP editing a new template (Picaflor)

I do not even see a footer??
OH....I see the "expand" and then see the footer...

16 Apr 2013, 4:25 AM
#40
johnnyscience avatar

johnnyscience

Zen Follower

Join Date:
Jan 2013
Posts:
104
Plugin Contributions:
0

Re: Help with some PHP editing a new template (Picaflor)

Yeah I was kind of thinking of doing away with that expanded footer thing and just put a few links in the footer itself... would that be a lot harder to do?