Jump to content
Jack_mcs

Header Tags SEO

Recommended Posts

Any one have an issue with X-Sell and this contribution? I can't install this contrib because it wants me to change X-Sell code and I don't know where to begin with infusing the two!

Edited by MarcellaE

Share this post


Link to post
Share on other sites

It works fine with that addon (any addon other than another meta tag one) but you have to merge the changes for this one and that one together..

Share this post


Link to post
Share on other sites

Hello

After installing the HTS V 3331 I get the following error: 

 

Parse error: syntax error, unexpected T_BREAK, expecting ',' or ')' in /home/my_site/www/includes/modules/product_listing.php on line 99 

 

Can somebody explain to me what I done wrong?

 

Thank you in advance

Share this post


Link to post
Share on other sites

It means there is a mistake with the change you made to the includes/modules/product_listing.php file. With so many variations of that file, it is difficult to say exactly what it is. Please post the file, with the changes in it, here and I will take a look.

Share this post


Link to post
Share on other sites

Hello Jack,

 

When I started with osCommerce 2.2 I had installed your addon and I love it.

 

Now I have osCommerce 2.3.4 Bootstrap from Gary Burton and after I have installed your Header Tags SEO I get a warning when I hit Page Control: Page not added - file name is invalid - opensearch.php exclude

 

Nothing happens when I hit exclude ?

 

I'm not sure what to do: delete the file from Header Tags or?

Share this post


Link to post
Share on other sites

That just means the file is not setup to work with Header Tags SEO. Sometimes a file should be but not that one so nothing needs to be done with it. Clicking on the exclude link should tell Header Tags to ignore it and remove it from the display in Page Control. The only reason I can think that that may not work is if your server doesn't allow automatic creation of files. You can try creating a file named headertags_seo_excludes.txt and place it into the admin/includes/ directory. Then try using the exclude link. If it works, that is what it was. If not, I don't know what it might be. I did test it here in a BS shop and it worked as expected.

Share this post


Link to post
Share on other sites

I have made a header_tags_seo_excludes.txt (I have put in opensearch.php) but it didn't help...I think I will reïnstall the admin part.

 

At a closer look to headertags_seo_exclude.php I see that the name must be headertags_seo_excludes.txt...and that did the trick.

 

Thanks Jack.

Share this post


Link to post
Share on other sites

Hello Jack,

 

I discovered a bug/fault in product-info.php:

 

118 or about:   

 

you have:     <div id="piGal" data-imgcount="<?php echo $photoset_layout; ?>">

It should be:

 

  <div class="piGal pull-right" data-imgcount="<?php echo $photoset_layout; ?>">

 

Also in include/modules/comntent/header/templates: logo .php:

You have: 3:

<div><div id="storeLogo">

 

it should be:

<div id="storeLogo">

 

Which version of oscommerce bootstrap you used? I use this:

https://github.com/gburton/Responsive-osCommerce

Share this post


Link to post
Share on other sites

Also, question in regard of Gary, is it possible to put this addon in a module, so no core changes needed?

Share this post


Link to post
Share on other sites

I forgot to mention that you seem to have a different prodict-info.php than the bootstrap version...

117 or about: <div id="piGal" data-imgcount="<?php echo $photoset_layout; ?>">

Should be:

    <div class="piGal pull-right" data-imgcount="<?php echo $photoset_layout; ?>">

Share this post


Link to post
Share on other sites

There's no way for me to provide current pages for every version that comes along. Well, there is if I want to just work on this addon and nothing else. Since the BS version isn't really a supported oscommerce version and can change daily, I just don't have the time to try to keep up with it. Hopefully posts like yours will other others with their installations.

Share this post


Link to post
Share on other sites

Hi,

Does anyone have an idea on what might be causing a "404 Not found"?

 

"The requested URL /test-category-c-30.html was not found on this server."

"The requested URL /test-product-p-43.html was not found on this server."

 

Running the addon in admin seems to work perfectly fine and no errors are thrown so I'm quite confused.

 

Thanks.

 

//////////////////////////////

 

EDIT.

Sorry for taking up your time.

Looks like there were some mistakes in my htaccess file.

Edited by Nepto

Share this post


Link to post
Share on other sites

Hi, I would add HeaderTags SEO V. 3.3.3.1 in an existing site, to improve its SEO.

I'm following the useful guide step by step, but I've found an instruction that I can't follow without php mistakes! :wacko:

 

This is the passage I'm talking about:

 

in the product_reviews_info.php

 

(...)

 

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

