Jump to content
Sign in to follow this  
Farrukh

[Contribution] Header Tags Controller for Admin MS 2.2

Recommended Posts

Hi jack i've been playing since my last post and have found out that its this bit of code that is throwing the item page out if I add it the left side box drops to the center of the page

 

 

     <tr>
      <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
      <td class="smallText" align="center"><?php echo TEXT_VIEWING; ?> 
      <?php echo '<a title="' . $tags_array['title'] . '" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_info['products_id'], 'NONSSL') . '"/# ' . $tags_array['title'] . '">' . $tags_array['title']; ?></a></td>
     </tr>

 

Any idea why ? and what I can do differently to fix the error

Thanks in advance :)

Share this post


Link to post
Share on other sites

That would be because it is either installed into the wrong location or your file has been altered (probably by a template) that won't allow it to work where it is. That code can be stuck pretty much anywhere on the page. If you can't get it to work, you can remove it. But if you do that, be sure to remove the line that was added under the <body> line.

 

Jack

Share this post


Link to post
Share on other sites

Hi Jack. Should I upload catalog/includes/boxes/header_tags.php? The instructions don't mention anything about it, so I didn't. Could this be my problem?

 

Thanks a lot Jack!

 

Jason

Share this post


Link to post
Share on other sites

You know what, I just wanted to really thank you Jack_mcs for answering my, and others, questions! I really appreciate it!

 

Regarding my product_info page: I noticed the last instruction on install_catalog.TXT says to:

 

FIND: (around line 235)

 

</table></form></td>

<!-- body_text_eof //-->

 

 

ADD ABOVE it:

 

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td class="smallText" align="center"><?php echo TEXT_VIEWING; ?> 

<?php echo '<a title="' . $tags_array['title'] . '" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_info['products_id'], 'NONSSL') . '"/# ' . $tags_array['title'] . '">' . $tags_array['title']; ?></a></td>

</tr>

 

NOTE: The placement of this is not critical. Anywhere neat the bottom of the page is fine.

You can also change or remove the TEXT_VIEWING text to fit your site.

 

I didn't do that, because I couldn't find the "</table></form></td><!-- body_text_eof //-->" on my products_info page. I have "<!-- footer_eof //-->" at the bottom of that page. Can you look at the bottom of my product_info page and tell me where it should go? Thanks so much Jack_mcs. You're always a huge help!!

 

Here's my code:

 

	  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="">
	  <tr class="">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>
			<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td>
<?php
if ((USE_CACHE == 'true') && empty($SID)) {
  echo tep_cache_also_purchased(3600);
} else {
  include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
}
 }
?>
	</td>
  </tr>
</table></form></td>


<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Thanks Jack_mcs!!

 

Jason

Share this post


Link to post
Share on other sites

Here's the end of your file

	</table></form></td>


<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Jack

Share this post


Link to post
Share on other sites

Thanks again Jack_mcs!

 

When I finished this instruction to the product_info file:

 

FIND:

 

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

 

REPLACE with:

 

<?php

// BOF: Header Tag Controller v2.6.3

if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {

require(DIR_WS_INCLUDES . 'header_tags.php');

} else {

?>

<title><?php echo TITLE; ?></title>

<?php

}

// EOF: Header Tag Controller v2.6.3

?>

 

I got an error:

 

Fatal error: Call to undefined function: clean_html_comments() in /home/xxxxxx/public_html/includes/header_tags.php on line 193

 

Any ideas? Sorry for being a pain. I really appreciate your help! I'm really close to getting this to work!

 

Jason

Share this post


Link to post
Share on other sites

I finally got it to work!!! Thanks for your help Jack_mcs! I basically had to go through one step at a time and review all my changes. You can't rush through these things! Mistakes are easily made.

 

Thanks

 

Jason

Share this post


Link to post
Share on other sites

It's working great Jack_mcs! Thank you so much!!

 

One question on the configuration. I would like to add my company's name to my manufacturers keyword. How do I do that?

 

For example, let's say I have a manufacturer that I use as a keyword. I want to be able to add my companies name to the end of the manufacturer in the title, description, and keywords on that manufacturers page. Right now I only have the manufacturer's name in the title, description, and keywords

 

This is what I want: Manufacturer - My Company

 

All this on the manufacturer page that displays that particular manufacturers name. Let me show you what I have now: RZST

 

Is that possible?

 

Thanks Jack!

Share this post


Link to post
Share on other sites

