Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header Tags SEO


Jack_mcs

Recommended Posts

Hi There

 

I have a older version of Header tags installed which is workign fine except i am getting duplicates in Google webmaster because of Language and currency and i am in the process of updating to the latest downloadable one from Nov 2010, but i think i might have a problem, in my old version i had in includes/languages/english/header_tags.php, which meant i could change the required items for a Multistore version (with one back end). It does not look like i am going to be able to do this for this version.

 

Is there a easier way of updating only a section of the old version so i can loose the duplicate Tag Descriptions in Google webmaster

 

Hope i have explained myself properly

 

Thank you

 

David

David

Link to comment
Share on other sites

Hi There

 

I have a older version of Header tags installed which is workign fine except i am getting duplicates in Google webmaster because of Language and currency and i am in the process of updating to the latest downloadable one from Nov 2010, but i think i might have a problem, in my old version i had in includes/languages/english/header_tags.php, which meant i could change the required items for a Multistore version (with one back end). It does not look like i am going to be able to do this for this version.

 

Is there a easier way of updating only a section of the old version so i can loose the duplicate Tag Descriptions in Google webmaster

This contribution never had a includes/languages/english/header_tags.php so you must have the Header Tags Controller contribuiton installed, which is a different contribution. To upgrade to Header Tags SEO, you'll need to make some database changes and the file changes in this contribution. Once done, the languages are all handled in admin.

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I was looking for this portation of code in index.php but i can not find it.

 

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

 

 

.. any info please. I will stop before I change anything else.

 

Hamsaya

Link to comment
Share on other sites

I was looking for this portation of code in index.php but i can not find it.

 

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

 

 

.. any info please. I will stop before I change anything else.

 

Hamsaya

 

 

Found this instead, perhaps because it is a template... Oh boy !

 

$p_pic_sub = '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '</a>';

 

$p_name_sub = '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . $categories['categories_name'] . '</a>';

Link to comment
Share on other sites

Found this instead, perhaps because it is a template... Oh boy !

 

$p_name_sub = '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . $categories['categories_name'] . '</a>';

Yes, it's a template. You'll need to figure out the change on your own since there's no common code for templates.

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hey Jack, I manually installed this onto a already modified 2.3.1 shop. All appears to be working fine but the loading of CKEditor is a little buggy, depending on what settings I use in header tags seo. This caused me to look closer at the admin/categories.php and admin/manufacturers.php files using a file comparison utility. I found a few of what appear to be differences in what the manual install instruction calls for and what the "new_shop_only_2.3" files show.

 

For example from admin/manufacturers.php

 

the manual install instructions call for this around line 56

 

         /*** Begin Header Tags SEO ***/
         $sql_data_array = array('manufacturers_url' => tep_db_prepare_input($manufacturers_url_array[$language_id]),
          'manufacturers_htc_title_tag' => (tep_not_null($manufacturers_htc_title_array[$language_id]) ? tep_db_prepare_input($manufacturers_htc_title_array[$language_id]) : $manufacturers_name),
          'manufacturers_htc_desc_tag' => (tep_not_null($manufacturers_htc_desc_array[$language_id]) ? tep_db_prepare_input($manufacturers_htc_desc_array[$language_id]) : $manufacturers_name),
          'manufacturers_htc_keywords_tag' => (tep_not_null($manufacturers_htc_keywords_array[$language_id]) ? tep_db_prepare_input($manufacturers_htc_keywords_array[$language_id]) : $manufacturers_name),
          'manufacturers_htc_description' => tep_db_prepare_input($manufacturers_htc_description_array[$language_id]));
         /*** End Header Tags SEO ***/

 

The new_shop_only_2.3 file that you provided for drop on top shows:

 

         /*** Begin Header Tags SEO ***/
         $sql_data_array = array('manufacturers_url' => tep_db_prepare_input($manufacturers_url_array[$language_id]),
          'manufacturers_htc_title_tag' => (tep_not_null($manufacturers_htc_title_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_array[$language_id])) : strip_tags($manufacturers_name)),
          'manufacturers_htc_desc_tag' => (tep_not_null($manufacturers_htc_desc_array[$language_id]) ? tep_db_prepare_input($manufacturers_htc_desc_array[$language_id]) : $manufacturers_name),
          'manufacturers_htc_keywords_tag' => (tep_not_null($manufacturers_htc_keywords_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_keywords_array[$language_id])) : strip_tags($manufacturers_name)),
          'manufacturers_htc_description' => tep_db_prepare_input($manufacturers_htc_description_array[$language_id]));
         /*** End Header Tags SEO ***/

 

