Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header Tags SEO


Jack_mcs

Recommended Posts

Damn, I'm tired... Of course the max_execution_time is hit at line 103, but that doesn't mean that it's where the vast majority of exec time was spent.

Need ... to ... reinstall ... XDebug ... on ... Wamp. Oh dear. I'm too old for this :/

Link to comment
Share on other sites

I hope someone can help me out with this little problem.

 

I have installed this contribution a number of times in a number of ways including installing to a brand new shop.

 

I am using the rc2.2a version of OsCommerce.

 

Everything appears to works fine when you view the site in Firefox however in Internet Explorer v7 the product_info.php page displays with the right hand column dropping below the "Reviews" button.

 

Any help will be most gratefully accepted as I think that this contribution is a "must" for good SEO practice.

Link to comment
Share on other sites

I hope someone can help me out with this little problem.

 

I have installed this contribution a number of times in a number of ways including installing to a brand new shop.

 

I am using the rc2.2a version of OsCommerce.

 

Everything appears to works fine when you view the site in Firefox however in Internet Explorer v7 the product_info.php page displays with the right hand column dropping below the "Reviews" button.

 

Any help will be most gratefully accepted as I think that this contribution is a "must" for good SEO practice.

The only thing that can cause that to happen is the code that is added to the product_info page. You need to back that code out and install the changes one at a time until you find the mistake.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi Everyone

 

I have installed the latest version of this contrib (Header Tags SEO v3.0.1) and i am having a problem with the bread crumb. Was wondering if this was normal or not. I am getting my breadcrumb as this:

 

Top » Catalog » » »

 

Rather then getting the subcategory and product name. Have i missed or done something wrong?

Link to comment
Share on other sites

Hi Everyone

 

I have installed the latest version of this contrib (Header Tags SEO v3.0.1) and i am having a problem with the bread crumb. Was wondering if this was normal or not. I am getting my breadcrumb as this:

 

Top » Catalog » » »

 

Rather then getting the subcategory and product name. Have i missed or done something wrong?

Did you run fill tags?

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Jack> could you explain me the logic behind the loop

	  while ($pageNumb < count($newfiles) && ! $failedDupSort)

in header_tags_seo.php ?

 

$newfiles seems to be the array behind the input/select new_files, so it looks like one should iterate on this array, BUT there's a problem on my environment (Win 2K, PHP Version 5.2.3, Apache 2.x) with an endless loop somewhere in header_tags_seo.php

 

Here's the result if I try to dump the content of $pageNumb in the loop :

string 'Select A File' (length=13)

string 'Select A Filf' (length=13)

string 'Select A Filg' (length=13)

string 'Select A Filh' (length=13)

string 'Select A Fili' (length=13)

string 'Select A Filj' (length=13)

string 'Select A Filk' (length=13)

string 'Select A Fill' (length=13)

string 'Select A Film' (length=13)

[...]

string 'Select A Hifh' (length=13)

string 'Select A Hifi' (length=13)
[...]

 

I would say there is either a problem in the initialization of the variable at those lines :

	  $pageNumb = GetKey($newfiles, $_POST['new_files']);

  if ($pageNumb === SHOW_ALL_FILES)
	$pageNumb = FIRST_PAGE_ENTRY;	   //skip over the selection options

or of a problem of a "not strict enough" compare condition in the loop control.

Link to comment
Share on other sites

I have it installed on shops running php 5 so I don't think that is the problem. That code uses defined values so all I can think to suggest is to be sure that they have been added to your code.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I have it installed on shops running php 5 so I don't think that is the problem. That code uses defined values so all I can think to suggest is to be sure that they have been added to your code.

 

Jack

 

Well if you could answer my questions below, that would help me understand what the code is supposed to do / what defined values aren't defined :)

 

That would be :

+ what do the function AddMissingPages and GetFileList are supposed to return ?

 

+ what does the function GetKey($fileList, $file) is really supposed to do ?

=> I've the comment near the function definition : "return the key of the file array for the selected item", but the point is that in header_tags_seo.php the call (not far below the comment " /********************** CHECK THE INPUT **********************/ ":

	  $pageNumb = GetKey($newfiles, $_POST['new_files']);

gives the function which seems to be an array ($newfiles) and ... an array ... ($_POST['new_files'])

 

As the compare operator is strict in GetKey ( " if ($fileList[$i]['text'] === $file) " ), that might be the problem ...

 

Another lead I have is that the code in the function AddMissingPages makes suppositions on the lack of rename operations on the Oscommerce base filenames (which CAN be modified an redefined in filenames.php)...

 

Cheers

Edited by Celluloid
Link to comment
Share on other sites

+ what does the function GetKey($fileList, $file) is really supposed to do ?

