Jump to content
Jack_mcs

Header Tags SEO

Recommended Posts

hi Jack,

I have set the server to linux with the permission of 777 in headertags.php

Now I have the following error:

From Site: 
    Title ->  
    Meta Description ->  
    Meta Keywords ->  
 
  From Settings: 
    Title -> test title 
    Meta Description -> test description 
    Meta Keywords -> test, keywords 
 
  Results of scan: 
    specials.php is missing Header Tags code or it is not installed correctly. Verify that Fill Tags has been ran and that the root checkbox or the default checkboxes have been checked in Page Control. 

Also, it does not matter if I have create a new categorie or product in the admin.

If I look at the page source I only see the title.

 

No description and keywords.

Share this post


Link to post
Share on other sites

@@blaine109 I've installed it into BS shops without any problems. You must have changed some of the code that shouldn't have been changed.

Share this post


Link to post
Share on other sites

@@dinopacha Assuming you are using a standard oscommerce shop, regardless of the version, you can upload the includes/template_top.php and index.php files from the package and see if it works that way. I would try the index.php first and if it is a live shop, I would rename to something like index_test.php so it doesn't disrupt the site. Using those files should help pin down the problem. .

Share this post


Link to post
Share on other sites

Sorry Jack but I have the bootstrap oscommerce verion,

So what Im doing wrong that I can't see the description and keywords????

Share this post


Link to post
Share on other sites

Hello Jack I got it running.

 

I was stupid enough to forget to put in the directory catalog.​

 

I want to thank you for your  support.

friendly regards, :rolleyes:

Share this post


Link to post
Share on other sites

@@Jack_mcs

 

There was an issue with your product_info.php file for the bootstrap version. 

 

Your replacement product_info.php file had an "id" of piGal for the div tag:

<div id="piGal">

In the original bone stock BS file of product_info.php for the image portion it has a "class" of piGal for the div tag:

<div class="piGal pull-right">

There are a total of 2 instances that I found in product_info.php that needs to be revised.  Once the changes were made it worked properly.

 

It was probably a change in the BS file version after you published your addon.

Share this post


Link to post
Share on other sites

Yes, that is a change to the BS version from the one I used. Thanks for reporting it.

Share this post


Link to post
Share on other sites

Jack,

 

Are you going to be adding code for the "Colorbox Script" for the images on the BS platform?  Doesn't look like there's anything in place to fill the alt image tags for any of the images.

Share this post


Link to post
Share on other sites

That is something that should be handled by the shops code, not an addon. It has always been a part of the core code. I just checked it on one of our templates, which doesn't have this addon installed, and on a test shop with does have this addon installed and it is working correctly in both. So it seems something is wrong with shops code. The two I checked may not be the very latest BS version and I suppose something might have been changed in the latest version but it seems unlikely. But you post a question in the general forum, or whenever support for the BS version may be, and ask.

Share this post


Link to post
Share on other sites

Jack,

 

Can you check and confirm if you have an extra opening <div> tag in catalog/includes/modules/content/header/template/logo.php?

 

The stock file opens and closes just a single <div> tags.  The file included in your release opens 4 <div> tags but only closes 3 <div> tags.  Looks like line 3 just has a lonely <div> tag with no class or id assigned to it.

 

I stumbled upon this because I could not get my logo to center like I was wanting it to be.

Share this post


Link to post
Share on other sites

Yes, you are correct. But I think the proper fix is to add another </div> at the end, though I've not tested it.

Share this post


Link to post
Share on other sites

I believe I removed it and rearranged the code to center the logo with the header tags code above the logo.

<div id="storeLogo" class="col-sm-<?php echo $content_width; ?>" style="text-align:center">

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

         <div id="storeLogo" class="center-logo">

              <?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'logo.jpg', (tep_not_null($header_tags_array['logo_text']) ? $header_tags_array['logo_text'] : STORE_NAME)) . '</a>';

              if (HEADER_TAGS_DISPLAY_PAGE_TOP_TITLE == 'true') { ?>

                  <div style="position:absolute; top:0; left:40%; color:#777; font-size:10px;text-align:center"><?php echo $header_tags_array['title']; ?></div>

              <?php } ?>

         </div>

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

</div>

If anyone is curious how to center the logo you have to add the following to user.css and add the class "center-logo" to the div tag that encloses the logo code:

.center-logo {

    margin-left: auto;

    margin-right: auto;

    width: 50%;

}

Share this post


Link to post
Share on other sites

Jack,

 

I have a question about the breadcrumbs.  I have installed a contribution called "ask_a_question" where the product_id is set in the URL.  In the older version of your contribution, the breadcrumb code in application_top is as follows:

 

 