The strip_tags looks to be only difference in admin/manufacturers.php.

 

My hunch is the buggy CKEditor isn't related to the admin/manufacturers.php code, but I wanted get your guidance on that strip_tags matter before going over the admin/categories.php differences. I think I should be using the strip_tags code if I read earlier posts in this topic correctly.

Edited by altoid

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

Hey Jack, I manually installed this onto a already modified 2.3.1 shop. All appears to be working fine but the loading of CKEditor is a little buggy, depending on what settings I use in header tags seo. This caused me to look closer at the admin/categories.php and admin/manufacturers.php files using a file comparison utility. I found a few of what appear to be differences in what the manual install instruction calls for and what the "new_shop_only_2.3" files show.

 

For example from admin/manufacturers.php

 

the manual install instructions call for this around line 56

 

The strip_tags looks to be only difference in admin/manufacturers.php.

 

My hunch is the buggy CKEditor isn't related to the admin/manufacturers.php code, but I wanted get your guidance on that strip_tags matter before going over the admin/categories.php differences. I think I should be using the strip_tags code if I read earlier posts in this topic correctly.

Yes, you are correct. The strip_tags version should be used. Thank you for pointing out this mistake.

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Yes, you are correct. The strip_tags version should be used. Thank you for pointing out this mistake.

 

Thanks for confirming. I will adjust my code accordingly.

 

I have a few more comparisons in admin/categories.php to ask you about, which I will tackle later.

 

As a non coder, I am amazed by amount of work you put into this outstanding add on. Just installing already written code is a task for me, but the hours you put into writing the code/instuctions/documentation must be daunting.

 

Thanks again Jack...I will follow up on that other stuff shortly.

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

Thanks for confirming. I will adjust my code accordingly.

 

I have a few more comparisons in admin/categories.php to ask you about, which I will tackle later.

 

As a non coder, I am amazed by amount of work you put into this outstanding add on. Just installing already written code is a task for me, but the hours you put into writing the code/instuctions/documentation must be daunting.

 

Thanks again Jack...I will follow up on that other stuff shortly.

Please let me know of any mistakes you find. Yes, it has taken a lot of time but, fortunately, I do it for the enjoyument of doing it. :)

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Please let me know of any mistakes you find. Yes, it has taken a lot of time but, fortunately, I do it for the enjoyument of doing it. :)

 

I for one...am glad you do. :)

 

Here's another to look at:

 

In a 2.3.1 shop, the admin/categories.php, about line 668 in the catalog_for_new_shop_only_2.3 folder shows:

 

                <?php 
                 if (HEADER_TAGS_ENABLE_HTML_EDITOR == 'No Editor' || HEADER_TAGS_ENABLE_EDITOR_META_DESC == 'false')
                   echo tep_draw_textarea_field('products_head_desc_tag[' . $languages[$i]['id'] . ']', 'soft', '70', '5', (isset($products_head_desc_tag[$languages[$i]['id']]) ? stripslashes($products_head_desc_tag[$languages[$i]['id']]) : tep_get_products_head_desc_tag($pInfo->products_id, $languages[$i]['id'])));

 

But if I did my manual install correct, the corresponding line in my edited admin/categories.php file shows:

 

                <?php
                 if (HEADER_TAGS_ENABLE_HTML_EDITOR == 'No Editor' || HEADER_TAGS_ENABLE_EDITOR_CATEGORIES == 'false')
                   echo tep_draw_textarea_field('products_head_desc_tag[' . $languages[$i]['id'] . ']', 'soft', '70', '5', (isset($products_head_desc_tag[$languages[$i]['id']]) ? stripslashes($products_head_desc_tag[$languages[$i]['id']]) : tep_get_products_head_desc_tag($pInfo->products_id, $languages[$i]['id'])));

 

This is what I am looking at "HEADER_TAGS_ENABLE_EDITOR_META_DESC"

 