=> I've the comment near the function definition : "return the key of the file array for the selected item", but the point is that in header_tags_seo.php the call (not far below the comment " /********************** CHECK THE INPUT **********************/ ":

	  $pageNumb = GetKey($newfiles, $_POST['new_files']);

gives the function which seems to be an array ($newfiles) and ... an array ... ($_POST['new_files'])

 

As the compare operator is strict in GetKey ( " if ($fileList[$i]['text'] === $file) " ), that might be the problem ...

Ok, forget this, $_POST['new_files'] can't be an array, it will be the option selected (well its value) from the <select name="new_files" ...>.

 

But what puzzles me is that the loop behavior is bound to this value when one submits the form with the several text inputs title_, desc_, keyword_, logo_ etc (for instance, for index.php : title_3_1, desc_3_1, keyword_3_1, logo_3_1) ... which is always 'Select A File'.

 

Let me get this straight :

If $pageNumb is a (string) KEY of the table $newfiles, it doesn't make ANY SENSE in PHP to compare with count($newfiles).

And it doesn't make ANY SENSE to treat it like a numerical value and trying to increment / decrement it.

 

What would eventually make sense would be to compare $pageNumb (string) with the last (string) key of the $newfiles array, and (at the end of the while loop) to switch its values with next key in $newfiles (string) keys.

Or to store in $pageNumb a numerical value (which is done if $pageNumb is === SHOW_ALL_FILES ).

Link to comment
Share on other sites

[...]

 

What would eventually make sense would be to compare $pageNumb (string) with the last (string) key of the $newfiles array, and (at the end of the while loop) to switch its values with next key in $newfiles (string) keys.

Or to store in $pageNumb a numerical value (which is done if $pageNumb is === SHOW_ALL_FILES ).

 

Ok, cornered it.

1) function GetKey($fileList, $file) returns

  • either a string value ( if $file equals to the text description of the first 3 items of $fileList ), which means the first 3 select options of the 'new_files' select : SELECT_A_FILE, SHOW_ALL_FILES, ADD_MISSING_PAGES string values.
  • either a numerical value ( if $file equals any text description of a $fileList item beyond the first 3 items ).

2) Without a numerical value in $pageNumb, the " while ($pageNumb < count($newfiles) && ! $failedDupSort) " (l.89) loop is endless.

 

3) A numerical value is already enforced to $pageNumb if its value is (strictly) equal to the SHOW_ALL_FILES string value (l.86 and l.87) :

	  if ($pageNumb === SHOW_ALL_FILES)
	$pageNumb = FIRST_PAGE_ENTRY;	   //skip over the selection options

 

4) Solution : enforce a numerical value for any other string value in $pageNumb :

	  if ($pageNumb === SHOW_ALL_FILES)
	$pageNumb = FIRST_PAGE_ENTRY;	   //skip over the selection options
  else if ( is_string($pageNumb) ) {
	$pageNumb = FIRST_PAGE_ENTRY;
  }

 

=> No more endless loop and, for instance, the values entered for the title, description, keywords, etc of index.php and product_info.php are saved in the db.

 

As the same behavior is reproduced latter in the file (l.265 and l.271, for "Get Live Keywords Box Checked") , the strap needs to be put there too.

 

Jack> apart from that, would you like a diff file for the HTML typos on the extra commas and '<input type="input"'> in header_tags_seo.php ? (see several messages above).

Link to comment
Share on other sites

If you find mistakes in the files, please post them here since others may need the information.

 

Jack

 

Minor problems :

1) Extra commas are present in header_tags_seo.php on lines :

l.498 l.500 l.510 l.518 l.526 l.571 l.575 l.579 l.639 l.643 l.647 l.651

 

For instance l.498 :

<th title="<?php echo $commonPopup['view']; ?>" class="popup" ><input type="checkbox" name="view_result", value="<?php echo $id_toggle; ?>" onClick="this.form.submit();" <?php echo $checked; ?> ></th>

=> Search for [", ] and replace by [" ] on the lines listed (it's usually behind a [name=<something&gt] ( [name="view_result",] for instance ).

If it's any use to anybody, I would make a diff-patch file available (otherwise, I would spare me the trouble)

 

2) input type="input" used instead of input type="text" in header_tags_seo.php on lines :

l.510 l.514 l.518 l.526 l.571 l.575 l.579 l.639 l.643 l.647 l.651

 

For instance l.510 :

<td class="smallText" title="<?php echo $commonPopup['title']; ?>" class="popup" ><input type="input" name="title_<?php echo $id; ?>", value="<?php echo ($pageTags['page_title']) ? $pageTags['page_title'] : ''; ?>", maxlength="255", size="62" id="title_<?php echo $id_toggle; ?>"'> </td>

=> Search for [input type=input] and replace by [input type=text] on the lines listed.

 

