Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header Tags SEO


Jack_mcs

Recommended Posts

This addon doesn't change either of the functions you mention. It also shouldn't cause a failure when you first go to admin unless you've made a mistake in the includes/column_left.php file. If you changed that file and your shops version doesn't use entries in that file, then that is why it fails. You can try replacing that file with your original. If that doesn't do it, see if there is an error in the error_log file in admin (or vice versa).

 

Think i gonna start a fresh on the admin changes as when I used the original /column_left.php I got the same error but for another file. Fingers crossed...lol

Complete Newbie On The Learn - Not A Programmer

But Learning As I Go

Link to comment
Share on other sites

This addon doesn't change either of the functions you mention. It also shouldn't cause a failure when you first go to admin unless you've made a mistake in the includes/column_left.php file. If you changed that file and your shops version doesn't use entries in that file, then that is why it fails. You can try replacing that file with your original. If that doesn't do it, see if there is an error in the error_log file in admin (or vice versa).

 

Just wanting to get this right....I have restored all the admin files back to pre changes I made. And wanted to check something. Despite going back to pre changes I am still seeing changes to do with this add-on, mainly on the left menu in admin. I have attached an image and was just wondering if someone could tell me if this is expected (through sql changes etc) or have I missed a file to restore?

 

http://www.raunchyrags.co.uk/boxheaders.jpg

Edited by toyzonline

Complete Newbie On The Learn - Not A Programmer

But Learning As I Go

Link to comment
Share on other sites

Ok well I now have a working install of this add-on. I do have one problem though when I click on admin>catagories I get a blank page.

 

Now after reading this thread I uploaded the catagories.php file included in the add-on download and all is fine. Having gone through the changes to the file again I am confident I have made no errors.

 

This leads me to the question of whether this contribution is compatible with the Extra Fields Contribution? I am guessing that this should be able to work as the only conflict is in the catagories file and is to do with the actual showing of the the fields within the admin for both add ons. As in when I uploaded the catagories.php from the HEO add-on despite the extra fields input fields not being shown on the products etc the live output is still working

 

Any ideas would be great?

 

I am using OSC2.3.4

 

The closest conflict in the code was:

 

 

