Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header Tags SEO


Jack_mcs

Recommended Posts

I see DB in the top left corner?
Then it appears the data is not being read from the database. All I can think of is that the language option on the shop does not match that stored in the database. So if you have the language on the shop set to english and the database language option is set to use german, the english information would be missing. I can't imagine how that would happen but it is the only thing I can think to suggest. If that isn't it, I'm afraid your problem is beyond what can be done in a forum setting.

 

Jack

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

Then it appears the data is not being read from the database. All I can think of is that the language option on the shop does not match that stored in the database. So if you have the language on the shop set to english and the database language option is set to use german, the english information would be missing. I can't imagine how that would happen but it is the only thing I can think to suggest. If that isn't it, I'm afraid your problem is beyond what can be done in a forum setting.

 

Jack

 

 

I have swedish and danish langues in my shop, my database.. I guess that is in english.

So, what you are saying is that, I cannot use this contribut because of that?

 

Thanks for your time

 

Christina

Link to comment
Share on other sites

I have swedish and danish langues in my shop, my database.. I guess that is in english.

So, what you are saying is that, I cannot use this contribut because of that?

 

Thanks for your time

 

Christina

Header Tags will work with any oscommerce shop but some take extra tweaking. If you look in the headertags table in the database, there will be an entry for index.php, as you found earlier. There will also be a language column for that entry. If the language column is set to language ID of 1 (whatever that is) and your shop uses language ID of 2, then they don't match and the data won't load. You need to make sure they match. it should happen automatically but perhaps your shop is set up in such a way that the code fails. This may not be the problem at all but it is what I would look at next.

 

Jack

Edited by Jack_mcs

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

Ok, I just installed this fantastic contrib, but I have a couple of problems. :unsure:

 

1) I get this error:

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/content/b/l/a/blackphi/html/includes/database_tables.php:176) in /home/content/b/l/a/blackphi/html/includes/functions/sessions.php on line 97

 

My solution (please tell me if this is OK or what I did, all I know is that it made the error stop, but I have NO idea what the consequence of doing this is):

I went into sessions.php and added "//" before:

return session_start();

AND

return session_register($variable);

 

2) Breadcrumb isn't working, neither at the top of the page, or at the bottom when I added the currently viewing part of the contribution.

Please see an example here: [url="http://www.stinks (THE WORD "AND" GOES HERE) things.com/shocking-cell-phone-p-64.html

Edited by fillthemup
Link to comment
Share on other sites

Jack.. I did add sort numbers and they had no effect.. not until I changed the code from this (in catalog/includes/header_tags.php) did it finally work as it should.. with still a slight hiccup in the admin section with respect to sort orders (below)

 

// ALL OTHER PAGES NOT DEFINED ABOVE
 default:
$header_tags_array['title'] = tep_db_prepare_input($defaultTags['default_title']);
$header_tags_array['desc'] = tep_db_prepare_input($defaultTags['default_description']);
$header_tags_array['keywords'] = tep_db_prepare_input($defaultTags['default_keywords']);
break;
 }

 

to this

 

// ALL OTHER PAGES NOT DEFINED ABOVE
 default:
$pageTags_query = tep_db_query("select * from " . TABLE_HEADERTAGS . " where page_name like '" . basename($PHP_SELF) . "' and language_id = '" . (int)$languages_id . "'");
$pageTags = tep_db_fetch_array($pageTags_query);  

$sortOrder['title'][0] = $pageTags['page_title'];
$sortOrder['description'][0] = $pageTags['page_description']; 
$sortOrder['keywords'][0] = $pageTags['page_keywords'];
$sortOrder['logo'][0] = $pageTags['page_logo']; 

if ($pageTags['append_default_title'] && tep_not_null($tmpTags['def_title'])) $sortOrder['title'][$pageTags['sortorder_title']] = $tmpTags['def_title'];
if ($pageTags['append_default_description'] && tep_not_null($tmpTags['def_desc'])) $sortOrder['description'][$pageTags['sortorder_description']] = $tmpTags['def_desc'];
if ($pageTags['append_default_keywords'] && tep_not_null($tmpTags['def_keywords'])) $sortOrder['keywords'][$pageTags['sortorder_keywords']] = $tmpTags['def_keywords'];
if ($pageTags['append_default_logo'] && tep_not_null($tmpTags['def_logo_text']))  $sortOrder['logo'][$pageTags['sortorder_logo']] = $tmpTags['def_logo_text'];

FillHeaderTagsArray($header_tags_array, $sortOrder);  
break;
 }

 

 

As for the sort orders.. I get these errors..

 

Error Duplicate sort orders are not allowed -> buy.php

Error Duplicate sort orders are not allowed -> buy.php

Error Duplicate sort orders are not allowed -> buy.php

 

I put in a sort order of 2 for the title and sort order of 2 for description.. I dont see why this is a problem..

 

However, with the change in code above.. specific page titles are now being appended by the default page titles.. this wasnt happening before..

 

 

Forum,

Just run headertags_seo_install.php in the root on my site (the same as index.php) and it came up with the following error:

error1060 - Duplicate column name 'categories_htc_title_tag'

 

ALTER TABLE categories_description ADD categories_htc_title_tag VARCHAR(80) NULL;

 

[TEP STOP]

 

I have stopped loading the program, is there something I should do to resolve this problem or continue with the install?

Running sts4.5.8 and have not got to catalog install part 1a yet.

Link to comment
Share on other sites

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

Sorry for not being clearer - it was VERY late here when I posted.

 

I modified the code in the header_tags_social_bookmarks.php file to display "Add [product name] to:" and then the social bookmark images. [product name] is a clickable link in the same way that your "Currently Viewing: [product name]" is.

 

I added this to line 4 of header_tags_social_bookmarks.php:

$PROD = $_SERVER["REQUEST_URI"];

I then added this to line 10 of header_tags_social_bookmarks.php to display "Add [product name] to:" (before the social bookmark images):

  <td style="font-family: Arial, Helvetica, sans-serif; font-size: smaller;">Add <a href="<?php echo $PROD ?>"><?php echo $NAME ?></a> to:</td>

I also found that if I used this code in products_info.php for "Currently Viewing: [product name]" it would work as it should in STS:

      <?php /*** Begin Header Tags SEO ***/ ?>
     <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>
     <?php /*** End Header Tags SEO ***/ ?>

I hope this makes sense now...

 

Regards, Owen.

Link to comment
Share on other sites

Ok, I just installed this fantastic contrib, but I have a couple of problems. :unsure:

 

1) I get this error:

 

My solution (please tell me if this is OK or what I did, all I know is that it made the error stop, but I have NO idea what the consequence of doing this is):

I went into sessions.php and added "//" before:

return session_start();

AND

return session_register($variable);

 

2) Breadcrumb isn't working, neither at the top of the page, or at the bottom when I added the currently viewing part of the contribution.

Please see an example here: [url="http://www.stinks (THE WORD "AND" GOES HERE) things.com/shocking-cell-phone-p-64.html

1 - No, you don't want to do that. See the link in my signature for the correct fix.

 

2 - I see the breadcrumb changing but I also see some pages not having the correct titles. Did you run fill tags? If you are using STS, try turning it off to see if Header Tags works correctly.

 

Jack

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

Forum,

Just run headertags_seo_install.php in the root on my site (the same as index.php) and it came up with the following error:

error1060 - Duplicate column name 'categories_htc_title_tag'

 

ALTER TABLE categories_description ADD categories_htc_title_tag VARCHAR(80) NULL;

 

[TEP STOP]

 

I have stopped loading the program, is there something I should do to resolve this problem or continue with the install?

Running sts4.5.8 and have not got to catalog install part 1a yet.

That error means you already had, at least, some of the database changes made. You can run the uninstall script and then the install again but you really should find out why that was already installed since it might be used by some other contribution.

 

Jack

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

Thanks for posting the code.

 

Jack

 

Could be I forgot the write down the first message and clicked the run again to get the mesage again to post!

Is that reasonable?

Question is how to proceed?

Auzy Jack

Link to comment
Share on other sites

Just found this in Index.php under root directory, I,m sorry I did not look before I started so I do not know when or where it was added? Also I think there is another index.php added by sts but the install txt was not clear to where it should be installed?

 

<?php

if (isset($cPath) && strpos('_', $cPath)) {

// check to see if there are deeper categories within the current category

$category_links = array_reverse($cPath_array);

for($i=0, $n=sizeof($category_links); $i<$n; $i++) {

$categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");

$categories = tep_db_fetch_array($categories_query);

if ($categories['total'] < 1) {

// do nothing, go through the loop

} else {

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");

break; // we've found the deepest category the customer is in

}

}

} else {

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");

}

 

$number_of_categories = tep_db_num_rows($categories_query);

 

$rows = 0;

while ($categories = tep_db_fetch_array($categories_query)) {

$rows++;

$cPath_new = tep_get_path($categories['categories_id']);

$width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';

echo ' <td align="center" class="smallText" width="' . $width . '" valign="top"><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) . '<br>' . $categories['categories_name'] . '</a></td>' . "\n";

if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {

echo ' </tr>' . "\n";

echo ' <tr>' . "\n";

}

}

 

// needed for the new products module shown below

$new_products_category_id = $current_category_id;

?>

Link to comment
Share on other sites

Could be I forgot the write down the first message and clicked the run again to get the mesage again to post!

Is that reasonable?

Question is how to proceed?

Auzy Jack

yes, that is possible. In that case you can proceed or run the uninstall first.

 

Jack

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

A new version has been uploaded. It contains these changes:

 

-> Changed code in admin/header_tags_fill_tags.php, admin/categories.php and admin/manufacturers.php to remove html code from title and meta keyword tag.

-> Added includes/application_top file to the pre-made files.

 

If you have html in your title or keywords tag, go to admin->Header Tags SEO->Fill Tags and run that script for whichever section you want to remove them from. After that, the code in admin will strip such tags automatically should they be entered.

 

Jack

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

1 - No, you don't want to do that. See the link in my signature for the correct fix.

Perfect fix :) There was 2 lines of nothing at the end of database_tables that fixed this right up :)

 

