Jump to content
Jack_mcs

Header Tags SEO

Recommended Posts

Hello Jack,

 

I have 3 languages in my shop, when I want to change a category I see in every field the 3 languages except with Alternate Title Text, Alternate URL Text and Alternate Breadcrumb Text, in these 3 I see only 1 language ?

 

Share this post


Link to post
Share on other sites

@revampI checked it here and they are showing. What version of oscommerce and this addon are you using?

Share this post


Link to post
Share on other sites

I didn't have that version in a shop with multiple languages but I just tried a quick add to an existing shop and you are correct. To allow it to work until a proper fix is made, you can made these changes (untested). In categories.php find

      </div>
      <div class="tab-pane fade" id="section_images_content" role="tabpanel">

and change it to

    <?php
    require_once('includes/functions/header_tags_general.php');
    include_once('includes/header_tags_seo/htc_products_display.php');
    ?>
      </div>
      <div class="tab-pane fade" id="section_images_content" role="tabpanel">

In includes/hooks/admin/categories/headertags_seo_display.php change injectLanguageForm to injectLanguageFormXX

Share this post


Link to post
Share on other sites

PHP 7.1 and up
Phoenix 1.0.8.0

When you go to manufacturers

Notice: Undefined index: title in /includes/header_tags.php on line 221

Notice: Undefined index: title in /includes/header_tags.php on line 222

Notice: Undefined index: keywords in /includes/header_tags.php on line 225

Notice: Undefined index: title in /includes/modules/header_tags_seo/header_tags_opengraph.php on line 31

Notice: Undefined index: desc in /includes/modules/header_tags_seo/header_tags_opengraph.php on line 32

 

Description - Header Tags module installs but does not get active for some reason

 

If you use the Breadcrumb

Notice: Constant BOX_HEADING_HEADERTAGS_TAGCLOUD already defined in /includes/languages/english/header_tags_seo.php on line 3

Notice: Constant TEXT_SEE_MORE already defined in /includes/languages/english/header_tags_seo.php on line 4

Notice: Constant TEXT_SEE_MORE_FULL already defined in /includes/languages/english/header_tags_seo.php on line 5

Notice: Constant HTS_OG_AVAILABLE_STOCK already defined in /includes/languages/english/header_tags_seo.php on line 6

Notice: Constant HTS_OG_PRICE already defined in /includes/languages/english/header_tags_seo.php on line 7

Notice: Constant HTS_TEXT_VIEWING already defined in /includes/languages/english/header_tags_seo.php on line 9

Fatal error: Uncaught Error: Call to undefined method category_tree::getData() in /includes/modules/content/header/cm_header_breadcrumb_headertags.php:52 Stack trace: #0 /includes/system/versioned/1.0.7.9/osc_template.php(106): cm_header_breadcrumb_headertags->execute() #1 /templates/default/includes/components/header.php(15): oscTemplate->getContent('header') #2 /templates/override/includes/components/template_top.php(61): require('...') #3 /templates/default/includes/pages/product_info.php(13): require('/...') #4 /product_info.php(25): require('/...') #5 {main} thrown in /includes/modules/content/header/cm_header_breadcrumb_headertags.php on line 52

Share this post


Link to post
Share on other sites

This addon hasn't been coded to work with your version. The last (fatal error) is due to the class usage being changed so the command in the code will no longer work. There are too many changes to fix that to post here so you will have to wait for the next version if you want to use this addon.

Share this post


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

This addon hasn't been coded to work with your version. The last (fatal error) is due to the class usage being changed so the command in the code will no longer work. There are too many changes to fix that to post here so you will have to wait for the next version if you want to use this addon.

any idea when can we expect the new version?

Share this post


Link to post
Share on other sites

A new version has been uploaded with these changes:

Corrected many compatibility issues found by member @Owl Sauron 
Removed unnecessary jquery code. Found ny member @MyBookShop,
 

Share this post


Link to post
Share on other sites
On 5/23/2021 at 4:21 PM, Jack_mcs said:

Corrected many compatibility issues found by member @Owl Sauron 

 

Greetings,

 

guess not:

Notice: Undefined index: title in /includes/header_tags.php on line 221

Notice: Undefined index: title in /includes/header_tags.php on line 222

Notice: Undefined index: keywords in /includes/header_tags.php on line 225

Notice: Undefined index: title in /includes/modules/header_tags_seo/header_tags_opengraph.php on line 31

Notice: Undefined index: desc in /includes/modules/header_tags_seo/header_tags_opengraph.php on line 32

 

the above happens when you select a manufacturer at index page.

 

and the bellow isnt fixed either:

- If you have more than one language installed on the shop, the Categories HEADER in the Products Listing only shows in English.

 

another thing thats not an issue but could be a good implementation is the fact that AutoFill - Listing Text could have a value box so we can decide how many characters it would display at products index nested description...

Share this post


