Jump to content
Jack_mcs

Header Tags SEO

Recommended Posts

Hi Jack,

 

I installed STS and catalog parts of HTC SEO 3.01.

I read in instruction that before doing admin part I should have "New Home Page Title" for my index page.

I don't have it, it shows my domain name on a title as usual. I checked default (english) language ID and it is 1, as it should be. Should I go ahead and install admin part and see what happeneds or probably you can tell me what to look for.

Thank you in advance.

 

Mike

 

 

 

Hi Jack or others who can help me.

 

I have the same problem as Mike above.. just i did not install STS.

I runed the sql. file in my database first and I made the changes as written in the Install_Catalog.txt.

Now I have this problem and do not dare to continue... :rolleyes: with the admin part...

 

In the install_readme_first it says:

 

3 - If you see the "New Home Page Title" title, then install the admin part of

the contribution by following the steps in the Install_Admin file.

 

Where exactly is it that I can see this "New home page Title"? When I go to my firstwebpage it says in the adress:

 

http://simonesmor.se/index.php

 

Is that rong?

 

I checked my default langues id in my database, and it was '5'.. is it in the database I should change it to 1? Becaurse I tried that, and nothing changed.

 

Hope you can help me..

(sorry for my bad english, it is a bit rusty ;-))

 

Sincerly

Christina


/Christina

 

 

osCommerce 2.2

Share this post


Link to post
Share on other sites
Hi Jack or others who can help me.

 

I have the same problem as Mike above.. just i did not install STS.

I runed the sql. file in my database first and I made the changes as written in the Install_Catalog.txt.

Now I have this problem and do not dare to continue... :rolleyes: with the admin part...

 

Where exactly is it that I can see this "New home page Title"? When I go to my firstwebpage it says in the adress:

 

I checked my default langues id in my database, and it was '5'.. is it in the database I should change it to 1? Becaurse I tried that, and nothing changed.

It won't hurt anything to install the admin part if the shop side isn't working. It just might make it a little more difficult to troubleshoot.

 

The title should appear in the web browsers title (very top of your screen).

 

It doesn't matter what the language ID is. There is code in the contribution to check that.

 

Try turning STS off and see if the title shows up. If so, then you've probably made a mistake in the STS changes. If not, then there is a mistake in the regular install.

 

Jack

Jack

Share this post


Link to post
Share on other sites
Try turning STS off and see if the title shows up. If so, then you've probably made a mistake in the STS changes. If not, then there is a mistake in the regular install.

 

Jack

Jack

 

 

Thank you for your fast reply.. nice :-)

 

I do not have STS installed.. Or did I missunderstand... STS isn't that a contribut "Simple Template System"?

So, I did perhaps make a mistake whith the install?.. thought I was so carefull.. hmm, I will run throw the install again :blink: <_<


/Christina

 

 

osCommerce 2.2

Share this post


Link to post
Share on other sites

I missed the part where you said you didn't have STS installed. Does the new title show up on the product_info page? If yes, then a mistake was made with the index.php changes. If no, then try replacing the includes/header_tags.php file.

 

Jack

Share this post


Link to post
Share on other sites
I missed the part where you said you didn't have STS installed. Does the new title show up on the product_info page? If yes, then a mistake was made with the index.php changes. If no, then try replacing the includes/header_tags.php file.

 

Jack

 

 

Hi Jack

The new title does not show up on the product_info page either..

