Jump to content
Jack_mcs

Header Tags SEO

Recommended Posts

3 hours ago, artfulweb said:

Fatal error: Uncaught Error: Call to undefined function GetHTSFieldList()

In admin/categories.php, find

	    $hts_fields = GetHTSFieldList();
            $description_query = tep_db_query("select language_id, products_name, products_description, products_url, products_seo_title, products_seo_description, products_seo_keywords, " . $hts_fields['fields'] . " from products_description where products_id = '" . (int)$products_id . "'");
            while ($description = tep_db_fetch_array($description_query)) {

and add this line above it

        require_once('includes/functions/header_tags_general.php');

 

Share this post


Link to post
Share on other sites
1 hour ago, Jack_mcs said:

In admin/categories.php, find


	    $hts_fields = GetHTSFieldList();
            $description_query = tep_db_query("select language_id, products_name, products_description, products_url, products_seo_title, products_seo_description, products_seo_keywords, " . $hts_fields['fields'] . " from products_description where products_id = '" . (int)$products_id . "'");
            while ($description = tep_db_fetch_array($description_query)) {

and add this line above it


        require_once('includes/functions/header_tags_general.php');

 

Hi Jack, when trying to duplicate now I now get

1136 - Column count doesn't match value count at row 1

insert into products_description (products_id, language_id, products_name, products_description, products_url, products_viewed, products_seo_title, products_seo_description, products_seo_keywords) values ('17918', '1', 'PUNTO 9 01 Tunique', '

Voici une tunique en points fantaisies ajourés à tricoter avec le fil à tricoter Lang Yarns Bloom (70% coton, 18% viscose, 12% lin) dans votre choix de couleur, 0050 en photo.
\r\n
\r\nQuantités à tricoter :
\r\nLang Yarns Bloom 0046 :
\r\nT1: 4 pel., T2: 5 pel.
\r\n
\r\nAiguilles 3-3,5 mm (US 3-4/UK 10-9) ne sont pas incluses avec le kit tricot. Une photocopie du modèle est incluse avec les laines.

', '', '0', '', '', '', '', '', '', '', '', '', '', '', '')

Share this post


Link to post
Share on other sites

The fix I posted was from an unreleased versions. I didn't look at it as close as I should have and I see now it requires some other changes to work properly. But those changes are too numerous to post here so I will upload a new version with this and other problems fixed. I should get that done before Monday. I apologize for my quick answer causing more problems for you.

Share this post


Link to post
Share on other sites
8 minutes ago, Jack_mcs said:

The fix I posted was from an unreleased versions. I didn't look at it as close as I should have and I see now it requires some other changes to work properly. But those changes are too numerous to post here so I will upload a new version with this and other problems fixed. I should get that done before Monday. I apologize for my quick answer causing more problems for you.

No problem Jack, all the rest still works. I just can not duplicate a product to save time entering all the new products for the new season that just fell. I can still do it the "old" way!

Thank you for taking the time to prepare a new release.

Share this post


Link to post
Share on other sites

Hi Jack,

I'm getting an error when going to edit the header tags for a particular product:

Header Tags SEO Meta Tag Data
Title TagBreadcrumb TextEnglish:
Fatal error: Uncaught Error: Call to undefined function tep_get_products_head_title_tag() in H:\root\home\instrumj-001\www\instrument\storelogin\includes\modules\header_tags_seo.php:19 Stack trace: #0 H:\root\home\instrumj-001\www\instrument\storelogin\categories.php(737): require() #1 {main} thrown in H:\root\home\instrumj-001\www\instrument\storelogin\includes\modules\header_tags_seo.php on line 19

Thanks!
John
 

Share this post


Link to post
Share on other sites
1 hour ago, johnwurzbacher said:

I'm getting an error when going to edit the header tags for a particular product:

Please post the versions of oscommerce, php and this addon that you are using.

Share this post


Link to post
Share on other sites

We are running Header Tags SEO 3.0, PHP 7.0 and OSCommerce 2.3.  I think the issue may have started when we upgraded our PHP version from 5.6.

Thanks!
John

Share this post


Link to post
Share on other sites

Version 3.0 was released seven years ago so it is not likely to be compatible with php 5.6. You will need to upgrade this addon to a newer version. I'm not sure if the latest version will work in your shop without changes. It may but be sure to use the Frozen version in the addon. If not, one or two versions before it should work. The safest way to upgrade is to do it one at a time using the included update files. That will take longer but should go more smoothly in the long-run. Just be sure to backup your files between each update so that if you need to back it out you don't lose all of your work.

Share this post


Link to post
Share on other sites

A new version has been uploaded with these changes:

  • Corrected the code to add individual missing pages when the automatic page option is off.
  • Corrected the add missing pages code since it mangled the includes/header_tags.php file.
  • Corrected the code that adds categories and manufacturers to the titles so it doesn't apply when the parents setting is set to standard.
  • Corrected the duplicate product code in admin/categories.php.
  • Corrected the database installer so it did not delete previous tables.
  • Removed a call to language files no longer needed.

Share this post


Link to post
Share on other sites

Me again, Jack. Just a little error in my error logs:

Invalid argument supplied for foreach() in

(catalog)/includes/modules/content/index_nested/templates/tpl_cm_in_category_listing_hts.php on line 6

Share this post


Link to post
Share on other sites

Assuming you are working on a Phoenix shop, try removing that module and use the stock one. I remember making some changes to it but then decided to use the stock one and I forgot to go back and test it.  Just be sure you have made the change to the category_tree.php file in classes. Please let me know if it works or not.

Share this post


Link to post
Share on other sites
10 hours ago, Jack_mcs said:

Assuming you are working on a Phoenix shop, try removing that module and use the stock one. I remember making some changes to it but then decided to use the stock one and I forgot to go back and test it.  Just be sure you have made the change to the category_tree.php file in classes. Please let me know if it works or not.

Yes Jack, Phoenix 1.0.4.3, replaced and it is still there. Category_tree was done.

Share this post


Link to post
Share on other sites

Please uninstall all of the index_nested modules for this addon to see which one is causing the problem.

Share this post


Link to post
Share on other sites
1 hour ago, Jack_mcs said:

Please uninstall all of the index_nested modules for this addon to see which one is causing the problem.

It is cm_in_category_listing_hts.php

Share this post


Link to post
Share on other sites

Are you sure you removed it? There's no way it can cause a failure if it is not installed.

Share this post


Link to post
Share on other sites
1 hour ago, Jack_mcs said:

Are you sure you removed it? There's no way it can cause a failure if it is not installed.

I uninstalled it, then no error. Put it back in and the error logged again.

Share this post


Link to post
Share on other sites
11 hours ago, artfulweb said:

I uninstalled it, then no error. Put it back in and the error logged again.

uninstalled or just disabled?


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites
1 hour ago, BrockleyJohn said:

uninstalled or just disabled?

Uninstalled

Share this post


Link to post
Share on other sites
18 hours ago, artfulweb said:

I uninstalled it, then no error. Put it back in and the error logged again.

The module is broken. That's why I said to remove it. Once you do that, you should get the error.

Share this post


Link to post
Share on other sites
1 hour ago, Jack_mcs said:

The module is broken. That's why I said to remove it. Once you do that, you should get the error.

Ok Jack. Thank you.

Share this post


Link to post
Share on other sites
43 minutes ago, artfulweb said:

Ok Jack. Thank you.

Does the stock listing module work correctly, meaning does it use the HTS text?

Share this post


Link to post
Share on other sites
22 hours ago, Jack_mcs said:

Does the stock listing module work correctly, meaning does it use the HTS text?

Yes Jack, they do work for categories and sub categories with the osComm Phoenix stock listing modules, so all ok on that end.

Share this post


Link to post
Share on other sites

Hi Jack,

I just installed the update on my admin side. 

I run into two twings:

first the version still show 3.3.6
secondly I think the version-checker produces a strange result:

in the file header_tags_seo.php line 597:

                 <td class="smallText" align="right" style="font-weight: bold; color: red;"><?php echo AnnounceVersion($contribPath, $currentVersion, $contribName); ?></td>

outputs an complete array

 

<start screendump

get http://addons.oscommerce.com/info/5851

 Array
(
    [0] => 

    [1] => 

    [2] => 

    [3] => 

    [4] => 

    [5] => 

    [6] => 

    [7] => 

    [8] => 

    [9] => 

 

[10] => [11] => [12] => [13] =

end screendump>

It looks like the result of the function in version checker is not what it should be:

FYI: I currently running the admin on php 5.6

Share this post


Link to post
Share on other sites
4 hours ago, koopmanh said:

first the version still show 3.3.6
secondly I think the version-checker produces a strange result:

Thanks for mentioning these. For the version, I will change that in the next version. For the version checker, find this code in the admin/includes/functions/header_tags.php file

if (! function_exists('GetFileArray')) {
  function GetFileArray($path) {
    $lines = array();

    if (false && function_exists('curl_init')) {
       $ch = curl_init();
       $timeout = 5; // set to zero for no timeout
       curl_setopt ($ch, CURLOPT_URL, $path);
       curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
       curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
       $file_contents = curl_exec($ch);
       curl_close($ch);
       $lines = explode("\n", $file_contents);
       echo 'curl';
    } else {
     echo 'get '.$path;
       $lines = @file($path); 
    }   
    
?> <pre> <?php
print_r($lines);
?> </pre> <?php
    return $lines;  
  }
}

and replace it with this

if (! function_exists('GetFileArray')) {
  function GetFileArray($path) {
    $lines = array();

    if (function_exists('curl_init')) {
       $ch = curl_init();
       $timeout = 5; // set to zero for no timeout
       curl_setopt ($ch, CURLOPT_URL, $path);
       curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
       curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
       $file_contents = curl_exec($ch);
       curl_close($ch);
       $lines = explode("\n", $file_contents);
    } else {
       $lines = @file($path); 
    }   
    
    return $lines;  
  }
}

 

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

×