Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header Tags SEO


Jack_mcs

Recommended Posts

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

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

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

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

 

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.

Link to comment
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.

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,

 

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.

Link to comment
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%;

}
Link to comment
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.

Link to comment
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.

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

  • 4 weeks later...

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

 

 

 

 

Link to comment
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

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

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

 

 

 

 

Link to comment
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

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

  • 4 weeks later...

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

Link to comment
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

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

  • 3 weeks later...

@@Jack_mcs Hi Jack,

 

Spending some time trying to boost my SEO, and have noticed something:

 

I have added Header Tags Categories Description to my categories (the large box at the bottom) and it only appears on the lowest level category and not its parents - where is the code located that adds this below the category titles? as I may have accidently removed it when carrying out changes to my site.

 

eg:

 

Home Page

Category: Clothing (does not show)

Child Category: Mens (does not show)

Grandchild: Trousers (Description shows)

 

Many Thanks

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

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