I uploaded all the files again.. and remade the changes in the files following your instructions.. but no change :-(

 

I see that there is a map called Database files.. I have runed the sql in my php database.. but should I do something else with the other files? I think here about the headertags_seo_install.php?

 

What could be rong?

 

Sincerly Christina


/Christina

 

 

osCommerce 2.2

Share this post


Link to post
Share on other sites

Hi,

 

When I try to edit one of my manufacturers, I get this message:

 

Fatal error: Call to undefined function: tep_get_manufacturer_htc_title() in /.../admin/manufacturers.php on line 258

 

Line 258 looks like this:

 

257.	       /*** Begin Header Tags SEO ***/
258.	        $manufacturer_htc_title_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('manufacturers_htc_title_tag[' . $languages[$i]['id'] . ']', tep_get_manufacturer_htc_title($mInfo->manufacturers_id, $languages[$i]['id']));

 

Can anyone tell me what's wrong?

 

/Johanna

Share this post


Link to post
Share on other sites

Hi again

 

Hmm, now I can't even log on to my admin site. I get this message:

 

Fatal error: Cannot redeclare tep_get_products_head_title_tag() (previously declared in /usr/local/pem/vhosts/123638/webspace/httpdocs/admin/includes/functions/general.php:519) in /usr/local/pem/vhosts/123638/webspace/httpdocs/admin/includes/functions/general.php on line 1385

 

Line 519:

 

516.	    return $product['products_description'];
517.	  }
518.	
519.	  function tep_get_products_head_title_tag($product_id, $language_id) {
520.	
521.	   $product_query = tep_db_query("select products_head_title_tag from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . $product_id . "' and language_id = '" . $language_id . "'");
522.	
523.	   $product = tep_db_fetch_array($product_query);
{

 

Line 1385:

 

1381.	    return $category['categories_htc_description'];
1382.	  }
1383.	
1384.	
1385.	  function tep_get_products_head_title_tag($product_id, $language_id) {
1386.	    $product_query = tep_db_query("select products_head_title_tag from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$product_id . "' and language_id = '" . (int)$language_id . "'");
1387.	    $product = tep_db_fetch_array($product_query);

 

Should I delete one of them or is it something else I should change?

 

/Johanna

Share this post


Link to post
Share on other sites
Sorry to be completely stupid but does this contrib allow custom meta tags for individual manufacturers and products?

 

Andy

Yes, it does.

 

Jack

Share this post


Link to post
Share on other sites
Hi Jack

The new title does not show up on the product_info page either..

I uploaded all the files again.. and remade the changes in the files following your instructions.. but no change :-(

 

I see that there is a map called Database files.. I have runed the sql in my php database.. but should I do something else with the other files? I think here about the headertags_seo_install.php?

 

What could be rong?

 

Sincerly Christina

The way the basic code works is that the includes/header_tags.php file is loaded by the code in the head section of the index.php file. And the includes/header_tags.php reads in the database to get the data to display. So if you have those three things in place (code in head section of index.php, includes/header_tags.php and database updated with headertags_seo_install.php, or sql) then it should work. Try this. Around line 49 of the includes file, find this line
FillHeaderTagsArray($header_tags_array, $sortOrder);

After the line (and before the break which follows it), add this line

echo 'title '.$header_tags_array['title'];

Upload and refresh your home page. Do you see anything printed near the top of the page?

 

Jack

Share this post


Link to post
Share on other sites
Hi again

 

Hmm, now I can't even log on to my admin site. I get this message:

 

Fatal error: Cannot redeclare tep_get_products_head_title_tag() (previously declared in /usr/local/pem/vhosts/123638/webspace/httpdocs/admin/includes/functions/general.php:519) in /usr/local/pem/vhosts/123638/webspace/httpdocs/admin/includes/functions/general.php on line 1385

You need to make the required changes to the admin/includes/functions/general.php file.

 

Jack

Share this post


Link to post
Share on other sites
You need to make the required changes to the admin/includes/functions/general.php file.

 

Jack

 

Do you meen the changes from the Install_Admin.txt? In that case, it was when I added that code that I started having this problem...

 

/Johanna

Share this post


Link to post
Share on other sites
The way the basic code works is that the includes/header_tags.php file is loaded by the code in the head section of the index.php file. And the includes/header_tags.php reads in the database to get the data to display. So if you have those three things in place (code in head section of index.php, includes/header_tags.php and database updated with headertags_seo_install.php, or sql) then it should work. Try this. Around line 49 of the includes file, find this line
FillHeaderTagsArray($header_tags_array, $sortOrder);

After the line (and before the break which follows it), add this line

echo 'title '.$header_tags_array['title'];

Upload and refresh your home page. Do you see anything printed near the top of the page?

 

Jack

 

 

Yes I see the word 'title' on the top left corner..


/Christina

 

 

osCommerce 2.2

Share this post


Link to post
Share on other sites
Hi Jack, I really like this contrib of yours!

 

One question...

 

When viewing the products_info page, I have the text "Currently Viewing" at the bottom, but no text after it.

I have checked and re-checked the source mods, and they are correct according to your install instructions.

 

If I view the HTML source for the page, i see this:

 

<td class="smallText" align="center">Currently viewing: 

<a title="" href="http://mysite.com/product_info.php?products_id=28/# "></a></td>

 

As you can see, the title tag is empty, along with the link.

 

I am wondering if this is to do with the database install, as it did have an error.

 

If it is to do with the database, is there a way I can check if everything is there properly?

 

Regards, Owen.

 

 

Bill - any idea on the cause of the "currently viewing:" problem mentioned on the last page? I'm not sure when I will get to it but maybe you can see something obvious.

 

Jack

 

 

Jack, isn't that link the same link that is produced as the breadcrumb? If that is the case, STS users would simply add $breadcrumbs to thier product template to get the product link.

Hi Jack (and Bill),

 

I've been playing around with the problem I mentioned a few pages back (the "Currently viewing:" code from Header tags SEO)...

 

I've changed the following code to the "header_tags_social_bookmarks.php" file (the first 10 lines) before the actual social bookmarks images:

 

<?php
$NAME = $product_info['products_name'];
$TITLE = urlencode($product_info['products_name']);
$PROD = $_SERVER["REQUEST_URI"];
$URL = urlencode("http://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
?>
<tr>
<td align="right"><table border="0">
 <tr>
 <td style="font-family: Arial, Helvetica, sans-serif; font-size: smaller;">Add <a href="<?php echo $PROD ?>"><?php echo $NAME ?></a> to:</td>

Share this post


Link to post
Share on other sites

In addition to my last post... (which got submitted when it shoudn't have)...

The following code will take care of the STS and Header Tags SEO problem for the "Currently viewing:" code:

      <!--- BEGIN Header Tags SEO Social Bookmarks -->
      <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
	$PROD = $_SERVER["REQUEST_URI"];
	?>
	<a href="<?php echo $PROD ?>"><?php echo $NAME ?></a>
	</td>
	</tr>
     <!--- END Header Tags SEO Social Bookmarks -->

This solved the problem for me. I hope it helps...

 

Regards, Owen.

Share this post


Link to post
Share on other sites
Do you meen the changes from the Install_Admin.txt? In that case, it was when I added that code that I started having this problem...

 

/Johanna

Open the admin/includes/functions/general.php file and search for all instances of tep_get_products_head_title_tag. There should only be one. The same goes for the other functions that are causing an error.

 

Jack

Share this post


Link to post
Share on other sites
Yes I see the word 'title' on the top left corner..
If all you see is "title," then the data is not being loaded from the database. You will need to check your database to make sure it is there. Look in the headertags table for an entry for index.php and see what the title shows.

 

Jack

Share this post


Link to post
Share on other sites
In addition to my last post... (which got submitted when it shoudn't have)...

The following code will take care of the STS and Header Tags SEO problem for the "Currently viewing:" code:

Thanks for posting a fix. However, it is not clear, to me at least, what it is. Please mention the files being changed as well as the lines of code.

 

Jack

Share this post


Link to post
Share on other sites
If all you see is "title," then the data is not being loaded from the database. You will need to check your database to make sure it is there. Look in the headertags table for an entry for index.php and see what the title shows.

 

Jack

 

 

In my database in headertags/page_title/pagename/index.php.. the page title is 'New Home Page title'.. Is it that one you mean?

 

Before I installed the contribut, I runed the headertags_seo sql.file and it came out succesfull

then I (by grazy mistake, don't ask me why <_< ).. runed the headertags_seo_update sql.file, also.. there was an error in the database after the run..

 

Can I undo it?

 

The others in the same folder:

headertags_seo_uninstall.php

headertags_seo_install.php and.

headertags_seo_update.php I did not do anything about..

 

Sincerly

Christina


/Christina

 

 

osCommerce 2.2

Share this post


Link to post
Share on other sites
In my database in headertags/page_title/pagename/index.php.. the page title is 'New Home Page title'.. Is it that one you mean?

 

Before I installed the contribut, I runed the headertags_seo sql.file and it came out succesfull

then I (by grazy mistake, don't ask me why <_< ).. runed the headertags_seo_update sql.file, also.. there was an error in the database after the run..

 

Can I undo it?

 

The others in the same folder:

headertags_seo_uninstall.php

headertags_seo_install.php and.

headertags_seo_update.php I did not do anything about..

 

Sincerly

Christina

Upload the headertags_seo_uninstall.php file to your site and run it by going to http://yoursite.com.headertags_seo_uninstall.php, Then upload the headertags_seo_install.php and run it by doing the same. That will set the database to the correct state.

 

Jack

Share this post


Link to post
Share on other sites
Upload the headertags_seo_uninstall.php file to your site and run it by going to http://yoursite.com.headertags_seo_uninstall.php, Then upload the headertags_seo_install.php and run it by doing the same. That will set the database to the correct state.

 

Jack

 

 

Hi Jack

I did that and it came out succesful.. thank you.

But.. :-( I still do not se the new title in my browser, when I go to my index page.. neither on the produkt infopage..

Can you still help me?

 

Christina


/Christina

 

 

osCommerce 2.2

Share this post


Link to post
Share on other sites
Hi Jack

I did that and it came out succesful.. thank you.

But.. :-( I still do not se the new title in my browser, when I go to my index page.. neither on the produkt infopage..

Can you still help me?

 

Christina

In the includes/header_tags.php file, change
	$pageTags = tep_db_fetch_array($pageTags_query);

to

	$pageTags = tep_db_fetch_array($pageTags_query);
	 echo 'DB '. $pageTags['page_title'];

Upload to your server and refresh your home page. What do you see displayed?

 

Jack

Share this post


Link to post
Share on other sites
No, that wouldn't work since other fields have to be changed too. I will post some code to clear that today or tomorrow.

 

Jack

 

is this somewhere on your TODO list?

Share this post


Link to post
Share on other sites
In the includes/header_tags.php file, change
	$pageTags = tep_db_fetch_array($pageTags_query);

to

	$pageTags = tep_db_fetch_array($pageTags_query);
	 echo 'DB '. $pageTags['page_title'];

Upload to your server and refresh your home page. What do you see displayed?

 

Jack

 

 

I see DB in the top left corner?


/Christina

 

 

osCommerce 2.2

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

×