Link to post
Share on other sites

@Owl SauronDid you run Fill Tags? Did you make copies of the files in the english directory and place them in whatever other language directory you use? Did you edit the categories in admin to make sure the language entries exist for all languages?

Share this post


Link to post
Share on other sites
On 5/24/2021 at 9:10 PM, Owl Sauron said:

- If you have more than one language installed on the shop, the Categories HEADER in the Products Listing only shows in English.

to fix this issue just modify the "/includes/modules/content/index_products/cm_ip_title_hts.php" file at line 45

from:

         $db_query = tep_db_query("select c.categories_image as image, " . $name_check . " from categories c left join categories_description cd on c.categories_id = cd.categories_id where c.categories_id = '" . (int)$current_category_id . "'");

 

to:

         $db_query = tep_db_query("select c.categories_image as image, " . $name_check . " from categories c left join categories_description cd on c.categories_id = cd.categories_id where c.categories_id = '" . (int)$current_category_id . "' AND cd.language_id = " . (int)$_SESSION['languages_id'] . "");

 

Share this post


Link to post
Share on other sites

Hi @Jack_mcs,

Just tested the newest version v3.3.14 on Phoenix V1.0.8.0 and I'm running into a couple of issues that may be interlinked. 

1- When running the fill tags I get this error: 

 

Notice: Undefined index: language_group in C:\wamp\www\admin\header_tags_fill_tags.php on line 53

Tags won't fill. This is what I have on line 53 of that file:

 $languageID = (int)substr($_POST['language_group'], (strpos($_POST['language_group'], '_') + 1)); //get the selected language or all

Now, if I change this and hard code the ID of the language I'm using (French, language ID 2)

 $languageID = 2;

the fill tags works however I get another set of errors:

 

Undefined index: add_generic_cat_meta_desc in C:\wamp\www\admin\header_tags_fill_tags.php on line 139
Undefined index: generic_cat_meta_desc in C:\wamp\www\admin\header_tags_fill_tags.php on line 139
Undefined index: add_generic_cat_keywords in C:\wamp\www\admin\header_tags_fill_tags.php on line 140
Undefined index: generic_cat_keywords in C:\wamp\www\admin\header_tags_fill_tags.php on line 140
etc...

 

2- Still in the Fill Tags menu, none of the category titles show up in the "Categories" box (maybe tied to the issue above?)

Share this post


Link to post
Share on other sites

@alix32I can't reproduce those warnings. For the first one, that is saying one of the POST variables can't be found. But due to how the code is written, that variable should always be present so I don't understand how it can happen.

For the second, that should only be possible when the "Check to fill title and tags with generic strings." checkbox is checked."  So maybe you are trying to use one of the options on the page but it is not filled in correctly.

I suggest reloading the page, don't check anything on it except for the "Fill Only Empty Tags" and the bottom and then click update. If you don't get any warnings then the problem is in how you are using the form. If you do get warnings, then it must be due to how your site is setupsince, as mentioned, it works fine here (using php 7.4).

 

Share this post


Link to post
Share on other sites

Hi and thanks @Jack_mcs. I re-installed it and am still getting the same errors. I'll install on a clean Phoenix store to see what I get. To note, I'm testing this on local Wamp server with PHP V7.3.5.

It could also be because of my French language settings...wondering if @artfulweb has tested this new version of Header Tags on a Phoenix V.1.0.8.0 store and had these issues too?

Will keep you posted

Share this post


Link to post
Share on other sites

Hi - just installed on a clean version (with English as default). I'm no longer seeing the issues I saw at first with French as default and English language removed, but I'm seeing the same issues @ Owl Sauron did:

 

On 5/24/2021 at 10:10 PM, Owl Sauron said:

Notice: Undefined index: title in /includes/header_tags.php on line 221

Notice: Undefined index: title in /includes/header_tags.php on line 222

Notice: Undefined index: keywords in /includes/header_tags.php on line 225

Notice: Undefined index: title in /includes/modules/header_tags_seo/header_tags_opengraph.php on line 31

Notice: Undefined index: desc in /includes/modules/header_tags_seo/header_tags_opengraph.php on line 32

 

the above happens when you select a manufacturer at index page.

 

Share this post


Link to post
Share on other sites

And the categories are still not displaying here:

image.png.a04e6455df736f050e450eb9aec6b2c2.png

Share this post


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

the above happens when you select a manufacturer at index page.

Have you checked the manufacturers checkbox in Page Control for index.php? Ran fill tags being sure to check to button for manufacturers?

1 hour ago, alix32 said:

And the categories are still not displaying here:

This isn't throwing an error due to how the new categories tree function is coded so I didn't see it. To fix it, find this code in admin/geader_tags_fill_tags.php

             $categoryFiles[] = array('id' => TEXT_FILTER_LIST_SELECT_ALL, 'text' => TEXT_FILTER_LIST_SELECT_ALL);
             $categoryFiles = tep_get_category_tree('','','',$categoryFiles);