And the admin/categories.php, about line 1121 in the catalog_for_new_shop_only_2.3 folder shows:

 

          /*** Begin Header Tags SEO ***/
         $category_htc_title_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_htc_title_tag[' . $languages[$i]['id'] . ']', tep_get_category_htc_title($cInfo->categories_id, $languages[$i]['id']));
         $category_htc_desc_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_htc_desc_tag[' . $languages[$i]['id'] . ']', tep_get_category_htc_desc($cInfo->categories_id, $languages[$i]['id']));
         $category_htc_keywords_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_htc_keywords_tag[' . $languages[$i]['id'] . ']', tep_get_category_htc_keywords($cInfo->categories_id, $languages[$i]['id']));
         if (HEADER_TAGS_ENABLE_HTML_EDITOR == 'No Editor' || HEADER_TAGS_ENABLE_EDITOR_CATEGORIES == 'false')

 

But in my manual install, it shows:

 

         /*** Begin Header Tags SEO ***/
         $category_htc_title_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_htc_title_tag[' . $languages[$i]['id'] . ']', tep_get_category_htc_title($cInfo->categories_id, $languages[$i]['id']));
         $category_htc_desc_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_htc_desc_tag[' . $languages[$i]['id'] . ']', tep_get_category_htc_desc($cInfo->categories_id, $languages[$i]['id']));
         $category_htc_keywords_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_htc_keywords_tag[' . $languages[$i]['id'] . ']', tep_get_category_htc_keywords($cInfo->categories_id, $languages[$i]['id']));
         if (HEADER_TAGS_ENABLE_HTML_EDITOR == 'No Editor' || HEADER_TAGS_ENABLE_EDITOR_META_DESC == 'false')

 

focusing on the difference in the last line of the code.

 

Again, in hopes my manual install was correct and the file comparison utility is grabbing the correct code to compare.

 

Advice please?

 

Thanks

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

I am back again with a new issue...

 

The header tags seem to be working fine but they are not displaying in the source code. I re-read everything and tried it again and still get the following:

 

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
<title>Default title - Mechanics Tools and Bits</title>
<meta name="Description" content="Default description" >
<meta name="Keywords" content="Default keywords" >
<meta http-equiv="Content-Language" content="en-us" >
<meta name="googlebot" content="all" >
<meta name="robots" content="noodp" >
<meta name="slurp" content="noydir" >
<meta name="revisit-after" content="1 days" >
<meta name="robots" content="index, follow" >

 

Any ideas would be greatly appreciated.

 

Thanks in advance.

Link to comment
Share on other sites

I am back again with a new issue...

 

The header tags seem to be working fine but they are not displaying in the source code. I re-read everything and tried it again and still get the following:

Any ideas would be greatly appreciated.

Did you read the common problems in the test section? Run the test script?

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 weeks later...

Hi There, I am getting the following error message at the top of Header Tags SEO section of the admin panel

 

Warning: call_user_func(header_tags_reset_cache) [function.call-user-func]: First argument is expected to be a valid callback in /catalogue/includes/functions/general.php on line 1277

 

Can anyone help?

Link to comment
Share on other sites

Hi There, I am getting the following error message at the top of Header Tags SEO section of the admin panel

 

Warning: call_user_func(header_tags_reset_cache) [function.call-user-func]: First argument is expected to be a valid callback in /catalogue/includes/functions/general.php on line 1277

 

Can anyone help?

That is usually due to an installation error. You probably didn't make the change to the general.php file or failed to upload the functions file.

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi Jack,

 

This looks like a very useful contribution. I managed to get it installed thanks to the newbie friendly documentation.

 

I ran the test and have one syntax error which I cannot seem to fix.

Parse error: syntax error, unexpected '}' in /home/alarmvib/public_html/admin/categories.php on line 845

 

When I remove the likely '}', I get this error:

Parse error: syntax error, unexpected T_ELSEIF in /home/alarmvib/public_html/admin/categories.php on line 846

---------------------

 

This is the code from the Install_Admin.txt file:

 

FIND (around line 831):

 

<?php

} elseif ($action == 'new_product_preview') {

$product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");

 

REPLACE WITH:

 

<?php /*** Begin Header Tags SEO ***/ ?>

<?php

} elseif ($action == 'new_product_preview') {

$product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");

/*** End Header Tags SEO ***/

 

===============================================

Here is Header Tags code included with some lines above:

 

<script type="text/javascript">

$('#products_date_available').datepicker({

dateFormat: 'yy-mm-dd'

});

</script>

 

</form>

<?php /*** Begin Header Tags SEO ***/ ?>

<?php

}

