Page 1 of 1
Removing a section php file?
Posted: Fri Sep 24, 2010 5:38 pm
by chrismaddox3d
Hi i am new to this site,
I have been working on my e commerce site,
Been trying to remove a redeem gift button and section,
I have the code pin pointed just can't fine it in the php files,
Hope someone can help,
Thanks,
Here is a link to my site
http://youniverseonline.com/
Here are 2 image examples showing what i wanna remove,

Re: Removing a section php file?
Posted: Fri Sep 24, 2010 10:43 pm
by buckit
The file you want to edit is /includes/templates/template_default/templates/tpl_gv_faq_default.php
remove the form at the bottom of that page (just comment it out). that should do it for you.
remember to copy the file to /includes/templates/YOUR_TEMPLATE/templates/ before you edit it. you need to be sure you use the zen cart override system as much as possible.
Re: Removing a section php file?
Posted: Fri Sep 24, 2010 11:57 pm
by chrismaddox3d
What is so strange is i went to the templates folder and i found no tpl_gv_faq_default.php unless i am over looking it,
Let me post a couple images showing all the files in the folder and another showing some items i circled in the code,
I see the Gift Certificate lettering i need to remove in the code looks to be a easy fix if i could find it in the php files,
The only faq file i found was here Public_html/include/languages/English gv_faq.php and that is the file i used to make my faq questions,

Re: Removing a section php file?
Posted: Sat Sep 25, 2010 9:16 am
by buckit
when you say "Let me post a couple images showing all the files in the folder" what is the full path to that folder? sound like you are going into the templates folder for your theme... that is wrong.
the file is in Public_html/include/templates/template_default/templates/
Re: Removing a section php file?
Posted: Sat Sep 25, 2010 10:32 am
by chrismaddox3d
Thanks you got me back on track again,
When you say comment it out, what area should i comment out?
Code: Select all
<form action="<?php echo zen_href_link(FILENAME_GV_REDEEM, '', 'NONSSL', false); ?>" method="get">
<?php echo zen_draw_hidden_field('main_page',FILENAME_GV_REDEEM) . zen_draw_hidden_field('goback','true') . zen_hide_session_id(); ?>
<fieldset>
<legend><?php echo TEXT_GV_REDEEM_INFO; ?></legend>
<label class="inputLabel" for="lookup-gv-redeem"><?php echo TEXT_GV_REDEEM_ID; ?></label>
<?php echo zen_draw_input_field('gv_no', $_GET['gv_no'], 'size="18" id="lookup-gv-redeem"');?>
</fieldset>
<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_REDEEM, BUTTON_REDEEM_ALT); ?></div>
</form>
</div>
Re: Removing a section php file?
Posted: Sat Sep 25, 2010 11:08 am
by buckit
HTML comment tags are used to add comments to you html code. You can add little notes or you can wrap actual code in comment tags so they arent processed.
see
http://www.w3schools.com/tags/tag_comment.asp
so you dont want your form to show... wrap the entire form with HTML comment tags
so in your case, you would do this:
Code: Select all
<!-- <form action="<?php echo zen_href_link(FILENAME_GV_REDEEM, '', 'NONSSL', false); ?>" method="get">
<?php echo zen_draw_hidden_field('main_page',FILENAME_GV_REDEEM) . zen_draw_hidden_field('goback','true') . zen_hide_session_id(); ?>
<fieldset>
<legend><?php echo TEXT_GV_REDEEM_INFO; ?></legend>
<label class="inputLabel" for="lookup-gv-redeem"><?php echo TEXT_GV_REDEEM_ID; ?></label>
<?php echo zen_draw_input_field('gv_no', $_GET['gv_no'], 'size="18" id="lookup-gv-redeem"');?>
</fieldset>
<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_REDEEM, BUTTON_REDEEM_ALT); ?></div>
</form> -->
Re: Removing a section php file?
Posted: Sat Sep 25, 2010 11:30 am
by chrismaddox3d
Thanks for all the help buckit,
I will use comment out for all things i don't want on my page now,
Re: Removing a section php file?
Posted: Sat Sep 25, 2010 1:33 pm
by buckit
glad you were able to get it going!
the other option is to just delete what you dont want... I personally suggest commenting it out so if you ever want it back for some reason, you dont have to try recovering it... just remove the comment and you're all set.