Jump to content
Jack_mcs

Header Tags SEO

Recommended Posts

@@Jack_mcs

You were right, The admin side was missing.  One more down and one to go I hope.

 

Still unable to get admin/manufactures.php to work.  When I add step 2 in "$sql_data_array" part in that is when the page goes blank or white. 

Share this post


Link to post
Share on other sites

@@Jack_mcs  I got the admin/manufactures.php to work.  :)

 

I used the greater 2.3 catalog > admin/manufacture.php to modify the one on my site.  It worked. 

Share this post


Link to post
Share on other sites

@@Jack_mcs

 

Just clean up.  I have 2 header screen shots for you to look at please. 

 

The first attached jpg is at the top of the Page Control.  Not sure what to do with it.

 

Second attahced jpg is the top of the Socal page.  Not sure how to clean up the images.

 

post-303521-0-91506100-1469410253_thumb.jpg

post-303521-0-16861900-1469410424_thumb.png

Edited by dculley

Share this post


Link to post
Share on other sites

The first ones lists files that are not useable with the addon. It is just letting you know that something may have been missed.  You can click on exclude and they will no longer be shown. That is just for Header Tags SEO - it won't affect your shop in any way. But you should review the list and delete the ones that shouldn't be there. The db_install and server_info files are probably security holes. If they are not needed, they should be deleted, which you can do from that page.

 

The second happens when the code can't find the catalog directory. It is usually a mistake in the admin's configure file. The DIR_FS_CATALOG entry should end in a / so that may be the problem if it isn't.

Share this post


Link to post
Share on other sites

@@Jack_mcs

 

Thank for your help. 

 

I excluded the fist step. 

 

Found the problem in the second step, thanks to your lead.  I had in admin/includes/cofigure.php file:

 

define('DIR_WS_CATALOG_IMAGES', '../images/');

 

Changed to:

 

  define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');

 

and that fixed it. 

 

Thanks again

Dean

Share this post


Link to post
Share on other sites

@@Jack_mcs

 

Need you help once again.  My team went to make a new category and got in error;

 

1054 - Unknown column 'categories_description' in 'field list'

insert into categories_description (categories_name, categories_description, categories_seo_description, categories_seo_keywords, categories_htc_title_tag, categories_htc_title_tag_alt, categories_htc_title_tag_url, categories_htc_desc_tag, categories_htc_keywords_tag, categories_htc_breadcrumb_text, categories_htc_description, categories_id, language_id) values ('PVC Hangarounds', '', '', '', 'PVC Hangarounds', '', '', 'PVC Hangarounds', 'PVC Hangarounds', 'PVC Hangarounds', '', '279', '1')

[TEP STOP]

 

Can you help me with this please.

Share this post


Link to post
Share on other sites

That doesn't have anything to do with this addon, unless you made a mistake somehow, since the categories_description field isn't part of this addon. That field is missing in one of the BS releases, as I recall, so maybe that is why you are seeing it. One of these threads should provide the solution.

Share this post


Link to post
Share on other sites

@@Jack_mcs

 

Just like I had to do above with the greater 2.3 catalog > admin/manufacture.php to modify the one on my site.  I did with the admin/categories.php and it worked.  I also had to omit the FCKeditor part and leave the original code. 

 

This SEO has taken a lot of work.  I hope all is working now. 

Share this post


Link to post
Share on other sites

About "HeaderTags_SEO_V_3.3.4" -> Bootstrap version -> "Install_Admin.txt" file

At line 560, the script has errors  :

FIND (around line 56):

          $sql_data_array['manufacturers_description'] = tep_db_prepare_input($manufacturers_description_array[$language_id]);