elseif ($action == 'new_product_preview') {

$product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");

/*** End Header Tags SEO ***/

$product = tep_db_fetch_array($product_query);

 

$pInfo = new objectInfo($product);

$products_image_name = $pInfo->products_image;

 

Looking forward to a fix.

 

Thanks

 

batchos

Link to comment
Share on other sites

Hi Jack,

 

This looks like a very useful contribution. I managed to get it installed thanks to the newbie friendly documentation.

 

I ran the test and have one syntax error which I cannot seem to fix.

Parse error: syntax error, unexpected '}' in /home/alarmvib/public_html/admin/categories.php on line 845

 

As mentioned in the troubleshooting section, there is an included categories.php file that you can use to compare against to find such files.

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I did read the trouble shooting section but didn't understand your reference to an archive "here". Did you mean to include a hyperlink?

 

Thanks

 

batchos

Edited by batchos
Link to comment
Share on other sites

I did read the trouble shooting section but didn't understand your reference to an archive "here". Did you mean to include a hyperlink?

There's a completed set of files included in the contribution package.

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

There's a completed set of files included in the contribution package.

 

 

Okay, I guess you are talking about the clean install folder. Thanks for your help. I'll will use WinMerge to find the syntax error.

 

batchos

Link to comment
Share on other sites

Hello.

 

In google webmastyer tools, google say that i have metadescriptions and title duplicates in product listing pages and in all products pages. For example these pages: /xxxxx/xxxx-xxxxx-c-22_25.html?page=1&sort=2a and /xxxxx/xxxx-xxxxx-c-22_25.html?page=1&sort=2d etc., which are different pages of product listing of a category, have the same metadescription and title. Is there any solution to this problem?

 

Thanks.

Link to comment
Share on other sites

Hello.

 

In google webmastyer tools, google say that i have metadescriptions and title duplicates in product listing pages and in all products pages. For example these pages: /xxxxx/xxxx-xxxxx-c-22_25.html?page=1&sort=2a and /xxxxx/xxxx-xxxxx-c-22_25.html?page=1&sort=2d etc., which are different pages of product listing of a category, have the same metadescription and title. Is there any solution to this problem?

It's not a problem. The description should be the same in that case. Google is just letting you know it exists.

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

 

 

This contribution never had a includes/languages/english/header_tags.php so you must have the Header Tags Controller contribuiton installed, which is a different contribution. To upgrade to Header Tags SEO, you'll need to make some database changes and the file changes in this contribution. Once done, the languages are all handled in admin.

 

 

Yes you are right it is the Tags controller contrib, as i have a multistore set up my stores share a Admin folder, in the controller version it was controlled from includes/header-tags.php which meant i could have seperate overiding data for each of the stores, will i be able to do the same with this contrib?

 

 

I have many thousands of items which all(pretty much all) have different data in

Name (en) Name (FR) HTC title (en) HTC title (FR) HTC description tag (en) HTC description tag (FR) HTC keywords (en) HTC keywords (FR) HTC description (en) HTC description (FR)

for Cats

 

and

Name (en) Name (fr) Description (en) Description (fr) Header title tag (en) Header title tag (fr) Header description tag (en) Header description tag (fr) Header keywords tag (en) Header keywords tag (fr)

for products

 

with all the above in mind will this contib fit in the slot used by the tags controller without to much fuss

 

also how does it handle

.html

.html?language=en

.html?language=fr

 

are these seen as different, are they rewritten?

 

Thank you

 

David

David

Link to comment
Share on other sites

Yes you are right it is the Tags controller contrib, as i have a multistore set up my stores share a Admin folder, in the controller version it was controlled from includes/header-tags.php which meant i could have seperate overiding data for each of the stores, will i be able to do the same with this contrib?

 

also how does it handle

.html

.html?language=en

.html?language=fr

 

are these seen as different, are they rewritten?

The includes/header_tags.php file is still used and you may be able to edit it for your setup but I doubt that the admin control wouldn work properly for the other shops. The Header Tags code could be edited to work directly with it but that isn't something that can be convered in a support thread.

 

The titles and tags can be set for each language in admin.

Support Links:

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

All of My Addons

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