Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header Tags SEO


Jack_mcs

Recommended Posts

@nandimaEdit the includes/header_tags.php file and remove this line (near the bottom):

echo ' <meta http-equiv="X-UA-Compatible" content="IE=edge">' . "\n";

 

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

9 hours ago, Jack_mcs said:

@nandimaEdit the includes/header_tags.php file and remove this line (near the bottom):


echo ' <meta http-equiv="X-UA-Compatible" content="IE=edge">' . "\n";

 

Thank you! Jack,

Edited by nandima
Link to comment
Share on other sites

  • 2 months later...

A new version has been uploaded with these changes:

  • Added missing code to display the manufacturer images.
  • Changed pseudo module so it works properly with other addons.
  • Changed code for the social icons page in admin to account for a deleted definition in CE. Found by member @mk_osc.
  • Changed the open_graph code so it passes Facebooks test. Found by member @mk_osc.
  • Changed fill tags code to correct php 7.3 errors. Found by member @Fredi.
  • Corrected instructions for admin and added a missing php delimiter. Found by member @tobybailey.
  • Corrected the path to the include file in admin since it would fail under some conditions.
  • Corrected coding mistake in admin functions file. Found by member @241.
  • Fixed Copy To code for products in admin. Found by member @lucsangel..
  • Fixed spelling mistake in the admin/header_tags_seo_keywords.php file. Found by member @mk_osc.
  • Fixed code mistake in admin/manufacturers.php that precented the manufacturer description from being saved.
  • Increased the limit for the meta description tag to 300. Google made this change in December, 2017.
  • Moved the category and manufacturers descriptions code to modules (CE or late 2.3.4 version only).
  • Removed unnecessary code from index.php.
  • Removed unnecessary code from modules/header_tags_opengraph.php for OG availability. Found my member @BrockleyJohn.
  • Removed code from admin so View Result is not forced to an http connection.
  • Removed Googles +1 option and code.
  • Removed remaining TABLE_ definitions (CE only).
  • Removed all pre-Frozen files.

Please note that this version focuses on changes for Phoenix. I have tested it and did not find any problems but that is in a controlled environment so I strongly suggest that you try the installation in a test shop first. In the lease, make a complete copy of your shops files in case you need to restore.  Also, there are some core-changes needed. There's no way to avoid those since this addon uses the same sections of code as the default, in several cases.

For Phoenix, the instructions should be correct. For Frozen, they may not be. If this addon is already installed, you can skip the category and manufacturer file changes in admin. The changes for the categories file have been reduced for easier installation but the resulting code is the same as before.

For pre-Frozen shops, the addon will still work fine with them. But given my time is very limited, I have to stop offering free support for those versions.

 

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

  • 2 weeks later...

Hello Jack,

I just tried Header Tags SEO v. 3.3.6 on Phoenix 1.0.4.2, php 7.3+, and there is a problem with the catalog/includes/classes/category_tree.php changes…  my categories box front end no longer shows the names of the categories, it becomes empty. If I take out the changes they reappear. Tried it on a new installation of Phoenix (no other addons) and doing the changes manually. Any ideas?

Thank you in advance

Link to comment
Share on other sites

6 hours ago, artfulweb said:

no longer shows the names of the categories

If you haven't done so, please run Fill Tags and see if that fixes it.

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 hours ago, Jack_mcs said:

If you haven't done so, please run Fill Tags and see if that fixes it.

Thanks, Jack. I had done just the catalog side as in the install instructions so thought it was the catalog side causing the problem. Now with the admin installed and having run "Fill Tags" the names reappear. All OK.

Link to comment
Share on other sites

Another question Jack, if I may. Looking at the source code for a product, after having filled in the meta title, description and key words, it only shows those for product_info. php defined in Page Control and not what is designated for the product in question. Also, with individual pages like conditions.php which are filled in in Page Control they do not show. I have checked my installation and can not figure out what could be wrong...

Link to comment
Share on other sites

I'm not sure I understand what you mean about the products but the conditions problem is because the code is mangling the includes/header_tags.php file. To fix that, edit the admin/includes/functions/header_tags.php file and replace this line (it just changes the word case to line):

$incArray['case'] = sprintf("  case (basename(\$_SERVER['SCRIPT_FILENAME']) === '%s'):\n", $file);

with this one

$incArray['line'] = sprintf("  case (basename(\$_SERVER['SCRIPT_FILENAME']) === '%s'):\n", $file);

Then replace the includes/header_tags.php file with the original from the addon and then go into page control. If you have the automatic add pages option set, the pages will be added just by visiting Page Control. Then refresh the conditions page and the title should be correct.

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

1 hour ago, Jack_mcs said:

I'm not sure I understand what you mean about the products but the conditions problem is because the code is mangling the includes/header_tags.php file. To fix that, edit the admin/includes/functions/header_tags.php file and replace this line (it just changes the word case to line):


$incArray['case'] = sprintf("  case (basename(\$_SERVER['SCRIPT_FILENAME']) === '%s'):\n", $file);