ADD BENEATH:
	  
         /*** Begin Header Tags SEO ***/	  
          $sql_data_array['manufacturers_htc_title_tag' => (tep_not_null($manufacturers_htc_title_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_array[$language_id])) : strip_tags($manufacturers_name));
          $sql_data_array['manufacturers_htc_title_tag_alt' => (tep_not_null($manufacturers_htc_title_alt_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_alt_array[$language_id])) : strip_tags($manufacturers_name));
          $sql_data_array['manufacturers_htc_title_tag_url' => (tep_not_null($manufacturers_htc_title_alt_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_url_array[$language_id])) : strip_tags($manufacturers_name));
          $sql_data_array['manufacturers_htc_desc_tag' => (tep_not_null($manufacturers_htc_desc_array[$language_id]) ? tep_db_prepare_input($manufacturers_htc_desc_array[$language_id]) : $manufacturers_name);
          $sql_data_array['manufacturers_htc_keywords_tag' => (tep_not_null($manufacturers_htc_keywords_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_keywords_array[$language_id])) : strip_tags($manufacturers_name));
          $sql_data_array['manufacturers_htc_description' => tep_db_prepare_input($manufacturers_htc_description_array[$language_id]);
          $sql_data_array['manufacturers_htc_breadcrumb_text' => (tep_not_null($manufacturers_htc_breadcrumb_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_breadcrumb_array[$language_id])) : strip_tags($manufacturers_name)));
          /*** End Header Tags SEO ***/

Must be changed by this one :

FIND (around line 56):

          $sql_data_array['manufacturers_description'] = tep_db_prepare_input($manufacturers_description_array[$language_id]);

ADD BENEATH:
	  
         /*** Begin Header Tags SEO ***/	  
          $sql_data_array['manufacturers_htc_title_tag'] = (tep_not_null($manufacturers_htc_title_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_array[$language_id])) : strip_tags($manufacturers_name));
          $sql_data_array['manufacturers_htc_title_tag_alt'] = (tep_not_null($manufacturers_htc_title_alt_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_alt_array[$language_id])) : strip_tags($manufacturers_name));
          $sql_data_array['manufacturers_htc_title_tag_url'] = (tep_not_null($manufacturers_htc_title_alt_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_url_array[$language_id])) : strip_tags($manufacturers_name));
          $sql_data_array['manufacturers_htc_desc_tag'] = (tep_not_null($manufacturers_htc_desc_array[$language_id]) ? tep_db_prepare_input($manufacturers_htc_desc_array[$language_id]) : $manufacturers_name);
          $sql_data_array['manufacturers_htc_keywords_tag'] = (tep_not_null($manufacturers_htc_keywords_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_keywords_array[$language_id])) : strip_tags($manufacturers_name));
          $sql_data_array['manufacturers_htc_description'] = tep_db_prepare_input($manufacturers_htc_description_array[$language_id]);
          $sql_data_array['manufacturers_htc_breadcrumb_text'] = (tep_not_null($manufacturers_htc_breadcrumb_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_breadcrumb_array[$language_id])) : strip_tags($manufacturers_name));
          /*** End Header Tags SEO ***/

Regards

Edited by milerwan

Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites

Jack, if you take a look on the script you will found html errors with a caracter "[" but no "]" to close.  :) 

Everything else now, I installed newsdesk on osc v2.3.4 BS with Header tags SEO but it does not include the title of pages generated by newsesk_info.php.

A quick look at includes/modules/header_tags.php and we could see that newsdesk_info.php supports only just 1 unique title (like specials.php for example).

Without created specific header tags entries, I just need to duplicate in meta title the newsdesk product title and maybe a part of its description too ("newsdesk_article_description" or "newsdesk_article_shorttext", not important).

Do you know if a member has already worked on this ?

Thank you.


Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites

I don't understand your comment about "[" but no "]" .

 

The newsdesk addon uses urls like this: newsdesk_info.php?newsdesk_id=XX

 

where XX is the ID. Enter that into the pseudo box in page control and you will then be able to control the title and tags for each page. Be sure you are using the latest version of this addon since it contains a fix for this type of change.

Share this post


Link to post
Share on other sites

Hi Jack,

 

I have added Headertags to my shop, when I tried to search something in my shop is reported

 

1364 - Field 'google_last_position' doesn't have a default value

insert into headertags_keywords (keyword, last_search, found, language_id) VALUES ('dvd', now(), 1, 1)

[TEP STOP]

 

 

I looked into the advanced_search_result.php, it does not have sql script to insert data to database.

 

 

Which file should I look in to solve this problem?

 

Please advise me.

 

Thanks in advanced.

 

chuntse

Share this post


Link to post
Share on other sites

This is because one of the fields in the table is not being updated, which it shouldn't be when searching. The reason it is failing for you is because MySQL for your server is in strict mode. This causes a lot of problems and the usual response is to disable that setting. But that is not something most shop owners will be able to do so you can try one of the following changes but you may find other problems since it is common with MySQL commands to not fill in fields that don't need to be filled in.

 

In the includes/modules/header_tags_keywords.php file, find:

        tep_db_query("insert into " . TABLE_HEADERTAGS_KEYWORDS . "  (keyword, last_search, found, language_id) VALUES ('" . tep_db_input($keyword) . "', now(), " . (int)$found . ", " .  (int)$languages_id . ")");     