2 - I see the breadcrumb changing but I also see some pages not having the correct titles. Did you run fill tags? If you are using STS, try turning it off to see if Header Tags works correctly.

I haven't installed the admin section yet, I wanted to get these bugs fixed first. The breadcrumb categories only works correctly if I leave my current code in (if I overwrite it with the code given to me in install_catalog, it stops working and shows up blank. The product name doesn't work at all :(. Here is my original code for the breadcrumb category:

// add category names or the manufacturer name to the breadcrumb trail

if (isset($cPath_array)) {

for ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) {

$categories_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$cPath_array[$i] . "' and language_id = '" . (int)$languages_id . "'");

if (tep_db_num_rows($categories_query) > 0) {

$categories = tep_db_fetch_array($categories_query);

$breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1)))));

} else {

break;

}

}

} elseif (isset($HTTP_GET_VARS['manufacturers_id'])) {

$manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");

if (tep_db_num_rows($manufacturers_query)) {

$manufacturers = tep_db_fetch_array($manufacturers_query);

$breadcrumb->add($manufacturers['manufacturers_name'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id']));

}

}

 

Thank you for your prompt response:)

Link to comment
Share on other sites

I haven't installed the admin section yet, I wanted to get these bugs fixed first. The breadcrumb categories only works correctly if I leave my current code in (if I overwrite it with the code given to me in install_catalog, it stops working and shows up blank. The product name doesn't work at all :(. Here is my original code for the breadcrumb category:

The new breadcrumb code uses the header tags titles as set up by fill tags. You haven't ran fill tags so there isn't anything to display.

 

Jack

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 All,

 

I tried to search this thread for an answer, but haven't had any success yet.

 

I just downloaded and attempted the install for V3.0.3, and got the following error when executing the first step

 

1060 - Duplicate column name 'categories_htc_title_tag'

 

ALTER TABLE categories_description ADD categories_htc_title_tag VARCHAR(80) NULL;

 

[TEP STOP]

 

I saw a single post and response to this question, that was quite old, so I thought I would see if there's any updated suggestions or information about this.

 

I am using CRE Loaded version of OSC. I understand this is a pretty heavily modded version, but hopefully someone can point me in the right direction?

 

Thanks,

Chris Hackett

Link to comment
Share on other sites

Hi All,

I am using CRE Loaded version of OSC. I understand this is a pretty heavily modded version, but hopefully someone can point me in the right direction?

CRE has theheader Tags Controller contribution installed so you will either need to use the uninstall and then install scripts or use the update one.

 

Jack

Edited by Jack_mcs

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

Does Header Tags SEO work with easy populate contribution ? Or we must wait for new version that will be cooperate with Header Tags SEO ?
Easy Populate has always had an option to work with Header Tags. You just need to enable it in the easy populate file.

 

Jack

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

Header Tags will work with any oscommerce shop but some take extra tweaking. If you look in the headertags table in the database, there will be an entry for index.php, as you found earlier. There will also be a language column for that entry. If the language column is set to language ID of 1 (whatever that is) and your shop uses language ID of 2, then they don't match and the data won't load. You need to make sure they match. it should happen automatically but perhaps your shop is set up in such a way that the code fails. This may not be the problem at all but it is what I would look at next.

 

Jack

 

I am not sure I understand what you mean.. <_< .. maybe it is better just to try another contribut..

Can you recoment another contribut I can try insted?

Thank you for your help

Sincerly Christina

;)

Link to comment
Share on other sites

CRE has theheader Tags Controller contribution installed so you will either need to use the uninstall and then install scripts or use the update one.

 

Jack

 

Thanks for the quick response. It seems that I've totally hosed up my account while trying to install this. Fortunately I have a full back up from yesterday. I'll figure out how to restore, and then give this another go.

 

When you say that I should use "the updated one," can you help me understand the updated version of what? Header Tags Controller contrib?

 

Sorry to be so uninformed about this.

 

Thanks,

Chris

Link to comment
Share on other sites

I am not sure I understand what you mean.. <_< .. maybe it is better just to try another contribut..

Can you recoment another contribut I can try insted?

Thank you for your help

Sincerly Christina

;)

There are quite a few meta tags contributions. This thread mentions most, if not all. They are all basically the same and won't provide the results that Header Tags SEO will but they are easier to install.

 

Jack

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

Thanks for the quick response. It seems that I've totally hosed up my account while trying to install this. Fortunately I have a full back up from yesterday. I'll figure out how to restore, and then give this another go.

 

When you say that I should use "the updated one," can you help me understand the updated version of what? Header Tags Controller contrib?

 

Sorry to be so uninformed about this.

 

Thanks,

Chris

There is a directory in this package named Database_Files. In that directory, there is a file named headertags_seo_update.php. It just contains the new database entries used by this contribution.

 

Jack

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