Mild problems :

the one mentionned in my messages above about the endless loop in header_tags_seo.php, but I let you double-check the idea and solution proposed (I admit I don't understand - yet - why the problem would not popup on some installs ...).

Edited by Celluloid
Link to comment
Share on other sites

Hi,

 

I've obviously missed something. On the instructions it says

 

Once Header Tags SEO is installed, go to admin->Header Tags SEO->Fill Tags,

select the Fill All option in all three columns on that page and click

Update. This option will fill in all of the titles and meta tags for all

categories, manufacturers and products. If you already have tags set up,

then you should select the Fill Empty option instead.

 

But somehow I dont have the "Fill Tags" section in my admin. Ive reread the admin instructions three times. Can someone help? What did I miss?

=((

 

:blink:

 

Thank you in advance,

Camille

I am a Jedi, like my father before me!

Link to comment
Share on other sites

Hi,

 

I've obviously missed something. On the instructions it says

 

Once Header Tags SEO is installed, go to admin->Header Tags SEO->Fill Tags,

select the Fill All option in all three columns on that page and click

Update. This option will fill in all of the titles and meta tags for all

categories, manufacturers and products. If you already have tags set up,

then you should select the Fill Empty option instead.

 

But somehow I dont have the "Fill Tags" section in my admin. Ive reread the admin instructions three times. Can someone help? What did I miss?

=((

 

:blink:

 

Thank you in advance,

Camille

Please see the note in the install instructions for troubleshooting.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi there,

I gave HTSEO 3.0.1 a try and i must say it's a nicer behaviour than HTC.

But I still have some questions and additions:

 

1. I also use Google Sitemaps with w/ Admin contribution (http://www.oscommerce.com/community/contributions,3439).

There are a php-file called sitemap.class.php to generate the xml files for google sitemaps. The problem is now htseo can't handle these files (because of the .class addition).

Even I didn't add meta tags for it, it is listed in catalog/includes/header_tags.php and when I want to call the frontend i get a failure notice:

Parse error: syntax error, unexpected T_CLASS in C:\xampp\htdocs\osc_test\includes\header_tags.php on line 267

The corresponding code is:

// sitemap.class.php
 case (basename($PHP_SELF)==FILENAME_SITEMAP.CLASS):
$header_tags_array = tep_header_tag_page(FILENAME_SITEMAP.CLASS);
  break;

 

2. I figured out that there are still some hard coded language strings left. I changed them an I'll upload a fix within the next days.

 

3. Something seems to be wrong with the product and category names. I don't get a product name in the title, just "Product information - - Mozilla Firefox" is showed. "Mozilla Firefox" is a fixed browser title and "Product information" is my special title for product_info.php.

Also in the Breadcrumb / Navigation bar I don't get a category name nor a product name (Top » Catalog » » »).

And the currently viewing field added by htseo in the bottom of each product page also doesn't show me a category name or product name (Currently viewing: Action -). The example was "Under Siege 2 - Dark Territory" (from the default installation, placed within DVD Movies > Action > DVD-UNSG2).

I figured out that I have to set a meta title tag for each category and each product to work. But wouldn't it be better to place a function (I think a simple if clause sould be enough) to use the default method (for categories the name and for the product the name / model number) if no meta title tag is placed?

 

4. The default oscommerce languages should be integrated. English is still there and I'm adding a german translation to my fix (I plan to upload within the naxt days - se above). But also a spanish translation (not an ugly google translation) would be fine. If someone has one or can translate it feel free to do, please.

 

5. I'll also include the code to enable, disable and view the column box if STS is installed into my upload. The only hint: I'm not using includes/modules/sts_inc/headertags.php. I have done the needed changes (the content of headertags.php) directly into my sts_user_code.php. But that's no problem I think. You can add the changes for the column box into headertags.php, sts_user_code.php or into another file (you have to specify within the backend in the same way you specified headertags.php to sts).

 

6. I have also the execution timeout problem bescribed here before. But I did all the steps mentioned within the installation guide. But I figured out that there was one hint: in index.php I have two times

	<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

But in the installation guide is only one change mentioned. So I did the changes on the first search result I got (it fits to the lines mentioned in the guide). But I don't think this is the problem.

The timeout only appears when I want to select "Add missing pages".

Edited by Grinse
Link to comment
Share on other sites

Hi there,

I gave HTSEO 3.0.1 a try and i must say it's a nicer behaviour than HTC.

But I still have some questions and additions:

 

1. I also use Google Sitemaps with w/ Admin contribution (http://www.oscommerce.com/community/contributions,3439).

There are a php-file called sitemap.class.php to generate the xml files for google sitemaps. The problem is now htseo can't handle these files (because of the .class addition).

Even I didn't add meta tags for it, it is listed in catalog/includes/header_tags.php and when I want to call the frontend i get a failure notice:

In the admin/includes/functions/header_tags.php, there is an array of excluded files. If you add that file to list, the problem should go away.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

6. I have also the execution timeout problem bescribed here before. But I did all the steps mentioned within the installation guide. But I figured out that there was one hint: in index.php I have two times

	<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

But in the installation guide is only one change mentioned. So I did the changes on the first search result I got (it fits to the lines mentioned in the guide). But I don't think this is the problem.

The timeout only appears when I want to select "Add missing pages".

I noticed that I only get an execution timeout when I hit "Add A file".

Fatal error: Maximum execution time of 60 seconds exceeded in C:\xampp\htdocs\osc_test\admin\header_tags_seo.php on line 276

The corresponding code to that line:

			$keys = sprintf("keyword_live_%d_%d",  $pageNumb, $languages[$i]['id']); //build the post ID's

 

When I hit "Add Missing Pages" I don't get any file information (expect the general ones). But how can I add a new file (because not all files are listed under "Show All Files"?

 

 

Thanks btw. for the help with my first problem.

Link to comment
Share on other sites

I noticed that I only get an execution timeout when I hit "Add A file".

 

The corresponding code to that line:

			$keys = sprintf("keyword_live_%d_%d",  $pageNumb, $languages[$i]['id']); //build the post ID's

 

When I hit "Add Missing Pages" I don't get any file information (expect the general ones). But how can I add a new file (because not all files are listed under "Show All Files"?

Thanks btw. for the help with my first problem.

Be sure the permissions are correct on the includes/header_tags.php file (they should be the same as those on the images directory). I suppose it could be something with curl on your server. In admin/inludes/functions/header_tags.php, find these lines
function GetFileArray($path)
{
 $lines = array();

and add these after it

	$lines = @file($path); 

 return $lines;

Save and upload. If it works, then it is a curl problem on your server.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Please see the note in the install instructions for troubleshooting.

 

Jack

 

At the risk of sounding like a PITA, I've read those 4x. Im not catching on. Ive looked into the permissions issue - no errors. I followed the instructions for the admin/categories 3x (edited the file). Nothing happened, so I went to the folder for new installs and downloaded the copy included. Still nada. Everything else works. I can add keywords to the products. Perhaps there is another file that I should focus?

 

Thank you in advance.

 

Camille

I am a Jedi, like my father before me!

Link to comment
Share on other sites

At the risk of sounding like a PITA, I've read those 4x. Im not catching on. Ive looked into the permissions issue - no errors. I followed the instructions for the admin/categories 3x (edited the file). Nothing happened, so I went to the folder for new installs and downloaded the copy included. Still nada. Everything else works. I can add keywords to the products. Perhaps there is another file that I should focus?

 

Thank you in advance.

 

Camille

 

UGH NEVERMIND!!!

I am a Jedi, like my father before me!

Link to comment
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.

Link to comment
Share on other sites

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?

That text comes from the includes/header_tags.php file and is the same text used for the web browser title of that page. So if your web browser title is correct, there is a mistake on the coding for the product_info page. If it isn't correct, then the title and meta tags are probably not set up for that product (be sure to run Fill Tags). If that is the case, you should check the products edit page for that product to see if the text is there.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Thanks for the reply Jack.

 

The web browser title is correct. And everything else does seem to be working as it should.

 

One thing I should point out (I didn't think this was related until I read your answer) is that I am using STS 4.5.8.

 

I did follow the instructions for the STS users that you provided.

I will spend some time looking though their forum in case there is an answer there.

 

Thanks again for you help and fast response!!

Link to comment
Share on other sites

Great contrib, everything seems to be working great except for one issue, hoping someone here can point me in the right direction.

Shop is running RC2a and sts 4.5.8 with header tags seo

When I go to view the page for specific a product the left colom boxes(search tell a friend etc.) are now located center page below the product listing, only happens on product pages, catagory pages are not affected.

Guessing the problem is in product_info.php but not sure.

Link to comment
Share on other sites

Thanks for the reply Jack.

 

The web browser title is correct. And everything else does seem to be working as it should.

 

One thing I should point out (I didn't think this was related until I read your answer) is that I am using STS 4.5.8.

 

I did follow the instructions for the STS users that you provided.

I will spend some time looking though their forum in case there is an answer there.

 

Thanks again for you help and fast response!!

Yes, that is the problem (or, at least, the reason). I checked the test STS install I have here and it is missing that text. I don't see anything obvious wrong with it but I'm not that familiar with STS. You may want to see if there has been any updated files for STS regarding this or ask in the STS support thread for help. I will work on the problem but it won't be anywhere near soon, I'm afraid.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...