ADD BENEATH:
<?php /*** Begin Header Tags SEO ***/
  <a name="<?php echo $header_tags_array['title']; ?>"></a>
  $review['products_name'] = $header_tags_array['title_alt'];

  if (tep_not_null($review['products_model'])) {
    $products_name = $review['products_name'] . '<br><span class="smallText">[' . $review['products_model'] . ']</span>';
  } else {
    $products_name = $review['products_name'];
  }
  /*** End Header Tags SEO ***/
<?php /*** End Header Tags SEO ***/ ?>
 

 

When I try to add beneath with copy and paste method I get many php errors... Could you help me, please?

 

thanks, cheers

Share this post


Link to post
Share on other sites

There is an included file already edited. It may not match your version so you may not be able to use it directly but you can use a program like Winmerge to compare the two.

Share this post


Link to post
Share on other sites

Hi, thanks for your answer: I'm afraid there are issues because of the theme installed (dresscode)...

I don't know how to edit some files already edited in many different ways compared to the original OSC... :(

Share this post


Link to post
Share on other sites

Yes, that is a problem with templates. Not just with this addon but any that edits the shops files. There's no way around that in a support thread though due to the vast number of possibilities. If you can't figure it out and still want this addon installed, you will need to pay someone to do it.

Share this post


Link to post
Share on other sites

 

Good day can anyone please assist with the error below ? It is on a stock installed OSCOmmerce 2.3.4 Installation after the Header Tags SEO V 3.3.3 was installed. I did doublecheck sections to be modified 3 times to ensure no errors while changing the product_reviews_info.php, I removed the path to file in copy below.

Parse error: syntax error, unexpected '<' in product_reviews_info.php on line 45

 

This is where the code below has been inserted after require(DIR_WS_INCLUDES . 'template_top.php'); and <?php /*** Begin Header Tags SEO ***/ is on line 45

 

ADD BENEATH:

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

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

  $review['products_name'] = $header_tags_array['title_alt'];

 

  if (tep_not_null($review['products_model'])) {

    $products_name = $review['products_name'] . '<br><span class="smallText">[' . $review['products_model'] . ']</span>';

  } else {

    $products_name = $review['products_name'];

  }

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

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

Share this post


Link to post
Share on other sites

It goes after

require(DIR_WS_INCLUDES . 'template_top.php');
?>

It looks like you may have inserted it in between the two lines.

Share this post


Link to post
Share on other sites

So after having this add-on installed for a while and finally deciding to make full use of it I have just realised something:

 

When we enter something into the 'Product Page Sub Text' field it actually appears twice on the bottom of the products page. Is this meant to happen?

 

I only ask as we were going to utilise this field to promote our newsletter for example:

 

http://www.raunchyrags.co.uk/shop/function-pinks-p-29.html (not safe for work)

 

Which if this is an error as we believe leads to the next issue:

 

Are we able to format this text as standard or re we best just sticking to using an HTML input into the text field of the add-on?

 

Cheers Amigos :thumbsup:

(he says trying to speak cool today...lol)


Complete Newbie On The Learn - Not A Programmer

But Learning As I Go

Share this post


Link to post
Share on other sites

The text should only appear once. Please double check the code on the product page to make sure you didn't insert it twice. If you search for $product_info['products_head_sub_text'], it should only show up once.

 

You can treat it as any text field in the shop with regards to adding html. But if the html is common, like always making the text red, then I would think making the one code change to the product_info file would be easier than in each description.

Share this post


Link to post
Share on other sites

The text should only appear once. Please double check the code on the product page to make sure you didn't insert it twice. If you search for $product_info['products_head_sub_text'], it should only show up once.

 

You can treat it as any text field in the shop with regards to adding html. But if the html is common, like always making the text red, then I would think making the one code change to the product_info file would be easier than in each description.

I have checked the product_info.php and found that code 4 times in total but only as per the install instructions:

 

 

FIND (around line 200)

    <?php echo tep_draw_button(IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : ''), 'comment', tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params())); ?>

  </div>

ADD BENEATH:

      <!--- BEGIN Header Tags SEO SUB TEXT -->

      <?php

      if (tep_not_null($product_info['products_head_sub_text'])) {

          echo '<div class="contentText" style="margin-top:5px;">' . $product_info['products_head_sub_text'] . '</div>';

      }

      ?>

      <!--- END Header Tags SUB TEXT -->

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

FIND (around line 214)

      include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

    }

?>