and replace it with

        tep_db_query("insert into " . TABLE_HEADERTAGS_KEYWORDS . "  (keyword, last_search, found, google_last_position, language_id) VALUES ('" . tep_db_input($keyword) . "', now(), " . (int)$found . ", ' ', " .  (int)$languages_id . ")");     

If the above doesn't work, try this instead

        tep_db_query("insert into " . TABLE_HEADERTAGS_KEYWORDS . "  (keyword, last_search, found, google_last_position, language_id) VALUES ('" . tep_db_input($keyword) . "', now(), " . (int)$found . ", '999', " .  (int)$languages_id . ")");     

From what I've seen posted about this type of problem, it has been fixed in php 5.7. I don't have a way to test that at the moment but you may consider upgrading the php version if possible. But keep in mind that some shops won't work with that version so it may not be an option.

 

Please let me know if you try the above and if it works or not.

Share this post


Link to post
Share on other sites

I've looked for some examples about to complete the fields from headertag seo, but I didn't find it. I would ask someone to give me an example for the following:

Product Title Tag:

Product Description Tag:

Product Keywords Tag:

Product Listing Text:

Product Page Sub Text:

Products Model:

Products Weight:80 or 80mg?

Thank you

Share this post


Link to post
Share on other sites

Product Title Tag: - Title displayed in the web browser and what the search engines use to determine the intent of the page. It should contain the keyword(s) for the page.

 

Product Description Tag: Similar to the above except in longer, sentence form.  The search engines may use it for the description in their listings.

 

Product Keywords Tag: Contains the keywords for the page. If used, it must only contain words mentioned in the text on the page.

 

Product Listing Text:  See the help file.

 

Product Page Sub Text: See the help file.

 

Products Model: Not part of this addon.

 

Products Weight:80 or 80mg? Not part of this addon.

Share this post


Link to post
Share on other sites

Running on OSC 2.3.4, modified for the German market (law). MySQL 5.5.50.

 

I installed all files and carefully modified those, which are already in the shop.

 

Clicking on a product displays:

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' pd.products_head_sub_text products p, products_description pd where p.products_' at line 1

select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_baseprice, p.products_baseprice_unit, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from, pd.products_head_sub_text products p, products_description pd where p.products_status = '1' and p.products_id = '31' and pd.products_id = p.products_id and pd.language_id = '2'

[TEP STOP]

 

Any idea how to track this down?

 

Thank's for any help in advance,

stefan

Share this post


Link to post
Share on other sites

Got this one: typo in product_info.php. Product is displayed now.

 

Mhmm, still something wrong in the product_info.php. The layout isn't quite correct. Need some more time to check this...

Share this post


Link to post
Share on other sites

o.k., most things are working - really a great contrib!

 

Right now I have 4 issues where I need help:

 

1. page control reports:

 

Fehler Page not added - not Header Tags SEO compatible - application_bottom.php exclude    delete (use with caution)
Fehler Page not added - not Header Tags SEO compatible - application_top.php exclude    delete (use with caution)
Fehler Page not added - not Header Tags SEO compatible - counter.php exclude    delete (use with caution)
Fehler Page not added - not Header Tags SEO compatible - database_tables.php exclude    delete (use with caution)
Fehler Page not added - not Header Tags SEO compatible - filenames.php exclude    delete (use with caution)
Fehler Page not added - not Header Tags SEO compatible - footer.php exclude    delete (use with caution)
Fehler Page not added - not Header Tags SEO compatible - form_check.js.php exclude    delete (use with caution)
Fehler Page not added - not Header Tags SEO compatible - header.php exclude    delete (use with caution)
Fehler Page not added - not Header Tags SEO compatible - template_bottom.php exclude    delete (use with caution)
Fehler Page not added - not Header Tags SEO compatible - template_top.php exclude    delete (use with caution)
Fehler Page not added - not Header Tags SEO compatible - version.php exclude    delete (use with caution)
Fehler Page not added - not Header Tags SEO compatible - view_counter_trap_badbot.php exclude    delete (use with caution)
Fehler Page not added - not Header Tags SEO compatible - view_counter_trap.php exclude    delete (use with caution)
Fehler Page not added - not Header Tags SEO compatible - ind.php exclude    delete (use with caution)

 

What is recommended? Just exclude? If delete means delete - that'll not be a good idea...

 

 