You would need to edit the code in includes/header_tags.php to add the name. But there is really no reason to do that and will, most likley, diminish the effectiveness of having the manufacturers name in the title.

 

Jack

Share this post


Link to post
Share on other sites

I thought that might be true. But whenever I see anyones titles in the SERP's, I see "manufacturer - company name". I would be the only one with just a one word manufacturer in the title. Wouldn't that also be a bit strange for the reader since there's no other keywords or sentence or anything, just a word?

 

Thanks Again Jack-mcs!

 

Jason

Share this post


Link to post
Share on other sites

The name of your site, unless it is Amazon, EBay or the like, won't have any meaning to people seeing the link. But the added text will have meaning (most likely negative) to the search engines. Plus, your title should not be all that is in the listings. That is what the manufacturers description option is for.

 

Jack

Share this post


Link to post
Share on other sites

I went through all the steps doing my best, When I thought all were done and clicked the "Header Tags" link on left panel of Admin, I got this error:

 

Warning: require_once(includes/functions/header_tags.php) [function.require-once]: failed to open stream: No such file or directory in /home/*/public_html/catalog/admin/header_tags_controller.php on line 14

 

Fatal error: require_once() [function.require]: Failed opening required 'includes/functions/header_tags.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/*/public_html/catalog/admin/header_tags_controller.php on line 14

 

I am sure includes/functions/header_tags.php file is there in the right place, but when I try to access it with its url, I get a "the page you requested is forbidden". I have set the permission to 755 already. I cannot figure out what is wrong here? Could it be my host's problem?

 

Also, the home page is fine when viewing though the browser, but when I tried to access my product information pages on the browser, I got this display under the top bar ( the bar showing my account, cart contents, checkout):

 