ADD BENEATH:

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

      if (tep_not_null($product_info['products_head_sub_text'])) {

          echo '<div class="hts_sub_text" style="padding:10px 0;">' . $product_info['products_head_sub_text'] . '</div>';

      }

      if (HEADER_TAGS_DISPLAY_CURRENTLY_VIEWING == 'true') {

          echo '<div id="hts_viewing">' .TEXT_VIEWING;

          $header_tags_array['title'] = (tep_not_null($header_tags_array['title']) ? $header_tags_array['title'] : $product_info['products_name']);

          echo '<a title="' . $header_tags_array['title'] . '" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_info['products_id'], 'NONSSL') . '"/# ' . $header_tags_array['title'] . '">' . $header_tags_array['title'] . '</a>';

          echo '</div>';

      }

      if (HEADER_TAGS_DISPLAY_SOCIAL_BOOKMARKS == 'true') {

        echo '<div style="float:right; margin-top:5px; margin-right:4px;">';

        include(DIR_WS_MODULES . 'header_tags_social_bookmarks.php');

        echo '</div>';

      }

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

      ?>

 

So mine reads:

<!--- BEGIN Header Tags SEO SUB TEXT -->
      <?php
      if (tep_not_null($product_info['products_head_sub_text'])) {
          echo '<div class="contentText" style="margin-top:5px;">' . $product_info['products_head_sub_text'] . '</div>';
      }
      ?>
      <!--- END Header Tags SUB TEXT -->

<?php
    if ((USE_CACHE == 'true') && empty($SID)) {
      echo tep_cache_also_purchased(3600);
    } else {
      include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
    }
?>
<?php /*** Begin Header Tags SEO ***/
      if (tep_not_null($product_info['products_head_sub_text'])) {
          echo '<div class="hts_sub_text" style="padding:10px 0;">' . $product_info['products_head_sub_text'] . '</div>';
      }

      if (HEADER_TAGS_DISPLAY_CURRENTLY_VIEWING == 'true') {
          echo '<div id="hts_viewing">' .TEXT_VIEWING;
          $header_tags_array['title'] = (tep_not_null($header_tags_array['title']) ? $header_tags_array['title'] : $product_info['products_name']);
          echo '<a title="' . $header_tags_array['title'] . '" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_info['products_id'], 'NONSSL') . '"/# ' . $header_tags_array['title'] . '">' . $header_tags_array['title'] . '</a>';
          echo '</div>';
      }
      if (HEADER_TAGS_DISPLAY_SOCIAL_BOOKMARKS == 'true') {
        echo '<div style="float:right; margin-top:5px; margin-right:4px;">';
        include(DIR_WS_MODULES . 'header_tags_social_bookmarks.php');
        echo '</div>';
      }
      /*** End Header Tags SEO ***/

Complete Newbie On The Learn - Not A Programmer

But Learning As I Go

Share this post


Link to post
Share on other sites

Yes, you are correct. The instructions are wrong. You will need to remove one of the following, depending upon where you want the sub text to appear. I apologize for the bother this caused.

      if (tep_not_null($product_info['products_head_sub_text'])) {
          echo '<div class="hts_sub_text" style="padding:10px 0;">' . $product_info['products_head_sub_text'] . '</div>';
      }

Share this post


Link to post
Share on other sites

 

Yes, you are correct. The instructions are wrong. You will need to remove one of the following, depending upon where you want the sub text to appear. I apologize for the bother this caused.

      if (tep_not_null($product_info['products_head_sub_text'])) {
          echo '<div class="hts_sub_text" style="padding:10px 0;">' . $product_info['products_head_sub_text'] . '</div>';
      }

 Ok Jack I think it is time for you to either laugh at me or block me.........

 

Just thinking about it and like I said I was using the sub text field to place a text image at the bottom of the page......but it was putting it twice at the bottom of the page, from the code below (which has been fixed) how would I get the second instance of the text back but at the top of the product info page above the product title?

 

Also despite trying standard <center>, span alignment & <p> alignment I cant get the text centralised without the entire page going scew-wiff (if they are are words).

 

Cheers & Sorry To Be A Pain

 

Ricardo


Complete Newbie On The Learn - Not A Programmer

But Learning As I Go

Share this post


Link to post
Share on other sites

There's not a single answer for that since product_info files are not standard. But in the latest BS version, you would place the code I said to delete above this code

<div class="page-header">
  <h1 class="pull-right" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><?php echo $products_price; ?></h1>
  <h1><?php echo $products_name; ?></h1>
</div>

I haven't tried it but that should get you closer to what you want.

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

×