$breadcrumb->add($products['products_head_title_tag'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $_GET['products_id']));

 

In the latest version the code is as follows:

 

$breadcrumb->add($title, tep_href_link(basename($_SERVER['SCRIPT_FILENAME']), $args));

 

My issue is that since the product_id is set and it is not for product_info.php the link for the bread crumb is not being generated correctly for the non product_info.php page.

 

Do you forsee any issue modifying the code to:

 

$breadcrumb->add($title, tep_href_link(FILENAME_PRODUCT_INFO, $args));

 

I have made that change and the breadcrums is working properly now for the new page that uses the product_id in the URL and so far it doesn't seem like there are any issues with it.

Share this post


Link to post
Share on other sites

As long as the code you are changing only deals with the product page it should be OK, from what you've posted.

Share this post


Link to post
Share on other sites

I think I've missed something somewhere. My product description tags are showing the same thing as my title tag. Where to I set this to show the name of the product - category - then the actual description?

Share this post


Link to post
Share on other sites

@ It's not clear to me where you want that to show but I think you mean the meta description. In that case, you can't do that via the settings. You can almost do it for the title by checking the category check box in Page Control for product_info.php. In the product edit page, you can set the description to the way you describe but it has to be done manually.

Share this post


Link to post
Share on other sites

File - product_info.php

FIND (around line 24):
  require(DIR_WS_INCLUDES . 'template_top.php');

ADD BENEATH:
  /*** Begin Header Tags SEO ***/
  echo "<a name=\"\$header_tags_array['title']\"></a>";
  /*** End Header Tags SEO ***/

There is an error in the addon code,

 

this line will not work  correctly:

echo "<a name=\"\$header_tags_array['title']\"></a>";

it should be

echo "<a name=\"" . $header_tags_array['title'] . "\"></a>";

am I wrong?
 


My addons:

Content Templates Manager :  http://addons.oscommerce.com/info/9288

Admin side horizontal no javascript css menu: http://addons.oscommerce.com/info/8830

osCommerce Pagination using FOUND_ROWS: http://addons.oscommerce.com/info/9378

 

 

 

 

Share this post


Link to post
Share on other sites

They are just different ways of writing it. Both will work, though yours is a longer version. It could also be

?><a name="<?php echo $header_tags_array['title']; ?>"></a><?php

Share this post


Link to post
Share on other sites

They are just different ways of writing it. Both will work, though yours is a longer version. It could also be

?><a name="<?php echo $header_tags_array['title']; ?>"></a><?php

May be, I have not set some setting in php.ini, because of when I use this way

echo "<a name=\"\$header_tags_array['title']\"></a>";

I have variable name in the html output:

<a name="$header_tags_array['title']">...

not the variable value - htc title of the product.


My addons:

Content Templates Manager :  http://addons.oscommerce.com/info/9288

Admin side horizontal no javascript css menu: http://addons.oscommerce.com/info/8830

osCommerce Pagination using FOUND_ROWS: http://addons.oscommerce.com/info/9378

 

 

 

 

Share this post


Link to post
Share on other sites

I've installed this addon in a lot of shops and never had that problem so I can't say why it won't work for you. But if your version of the code works, then you should use it.

Edited by Jack_mcs

Share this post


Link to post
Share on other sites

I've updated my shop to osCommerce 2.3.4 BS.  What a improvement from RC2. I then installed Header Tags SEO. Everything seemed to go fine until I noticed I have duplicates (2) of all the Header Tag SEO items in the Configuration menu in admin section. I checked the database for duplicates and the issue doesn't seem to be coming from there. From what I can tell everything looks to working on the site except the Header Tags Configuration menu anomaly.

 

When installing Header Tags SEO, first I ran the headertags_seo_install.php,  then the headertags_seo_update.php, both successful.  I then copied both bootstrap folders, catalog and catalog_only_new_files.

 

Any ideas where I went wrong or what could be causing this.

 

Thanks

Share this post


Link to post
Share on other sites

The headertags_seo_install.php is for a new installation. The headertags_seo_update.php is for updating an existing installation. Since you ran them both, the configuration settings were duplicated. To fix it, if you haven't spent much time on setting up the titles and tags, run headertags_seo_uninstall.php and then headertags_seo_install.php. If you have, run headertags_seo_update.php again but do it like this: http://your domain name/headertags_seo_update.php?reset_options=true

Share this post


Link to post
Share on other sites

Jack, Thanks for your support and all your efforts. I ran headertags_seo_update.php?reset_options=true as you suggested and the problem is solved.

 

Again, Thanks for your help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×