FIND (around line 448):

    if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {
      $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");

REPLACE WITH:

    if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {
    /*** Begin Header Tags SEO ***/
      $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_head_title_tag,pd.products_head_title_tag_alt, pd.products_head_title_tag_url, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_head_breadcrumb_text, pd.products_head_listing_text, pd.products_head_sub_text, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
    /*** End Header Tags SEO ***/

 

the code stated to change had some extra field code inserted between the lines to amend so my lines of code now look like:

if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {
// BOF Extra Fields Contribution	  
      $products_extra_fields_query = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " WHERE products_id=" . (int)$HTTP_GET_VARS['pID']);
      while ($products_extra_fields = tep_db_fetch_array($products_extra_fields_query)) {
        $extra_field[$products_extra_fields['products_extra_fields_id']] = $products_extra_fields['products_extra_fields_value'];
      }
	  $extra_field_array=array('extra_field'=>$extra_field);
	  $pInfo->objectInfo($extra_field_array);
// EOF Extra Fields Contribution
      /*** Begin Header Tags SEO ***/
      $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_head_title_tag,pd.products_head_title_tag_alt, pd.products_head_title_tag_url, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_head_breadcrumb_text, pd.products_head_listing_text, pd.products_head_sub_text, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
    /*** End Header Tags SEO ***/

Complete Newbie On The Learn - Not A Programmer

But Learning As I Go

Link to comment
Share on other sites

Yes, it is compatible with any addon except another meta tags addon. But you have to properly merge the code. Replacing the file will work but you will lose whatever changes you had made to the file, like Extra Fields.

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

Yes, it is compatible with any addon except another meta tags addon. But you have to properly merge the code. Replacing the file will work but you will lose whatever changes you had made to the file, like Extra Fields.

 

Would it be just the code I highlighted above that would have to be merged (guessing as the outcome of both contributions work fine side by side just not the designed input fields in the catagories)?

Complete Newbie On The Learn - Not A Programmer

But Learning As I Go

Link to comment
Share on other sites

I'm not familiar with the extra fields addon, other than to know it exists, but my guess is that there are several other changes needed beyond what you posted. The best way to work on something like that is to use one of the compare programs, like WinMerge.

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 think I read the entire thread on this topic, but I cannot remember if this was asked. I have FWR SEO URLS 5 installed on a HEAVILY modified osc 2.??? store. Working right now as anticipated. I would like to install the Header Tags SEO contribution. 

 

The question I have is this: Should I uninstall URLS 5 and install the Ultimate SEO 2-2.2d-13 first? 

 

Thanks in advance for your answers!

Link to comment
Share on other sites

This addon will work with SEO 5 except for the option to change the url's via Header Tags SEO. If you don't want/need that option, then you don't need to change.

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

Yes, it is compatible but you can't just copy files. You either need to compare the files with a program like WinMerge or follow the manual installation instructions.

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_mcs

 

Hi Jack! 

First big thank you for the add-on! 

I am trying to install the add-on and I'm half way the install. I have just reached the part where I should see: 'Replace me in Page content.'. 

I actually see this title but the page itself is blank. This points out a php error no? 

 

Any idea how to fix this? 

 

Dear regards, 

 

Ben 

post-333031-0-26208800-1421160490_thumb.png

Link to comment
Share on other sites

As you say, there is some error. Take a look in the root directory and see if there is an error_log file. If there is, it might indicated the problem. You can also upload your original index file and then make the changes to it one at a time until it fails. There is also an included index file that may not match yours but should help to find the problem if you compare it with yours using a program like WinMerge.

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'm working with a very old version of "header tag controller" .  The version I have has 3 columns in products_description in the database:

products_head_title_tag

products_head_description_tag

products_head_keywords_tag

 

I am upgrading to osc 2.3.4 and want to use the information already in the data base. 

 

I am sure others have been through this - but  google is letting me down - can someone point me to the threads on this.

 

I think Header Tags SEO creates database entries just the same - I know enough sql to migrate the text. 

 

I don't want to use the first x words as the meta description.

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

The first panacea for a mismanaged nation is inflation

of the currency; the second is war. Both bring a
temporary prosperity; both bring permanent ruin.
Ernest Hemingway
------------------------------------------------------------------------

Link to comment
Share on other sites

Those fields are the same as in Header Tags SEO. Their sizes have changed to be more efficient but it is not necessary to make that change, though it is helpful and you won't lose any data.

 

However, new fields have been added. The best thing to do is to delete any of the tables starting with header_tags, if any exists. Then upload and run the headertags_seo_update.php file. That will replace the tables just deleted with the proper ones, update the categories, manufacturers and products tables while leaving the data theire alone and add the settings.

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

We seem to be missing each other -  this isn't what I see when I look at the code - It seems to be looking for

 

head_title

'head_description' 

'head_keywords'

 

 

In the table 'products_description' I have:

products_head_title_tag

products_head_description_tag

products_head_keywords_tag

 

Let me ask this a different way - does this use the columns I have - or ones with different names?

 

I am thinking that there is a confusion with the table 'products_description' having columns named products_head_description_tag verses a column named head_discription ?

 

What I have is from HeaderTags_V_2.5.9

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

The first panacea for a mismanaged nation is inflation

of the currency; the second is war. Both bring a
temporary prosperity; both bring permanent ruin.
Ernest Hemingway
------------------------------------------------------------------------

Link to comment
Share on other sites

As mentioned, those names have not changed. I kept them the same so that shops using the Header Tags Controller could easily upgrade. I suspect you may be looking at the fields that are part of something added by oscommerce 2.3 or some other addon. Those are completely different and not used by this addon. If you are using this addon, the procedure I mentioned for upgrading is 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

  • 2 weeks later...

I've just installed on a HEAVILY modified osc store. I think all is well to this point but on my category and manufacturer pages I'm missing the title. It appears as though <h1><?php echo $htc['htc_title']; ?></h1> is showing a blank. 

 

When I look at it via inspect element in chrome there is just a <h1></h1>

 

Did I miss something in the instructions? Any way to tell what I did miss?

Also, I had major issues using the database install and did most of it manually, I am not sure if I missed something there. 

Link to comment
Share on other sites

You probably haven't checked the category and manufacturer boxes for the index.php file in Page Control.

 

No one has ever reported problems with the install script. What kind of problems did you have?

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, 

 

The install file threw me some duplicate table errors, looks like I must have tried to install this quite some time ago and left a couple tables when I didn't use it. No problem really, I believe I was able to get all the tables in there. 

 

I have a ton of addons in the code so it took some time to get just the right code in for this to work (had to compare every line of the install instructions in beyond compare just to make sure I didn't break anything). I am still not sure I did everything correctly. 

 

I had not worked on the admin side of things when I noticed the empty titles. I am finishing it up today. I'll let you know if your suggestion brings the titles back. 

 

Thanks for being so attentive and supportive of your contributions. I really appreciate all your work. 

Link to comment
Share on other sites

Titles are working. I have an issue with one of the pages I made, it is showing up in the fill tags but when I fill the tags with the information I want it is not updating on the page, it's just showing the default. I will take some time and look at it later to see if I can diagnose the problem. 

Link to comment
Share on other sites

Looks like all my pages are not working with the page control, I can't seem to get them off the default.

 

I've checked that the header_tags.php is writeable and the code is in the pages.

 

When I go to edit the page tags again in the page control the information I entered is there, it's just not showing on the individual pages. 

 

Also, the advanced_search_results page is not available to edit the tags for. This could be that I did not have the default <?php  echo HEADING_TITLE_2; ?> in there. I had this: <?php  echo sprintf(HEADING_TITLE_2, htmlspecialchars(StripSlashes(@$_GET["keywords"]))); ?> and I didn't want to lose that on the page. It is showing the default tags, which is fine I guess but I'd love for it to show something like "Website Search Results for Keyword"

Link to comment
Share on other sites

Header Tags SEO will only recognize a page if it is an oscommerce-type page. That means there needs to be an entry in the filenames.php file for it and a file by the same name in the English (or your language) directory.

 

There is a list of files in the admin/includes/functions/header_tags.php file that are blocked. The advanced_search_result.php is one of those. The reason they are blocked is because the search engines can't get to them so it is a waste of time to setup titles for them. You can do that using the language file for it or remove it from that list.

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

Hmmm, I checked and I have the files in filenames.php and in the english folder. 

 

I have this at the top of the page:

<?php
	/*
  $Id: artist.php,v 1.22 2003/06/05 23:26:22 hpdl Exp $
  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com
  Copyright (c) 2003 osCommerce
  Released under the GNU General Public License
*/
	require('includes/application_top.php');
	require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ARTIST);
	$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ARTIST));
	?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php  echo HTML_PARAMS; ?>>

Did I miss something in the installation? 

 

includes/header_tags.php has this in it, so it's working somewhere, just not on that page. 

// artist.php
  case (basename($_SERVER['SCRIPT_FILENAME']) === FILENAME_ARTIST):
    if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['SCRIPT_FILENAME']), '')) {
      $header_tags_array = tep_header_tag_page(FILENAME_ARTIST);
      WriteCacheHeaderTags($header_tags_array, basename($_SERVER['SCRIPT_FILENAME']), '');
    }
  break;

Edited by queenzukie
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...