and replace it with

             $categoryFiles = tep_get_category_tree();
             array_unshift($categoryFiles, array('id' => TEXT_FILTER_LIST_SELECT_ALL, 'text' => TEXT_FILTER_LIST_SELECT_ALL));

 

Share this post


Link to post
Share on other sites
Posted (edited)

Hi @Jack_mcs, ok so:

1- the manufacturers issue is resolved by following your recommendations below, thanks!

On 6/11/2021 at 3:44 PM, Jack_mcs said:

Have you checked the manufacturers checkbox in Page Control for index.php? Ran fill tags being sure to check to button for manufacturers?

On 6/11/2021 at 1:56 PM, alix32 said:

 

I'm no longer seeing these issues below: 

Quote

Notice: Undefined index: title in /includes/header_tags.php on line 221

Notice: Undefined index: title in /includes/header_tags.php on line 222

Notice: Undefined index: keywords in /includes/header_tags.php on line 225

Notice: Undefined index: title in /includes/modules/header_tags_seo/header_tags_opengraph.php on line 31

Notice: Undefined index: desc in /includes/modules/header_tags_seo/header_tags_opengraph.php on line 32

 

2- Categories not displaying in the Categories box within the Fill Tags section - that is also fixed thanks to your suggested changes:

Quote

This isn't throwing an error due to how the new categories tree function is coded so I didn't see it. To fix it, find this code in admin/geader_tags_fill_tags.php


             $categoryFiles[] = array('id' => TEXT_FILTER_LIST_SELECT_ALL, 'text' => TEXT_FILTER_LIST_SELECT_ALL);
             $categoryFiles = tep_get_category_tree('','','',$categoryFiles);

and replace it with


             $categoryFiles = tep_get_category_tree();
             array_unshift($categoryFiles, array('id' => TEXT_FILTER_LIST_SELECT_ALL, 'text' => TEXT_FILTER_LIST_SELECT_ALL));

 

 

3- However, I'm still seeing Undefined index warnings:

( ! ) Notice: Undefined index: add_generic_man_title in C:\wamp\www\admin\header_tags_fill_tags.php on line 238

( ! ) Notice: Undefined index: generic_man_title in C:\wamp\www\admin\header_tags_fill_tags.php on line 238

( ! ) Notice: Undefined index: add_generic_man_keywords in C:\wamp\www\admin\header_tags_fill_tags.php on line 240

( ! ) Notice: Undefined index: generic_man_keywords in C:\wamp\www\admin\header_tags_fill_tags.php on line 240

( ! ) Notice: Undefined index: add_generic_man_title in C:\wamp\www\admin\header_tags_fill_tags.php on line 238

( ! ) Notice: Undefined index: generic_man_title in C:\wamp\www\admin\header_tags_fill_tags.php on line 238

( ! ) Notice: Undefined index: add_generic_man_keywords in C:\wamp\www\admin\header_tags_fill_tags.php on line 240

( ! ) Notice: Undefined index: generic_man_keywords in C:\wamp\www\admin\header_tags_fill_tags.php on line 240

What I noticed is that it only happens when you want to fill tags for individual sections with Categories, Manufacturers or Products. For example if I want to run Fill Tags for Products Titles:

image.thumb.png.98e9a1e55fce1cf2e3435a40b4dc5fc3.png

I don't see the notices if I update all sections Title, Description & Keywords.

4- And after adding the French Language Pack and removing English, I get this error after filling tags if I don't select the language button at the bottom of the Fill Tags page:

image.png.b2c08db3dae81fd88a76f1e2eb445a87.png

 

On my clean install with English as default (no other language), the radio button is pre-selected against English. When adding French and removing English, the radio-button against French is not pre-selected:

image.thumb.png.c9bd6a4be65c83248eacdded450cfb7d.png

 

Is there a way to get the new language pre-selected rather than having to click on the button each time?

Thanks!

 

 

Edited by alix32

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

Thanks @Jack_mcs, there is an issue with this updated file. When running fill tags for all sections, titles and category descriptions get filled with "on" regardless of what you enter in the generic string fields. Sorry!

Share this post


Link to post
Share on other sites

@alix32I don't have a multi-language site to test with and since I can't see the problems, I'm just guessing at the fix. If you want to send me a copy of your database, I will use it for testing. I don't need any customers or orders data in it so you can empty those tables if you like. You can get my email in my members section.

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

@Jack_mcs - everything works fine now thanks! I'll continue to test thoroughly and will let you know if I come across anything else

Thanks

Share this post


Link to post
Share on other sites

Hi again,

Getting several issues:

PHP Notice:  Trying to access array offset on value of type null in /includes/functions/header_tags.php on line 25

 

Phoenix 1.0.8.0 @ PHP 7.1 & 7.4

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

×