if (isset($HTTP_GET_VARS['manufacturers_id'])) $db_query = tep_db_query("select manufacturers_htc_title_tag as htc_title, manufacturers_htc_description as htc_description from " . TABLE_MANUFACTURERS_INFO . " where languages_id = '" . (int)$languages_id . "' and manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); else $db_query = tep_db_query("select categories_htc_title_tag as htc_title, categories_htc_description as htc_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'"); $htc = tep_db_fetch_array($db_query); ?>

 

I think there is something wrong with my product_info.php, but I checked that page and could not find out myself what is wrong with it.

 

I installed Jack's version. Because I thought it was complex so I installed it on my test site. I really want to get it work. <_<

 

Thanks for your kind help in advance!

Share this post


Link to post
Share on other sites

SILLY ME! Now I find out what's the problem with the Admin, it should not have been a problem at all! And it works all right now! My only problem now is with the product information pages showing following below top bar:

 

if (isset($HTTP_GET_VARS['manufacturers_id'])) $db_query = tep_db_query("select manufacturers_htc_title_tag as htc_title, manufacturers_htc_description as htc_description from " . TABLE_MANUFACTURERS_INFO . " where languages_id = '" . (int)$languages_id . "' and manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); else $db_query = tep_db_query("select categories_htc_title_tag as htc_title, categories_htc_description as htc_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'"); $htc = tep_db_fetch_array($db_query); ?>

 

Any help would be much appreciated!

Share this post


Link to post
Share on other sites
SILLY ME! Now I find out what's the problem with the Admin, it should not have been a problem at all! And it works all right now! My only problem now is with the product information pages showing following below top bar:

 

if (isset($HTTP_GET_VARS['manufacturers_id'])) $db_query = tep_db_query("select manufacturers_htc_title_tag as htc_title, manufacturers_htc_description as htc_description from " . TABLE_MANUFACTURERS_INFO . " where languages_id = '" . (int)$languages_id . "' and manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); else $db_query = tep_db_query("select categories_htc_title_tag as htc_title, categories_htc_description as htc_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'"); $htc = tep_db_fetch_array($db_query); ?>

 

Any help would be much appreciated!

It means you made a mistake in the installation and wrote over a php delimiter, or didn't copy one. You should revert back to your original file and try again.

 

Jack

Share this post


Link to post
Share on other sites

Hey Jack! I just wanted to say a final "Thank You" for this incredible contribution! I wouldn't have tried to incorporate it into my site if I didn't know that you were going to help. So, it's all because of you that I was able to get it up and running.

 

Also, I was wondering, somebody mentioned to me about alt tags. Does this contribution have anything to do with optimizing them?

 

Thanks,

 

Jason

Share this post


Link to post
Share on other sites

Alt tags are handled as part of oscommerce. If Header Tags is setup correctly, the alt tags will follow. The only time you will need be concerned about them is with link exchanges or links you create. But for categories and products, they shouldn't need to be altered.

 

Jack

Share this post


Link to post
Share on other sites

Hello,

I have just installed the Header Tags Controller contribution V 2.6.3 and I went to check to see if it had worked I went through it all bit by bit. I go to my web site and my tab now says Home Page - osCommerce & and when I go into the admin section there is no area for Header Tags displayed anywhere. I'm really lost on this one any help would be great.

 

Regards

Ian

Share this post


Link to post
Share on other sites

Have you installed the admin part of the contribution? Look for the Install_Admin.TXT file for instructions to do so.

Share this post


Link to post
Share on other sites

Hey Everybody,

 

I seem to be having a bit of trouble here and can't figure out what is going on.

 

Everything works for the categories, but I can't seem to get the information to display on product_info.php

 

I currently have STS 4.4 and HTC 2.6.3 installed.

 

I have gone over everything and can't figure out why it is working for the categories and not the actual products. Any help is appreciated.

Share this post


Link to post
Share on other sites
Hey Everybody,

 

I seem to be having a bit of trouble here and can't figure out what is going on.

 

Everything works for the categories, but I can't seem to get the information to display on product_info.php

 

I currently have STS 4.4 and HTC 2.6.3 installed.

 

I have gone over everything and can't figure out why it is working for the categories and not the actual products. Any help is appreciated.

Others have had this problem. You can read back through this thread or ask in the STS thread.

 

Jack

Share this post


Link to post
Share on other sites
Hey Everybody,

 

I seem to be having a bit of trouble here and can't figure out what is going on.

 

Everything works for the categories, but I can't seem to get the information to display on product_info.php

 

I currently have STS 4.4 and HTC 2.6.3 installed.

 

I have gone over everything and can't figure out why it is working for the categories and not the actual products. Any help is appreciated.

Sethman,

Remember for each STS Module that you are using you need to add to the Files to Include the headertags.php file.

 

For example:

For the default module, you have a parameter named “Files for normal template”. By default it contains only “sts_user_code.php”. If you modify this parameter to “sts_user_code.php;headertags.php”, you will have Header Tags Controller working for all of the pages using the default template.

Do the same for the other modules below.

For the index module, the parameter is called “Files for index.php template”.

For “product_info module”, there are 2 parameters:

“Files for normal template”

“Files for content template”.

 

Hope this helped,


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites
Sethman,

Remember for each STS Module that you are using you need to add to the Files to Include the headertags.php file.

 

For example:

For the default module, you have a parameter named “Files for normal template”. By default it contains only “sts_user_code.php”. If you modify this parameter to “sts_user_code.php;headertags.php”, you will have Header Tags Controller working for all of the pages using the default template.

Do the same for the other modules below.

For the index module, the parameter is called “Files for index.php template”.

For “product_info module”, there are 2 parameters:

“Files for normal template”

“Files for content template”.

 

Hope this helped,

 

I have done this. I only have the default template installed for the entire store. I added the “sts_user_code.php;headertags.php” and it's not working.

However, I had an incompetent company design and install the STS so I have done all of the other mods myself. I've tried to follow the instructions as best as possible.

 

Should I post my product_info.php code here? Perhaps my sts_user_code.php?

Share this post


Link to post
Share on other sites

OK, I figured out my problem.

 

For some reason it wasn't working when I had "require_once" in the application_top.php (it would give me the "clean_html" error that everyone was getting), so I placed the following code in my modules/sts_inc/headertags.php file:

 

$sts->start_capture();

if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {

require_once(DIR_WS_FUNCTIONS . 'header_tags.php');

require_once(DIR_WS_INCLUDES . 'header_tags.php');

}

$sts->stop_capture('headertags');

 

This made the error go away, but the product_info.php was not displaying my HTC information.

 

So I changed this to remove the:

 

require_once(DIR_WS_INCLUDES . 'header_tags.php');

 

and put just require_once on the first call for the functions.

 

$sts->start_capture();

if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {

require_once(DIR_WS_FUNCTIONS . 'header_tags.php');

require(DIR_WS_INCLUDES . 'header_tags.php');

}

$sts->stop_capture('headertags');

 

This seemed to fix everything for me. I have a HEAVILY modified store, so I'm not sure if this will work for anyone else... or even if it's the right way to fix mine, but hey, if it's working I say don't mess with it.

 

Thanks Jack for the awesome support - it really is appreciated!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×