with this one


$incArray['line'] = sprintf("  case (basename(\$_SERVER['SCRIPT_FILENAME']) === '%s'):\n", $file);

Then replace the includes/header_tags.php file with the original from the addon and then go into page control. If you have the automatic add pages option set, the pages will be added just by visiting Page Control. Then refresh the conditions page and the title should be correct.

Hello, that gives me an admin error

Fatal error: Uncaught Error: Call to undefined function AddMissingPages() in /admin/header_tags_seo.php:36 Stack trace: #0 {main} thrown in /admin/header_tags_seo.php on line 36

Link to comment
Share on other sites

37 minutes ago, artfulweb said:

On the other hand when I edit a product now the changes are not saved.

These last changes would not have caused that. It is more likely a mistake was made with the admin/categories.php file. Please upload the one in the addon and see if your edits are saved. If so, you will need to go over the instructions for changes to this file or use a compare program to find the differences.

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

For Phoenix 1.0.4.2 the categories.php has to be modified not simply uploaded so I did correct my uploaded file and it does once again register the changes, thank you.

So we come back to my other question which concerned each product's meta tags on the site. Looking in their source code the meta tags are only drawn from what was registered in Page Control for product.info and does not pick up the meta title, description and key words that are entered when editing each individual product, so all the products all have the same tags instead of the ones individually entered… did I make sense?

Link to comment
Share on other sites

In Page Control for product_info.php, please be sure the Product checkbox is checked.  And in the product edit page, make sure there is an entry in the Title Tag box. Also, if you have multiple languages in the shop, be sure you are looking at the correct page for what you are entering.

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

Here is the source code for "Lemons3

<title>Fiacre - Lemons - Artful Webdesign Products</title>
 <meta name="Description" content="Fiacre - Lemons - Here are Artful Webdesign Products." />
 <meta name="Keywords" content="Fiacre , Lemons , artful webdesign, products" />
 

The product_info.php and product edited below

page-control-product_info.php.jpg

edit_product.jpg

Link to comment
Share on other sites

Figured it out… using your categories file with the tabbed system in Phoenix, there is a product description in the "language specific" tab AND in the "product specific" tab and the header tags are in the latter. In essence just ignore the  "language specific" tab and only use the "product specific"  tab and it works. Changing the description in the latter tab changes it as well in the language tab... Can't believe it took me so long to figure this out. Sorry Jack

Link to comment
Share on other sites

  • 2 weeks later...

Oh Jack it is me again. I had not tried to duplicate a product before so did not see any errors. Now in coping a product using "duplicate" the following error comes up :

Fatal error: Uncaught Error: Call to undefined function GetHTSFieldList() in /xxx/xx/xx/xx/admin/categories.php:489 Stack trace: #0 {main} thrown in /xx/xx/xx/xx/admin/categories.php on line 489

Have run "Fill all tags" but that changes nothing. Rechecked all my files and they are correctly uploaded (as all was working otherwise). How to figure this one out?

Thanks in advance

Link to comment
Share on other sites

3 hours ago, artfulweb said:

Fatal error: Uncaught Error: Call to undefined function GetHTSFieldList()

In admin/categories.php, find

	    $hts_fields = GetHTSFieldList();
            $description_query = tep_db_query("select language_id, products_name, products_description, products_url, products_seo_title, products_seo_description, products_seo_keywords, " . $hts_fields['fields'] . " from products_description where products_id = '" . (int)$products_id . "'");
            while ($description = tep_db_fetch_array($description_query)) {

and add this line above it

        require_once('includes/functions/header_tags_general.php');

 

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

1 hour ago, Jack_mcs said:

In admin/categories.php, find


	    $hts_fields = GetHTSFieldList();
            $description_query = tep_db_query("select language_id, products_name, products_description, products_url, products_seo_title, products_seo_description, products_seo_keywords, " . $hts_fields['fields'] . " from products_description where products_id = '" . (int)$products_id . "'");
            while ($description = tep_db_fetch_array($description_query)) {

and add this line above it


        require_once('includes/functions/header_tags_general.php');

 

Hi Jack, when trying to duplicate now I now get

1136 - Column count doesn't match value count at row 1

insert into products_description (products_id, language_id, products_name, products_description, products_url, products_viewed, products_seo_title, products_seo_description, products_seo_keywords) values ('17918', '1', 'PUNTO 9 01 Tunique', '

Voici une tunique en points fantaisies ajourés à tricoter avec le fil à tricoter Lang Yarns Bloom (70% coton, 18% viscose, 12% lin) dans votre choix de couleur, 0050 en photo.
\r\n
\r\nQuantités à tricoter :
\r\nLang Yarns Bloom 0046 :
\r\nT1: 4 pel., T2: 5 pel.
\r\n
\r\nAiguilles 3-3,5 mm (US 3-4/UK 10-9) ne sont pas incluses avec le kit tricot. Une photocopie du modèle est incluse avec les laines.

', '', '0', '', '', '', '', '', '', '', '', '', '', '', '')

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...