2. at the very left upper corner of the product_info appears:

 

<body>inkl. 19%  MwSt. zzgl. <a href="https://www.xyz.de/popup_shipping.php"target="_blank"onclick="$('#popupShipping').dialog('open'); return false;"><u>Versand</u></a>" />

 

I have no idea where this comes from?

 

 

3. I realize, that the meta property is <meta property="og:locale" content="en_US">

 

As my shop is located in Germany shouldn't that be "de_DE"? If so, where can this be changed?

 

 

4. In the admin panel Header Tags SEO is listed twice? Quite sure I made a mistake - but where?

 

Thank's for any advice pointing me in the right direction.

stefan

Edited by stefan21

Share this post


Link to post
Share on other sites

 

4. In the admin panel Header Tags SEO is listed twice? Quite sure I made a mistake - but where?

In the Install_Admin.txt:

 

In admin/includes/column_left.php before the first ?> (by the other

include statements), *** SKIP FOR VERSION 2.3.3.4 ***

 

ADD:

 

/*** Begin Header Tags SEO ***/

include(DIR_WS_BOXES . 'header_tags_seo.php');

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

 

Should probably be skipped for all VERSIONS >= 2.3.3.4

 

Fixed.

Edited by stefan21

Share this post


Link to post
Share on other sites

1. page control reports:

 

Fehler Page not added - not Header Tags SEO compatible - application_bottom.php exclude    delete (use with caution)

Fehler Page not added - not Header Tags SEO compatible - application_top.php exclude    delete (use with caution)

Fehler Page not added - not Header Tags SEO compatible - counter.php exclude    delete (use with caution)

Fehler Page not added - not Header Tags SEO compatible - database_tables.php exclude    delete (use with caution)

Fehler Page not added - not Header Tags SEO compatible - filenames.php exclude    delete (use with caution)

Fehler Page not added - not Header Tags SEO compatible - footer.php exclude    delete (use with caution)

Fehler Page not added - not Header Tags SEO compatible - form_check.js.php exclude    delete (use with caution)

Fehler Page not added - not Header Tags SEO compatible - header.php exclude    delete (use with caution)

Fehler Page not added - not Header Tags SEO compatible - template_bottom.php exclude    delete (use with caution)

Fehler Page not added - not Header Tags SEO compatible - template_top.php exclude    delete (use with caution)

Fehler Page not added - not Header Tags SEO compatible - version.php exclude    delete (use with caution)

Fehler Page not added - not Header Tags SEO compatible - view_counter_trap_badbot.php exclude    delete (use with caution)

Fehler Page not added - not Header Tags SEO compatible - view_counter_trap.php exclude    delete (use with caution)

Fehler Page not added - not Header Tags SEO compatible - ind.php exclude    delete (use with caution)

 

What is recommended? Just exclude? If delete means delete - that'll not be a good idea...

 

2. at the very left upper corner of the product_info appears:

 

<body>inkl. 19%  MwSt. zzgl. <a href="https://www.xyz.de/popup_shipping.php"target="_blank"onclick="$('#popupShipping').dialog('open'); return false;"><u>Versand</u></a>" />

 

I have no idea where this comes from?

 

3. I realize, that the meta property is <meta property="og:locale" content="en_US">

 

As my shop is located in Germany shouldn't that be "de_DE"? If so, where can this be changed?

1 - The code is listing files located in the root directory that do not have Header Tags SEO code in them. That is legitimate for some files but not for others. The exclude link just hides them from being shown and doesn't hurt anything. The delete link will actually delete the file so you have to be careful with it. The usual inclination is to just exclude them all but that hide mistakes. For example, most of those files do not belong in the root. They belong in the includes directory and must have been copied there by mistake. That can be a security problem in some cases so you should delete those.  Others, like the View Counter trap do belong in the root and will not have Header Tags SEO code so it is a legitimate file and can be excluded.

 

2 - Code like that usually means you are missing a php delimeter. Try placing the following above the <body> command, which should be in the includes/template_top.php file:  ?>

 

3 - That tag isn't part of this addon. It may be coming from existing code in the shop. The language part of it should be changed as the language being used is changed so, if you haven't tried it, switch the language to see if it changes.

Share this post


Link to post
Share on other sites

Hi Jack,

 

I just installed this addons.

And it seems the array of $header_tags_array is empty and I try print_r($header_tags_array[]); in product_info.php

it  did not show the  value of this array.

I was trying to find out the problem. But I couldn't.

Could you please advise me where can I solve this problem.

I have followed your instructions to modify the files. but some codes in admin/categories.php are error, and I change it.Please see following:

 

In admin/categories.php,

FIND (about line 61)

        for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
          $categories_name_array = $HTTP_POST_VARS['categories_name'];

          $language_id = $languages[$i]['id'];

          $sql_data_array = array('categories_name' => tep_db_prepare_input($categories_name_array[$language_id]));

REPLACE WITH:

        for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
          $categories_name_array = $HTTP_POST_VARS['categories_name'];

          /*** Begin Header Tags SEO ***/
          $categories_htc_title_array = str_replace('"', '"', $HTTP_POST_VARS['categories_htc_title_tag']);
          $categories_htc_title_alt_array = str_replace('"', '"', $HTTP_POST_VARS['categories_htc_title_tag_alt']);
          $categories_htc_title_url_array = str_replace('"', '"', $HTTP_POST_VARS['categories_htc_title_tag_url']);
          $categories_htc_desc_array = str_replace('"', '"', $HTTP_POST_VARS['categories_htc_desc_tag']);
          $categories_htc_keywords_array = $HTTP_POST_VARS['categories_htc_keywords_tag'];
          $categories_htc_breadcrumb_array = $HTTP_POST_VARS['categories_htc_breadcrumb_text'];
          $categories_htc_description_array = $HTTP_POST_VARS['categories_htc_description'];

          $language_id = $languages[$i]['id'];

   
          $sql_data_array = array('categories_name' => tep_db_prepare_input($categories_name_array[$language_id]),
           'categories_htc_title_tag' => (tep_not_null($categories_htc_title_array[$language_id]) ? tep_db_prepare_input(strip_tags($categories_htc_title_array[$language_id])) :  tep_db_prepare_input(strip_tags($categories_name_array[$language_id]))),
           'categories_htc_title_tag_alt' => (tep_not_null($categories_htc_title_alt_array[$language_id]) ? tep_db_prepare_input(strip_tags($categories_htc_title_alt_array[$language_id])) :  tep_db_prepare_input(strip_tags($categories_name_alt_array[$language_id]))),
           'categories_htc_title_tag_url' => (tep_not_null($categories_htc_title_url_array[$language_id]) ? tep_db_prepare_input(strip_tags($categories_htc_title_url_array[$language_id])) :  tep_db_prepare_input(strip_tags($categories_name_url_array[$language_id]))),
           'categories_htc_desc_tag' => (tep_not_null($categories_htc_desc_array[$language_id]) ? tep_db_prepare_input($categories_htc_desc_array[$language_id]) :  tep_db_prepare_input($categories_name_array[$language_id])),
           'categories_htc_keywords_tag' => (tep_not_null($categories_htc_keywords_array[$language_id]) ? tep_db_prepare_input(strip_tags($categories_htc_keywords_array[$language_id])) :  tep_db_prepare_input(strip_tags($categories_name_array[$language_id]))),
           'categories_htc_breadcrumb_text' => (tep_not_null($categories_htc_breadcrumb_array[$language_id]) ? tep_db_prepare_input(strip_tags($categories_htc_breadcrumb_array[$language_id])) :  tep_db_prepare_input(strip_tags($categories_name_array[$language_id]))),
           'categories_htc_description' => tep_db_prepare_input($categories_htc_description_array[$language_id]));
          /*** End Header Tags SEO ***/

I change the last line of code to 'categories_htc_description' => tep_db_prepare_input($categories_htc_description_array[$language_id]),

 

because there is a line code is after it. the it did not report error:

 

'categories_htc_description' => tep_db_prepare_input($categories_htc_description_array[$language_id]),
          /*** End Header Tags SEO ***/
           'categories_description' => tep_db_prepare_input($categories_description_array[$language_id]));

 

Thanks in advaced.

 

chuntse

Share this post


Link to post
Share on other sites

 

For example, most of those files do not belong in the root. They belong in the includes directory and must have been copied there by mistake. That can be a security problem in some cases so you should delete those.

 

Douh - thank you so much for pointing this out. I'm going to correct this right now. Must have made a mistake and didn't realize it.

 

I'll work on the other issues and let you know. Thank you for your support.

strefan

Share this post


Link to post
Share on other sites

@@chuntse For not showing the array, are you saying the array doesn't display or that it displays as empty? If the latter, then be sure you have ran fill tags. I don't understand the second problem so I can't comment on it.

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

×