Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

No, I don't remember for sure. I originally had it in and had some problem with it, though I can't remember what it was. So I changed the code and it worked. I meant to go back and look at it but since it worked, I didn't think about it again.

 

Jack

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

  • Replies 4.6k
  • Created
  • Last Reply

Top Posters In This Topic

surfalot,

 

I changed the following:

 

$languages_array[] = array('id' => $i + 1, //$languages[$i]['id'],

 

to

 

$languages_array[] = array('id' => $i + 1, $languages[$i]['id'], --> for English

$languages_array[] = array('id' => $i + 2, $languages[$i]['id'], --> for German

$languages_array[] = array('id' => $i + 5, $languages[$i]['id'], --> for GB

 

That means that I have to edit header_tags_fill_tags.php every time I do something in here.

 

I am not looking for all languages at one time, it would be wonderful if I could stop editing the file and just use the dropdown.

 

I believe that is what others (e.g. erdmaennchen) were looking for...

 

Greetings, Michael

Not because it is difficult we don't dare to do it, but because we don't dare to do it, it is difficult. (Seneca)

Link to comment
Share on other sites

Todd,

 

thank you very much, that was the missing part. Now it works...not as I would have wanted it to work (it only fills in the Product name), but that is a different question and is most propably answered somewhere in here.

 

I will search for that one.

 

As I said, thank you very much,

 

Michael

Not because it is difficult we don't dare to do it, but because we don't dare to do it, it is difficult. (Seneca)

Link to comment
Share on other sites

I've just installed this contrib and it all seemed to be working fine , untill i went to admin and discovered a huge problem.

 

In the "Categories / Products" listing in Admin , after i have viewed the product details or changed something , the products name disapears from the list , the product is still there , but no name is showing ????.

 

It will do this even if i click update without making any changes to he tags or description fields??

 

 

i know it doesn't sound like a huge problem , but it will be when i add more products , i wont be able to see the lsit of names and it will make editing a nightmare ???

 

 

Any ideas please ??

 

shop%20admin.jpg

Link to comment
Share on other sites

Also just noticed that the Product name is also missing from the catalog , catagorie listing section as well ....

 

 

In admin , there is no field for "product name" , i have 2 entries for product description instead ???

 

 

HELP !!

Edited by andytc
Link to comment
Share on other sites

Also just noticed that the Product name is also missing from the catalog , catagorie listing section as well ....

In admin , there is no field for "product name" , i have 2 entries for product description instead ???

HELP !!

 

 

 

 

 

SORTED ..... Thanks :thumbsup:

Link to comment
Share on other sites

Hi everybody,

 

I installed HTC v2.5.5. on my shop ... A lot of work, since I installed a few other contributions ... It seems to work ok ...

 

Changes in Text Control seem to work, but .... In the Header for example on the product_info page it returns "http://www.mysite.nl/product_info.php?products_id=123... " .... So I think the code can't read the proper values ....

 

But since I don't understand how to use the different options, I hope someone could tell me how they have configured the Text Control Page ....

 

Tnx !!

Link to comment
Share on other sites

- When I use the header tags section directly under admin, and go to "Text Control", I can enter new data into "Default Title", "Default Descriptions" and "Default Keywords" and then click update, but the only one that changes is "Default Title" - the other two revert back to what they were before - "OSCommerce ..." etc

 

Had this problem as well,

 

Found out if i edited /includes/languages/english/header_tags.php manually

 

and deleted all the escaped ' signs in the define HEAD_DESC_TAG_ALL and HEAD_KEY_TAG_ALL statements,

 

everything works ok and now both can be altered from the admin section

 

 

regards

 

 

Chris

Link to comment
Share on other sites

Hi everybody,

 

I installed HTC v2.5.5. on my shop ... A lot of work, since I installed a few other contributions ... It seems to work ok ...

 

Changes in Text Control seem to work, but .... In the Header for example on the product_info page it returns "http://www.mysite.nl/product_info.php?products_id=123... " .... So I think the code can't read the proper values ....

 

But since I don't understand how to use the different options, I hope someone could tell me how they have configured the Text Control Page ....

 

Tnx !!

If your product page is showing a url like that, then you don'thave it set up correctly. You need to go to admin->Header Tags->Fill Tags, select Fill All in both columns and then click Update. Your product page title should then show the name of the product. Does it?

 

As for the Text Control page, that is site specific. You need to change the default and index sections to match your site. If they are duplicates, then you should uncheck the HT.. options.

 

Jack

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

Another quick question.

 

In the categories edit area is there suppose to be an area to enter: title, keyword, and description just like in the products edit area because they are not coming up for me.

 

I did install the "category description" contribution which heavily edit category.php. I'm wondering because I noticed that the category table now has fields for the header tags but I can't edit them. Any ideas?

 

Thanks in advance

Shade and Sweet Water

Chris Czerniak

Link to comment
Share on other sites

Header Tags has its own categories description field but since it uses the same section of code as the Categories Description contribution does, only one can work at a time. So you need to disable categories description in admin->configuration to make the changes to Header Tags. When you are finished, you can re-enable Categories Descriptions in you want to use it and the tags in Header Tags will still be seen (except for the cateogires description one, of course).

 

Jack

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

If your product page is showing a url like that, then you don'thave it set up correctly. You need to go to admin->Header Tags->Fill Tags, select Fill All in both columns and then click Update. Your product page title should then show the name of the product. Does it?

 

As for the Text Control page, that is site specific. You need to change the default and index sections to match your site. If they are duplicates, then you should uncheck the HT.. options.

 

Jack

 

Hi Jack,

 

Thank you very much for your kind reply !! It took me a day to work my way through the code, but it was worth all the effort. This is a briljant contribution !!! :thumbsup: And it works excellent !! I changed all the language files and made the IMHO necessary changes to make this contribution full multi-language proof !! Maybe later (if I find the time because I am working to a deadline), I will upload all the files as a contribution. Since I believe, reading the last 150 posts on the forum, a lot of people have problems installing this contribution when they are not native-english.

 

Tnx again for all your great work guys !!

 

Arjan

Link to comment
Share on other sites

Hi-

 

I just installed version 2.5.5. It was a first time install. When I try to add a page in the Header Tags Control section in the Admin I get a parse error. Here is an example...In this case I was trying to add the page called "novelty-c-60.html" and here is the parse error that I receive:

 

Parse error: parse error, unexpected T_STRING in includes/header_tags.php on line 345

 

Here is the code that the error code is referring to:

 

// novelty-c-60.html.php
 case (strstr($_SERVER['PHP_SELF'],FILENAME_NOVELTY-C-60.HTML) or strstr($PHP_SELF, FILENAME_NOVELTY-C-60.HTML));
$tags_array = tep_header_tag_page(HTTA_NOVELTY-C-60.HTML_ON, HEAD_TITLE_TAG_NOVELTY-C-60.HTML, 
								  HTDA_NOVELTY-C-60.HTML_ON, HEAD_DESC_TAG_NOVELTY-C-60.HTML, 
								  HTKA_NOVELTY-C-60.HTML_ON, HEAD_KEY_TAG_NOVELTY-C-60.HTML );

 

Then the entire site breaks.

 

Another problem I am having which may or may not be related is that I can't change the default description and default keywords. It always reverts back to the Oscommerce stuff. For some reason though the default title stays changed the way I want it.

 

I've got the SEO urls contrib added. I thought maybe this was affecting it somehow.

 

I dunno...Please Help!!!

 

Please help!!!

Link to comment
Share on other sites

If you look in your includes/filename.php file, do you see this FILENAME_NOVELTY-C-60.HTML? Probably not. You need to add the page so that it's title will be converted to the proper form. Usually that just means leaving off the extension (.html) although the dashed may confuse it. I don't recall if I coded for that. If it fails then, you will need to edit the file yourself so the defines are listed correctly.

 

The default entries not being recorded is a known bug. You will need to edit the files manually to change them until someone finds a fix for it.

 

Jack

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

If you look in your includes/filename.php file, do you see this FILENAME_NOVELTY-C-60.HTML? Probably not. You need to add the page so that it's title will be converted to the proper form. Usually that just means leaving off the extension (.html) although the dashed may confuse it. I don't recall if I coded for that. If it fails then, you will need to edit the file yourself so the defines are listed correctly.

 

The default entries not being recorded is a known bug. You will need to edit the files manually to change them until someone finds a fix for it.

 

Jack

 

Jack-

 

No it's not in the filenames file. So if I add it to this file is this the correct format:

 

define('FILENAME_NOVELTY-C-60', 'novelty-c-60.html');

 

or this

 

define('FILENAME_NOVELTY-C-60', 'novelty-c-60.php');

 

Or neither of these?

 

Thanks,

Jay

Link to comment
Share on other sites

If your product page is showing a url like that, then you don'thave it set up correctly. You need to go to admin->Header Tags->Fill Tags, select Fill All in both columns and then click Update. Your product page title should then show the name of the product. Does it?

 

As for the Text Control page, that is site specific. You need to change the default and index sections to match your site. If they are duplicates, then you should uncheck the HT.. options.

 

Jack

 

Jack,

 

In an other post I said I worked out all problems and made several changes to names of files in order to make it IMHO more OSC standard AND fully multi-language compatible ... Doing this I had to go quite deep into the code ... I sorted my problems as soon as I understood that for the page index.php the define in ... catalog\includes\languages\YOUR_LANGUAGE\header_tags.php ..... is different in structure from the other defines for the different pages ..... Example define('HEAD_TITLE_TAG_DEFAULT', 'PAGE TITLE ENGLISH FOR INDEX.PHP'); differs from define('HEAD_TITLE_TAG_PRODUCT_INFO','PAGE TITLE FOR PRODUCT_INFO.PHP'); ... This contributions workes really fine now ...

 

But what I don't understand is this .... Why wasn't made a new table in the database to add and modify all the rules needed for HTC to work (I mean all the defines that are dynamically set in header_tags.php) ?? I think a lot of the problems I read about in this forum would be solved if a Database table was used to store these data ... But maybe I am missing an important reason not to use a DB table ???? I consider modifying the contrib with the use of a DB table .... FYI ... I am not an expert ...

 

Thanks in advance for your reply !!

 

Arjan

Edited by azpro
Link to comment
Share on other sites

Jack-

 

No it's not in the filenames file. So if I add it to this file is this the correct format:

 

define('FILENAME_NOVELTY-C-60', 'novelty-c-60.html');

 

or this

 

define('FILENAME_NOVELTY-C-60', 'novelty-c-60.php');

 

Or neither of these?

 

Thanks,

Jay

What I was trying to say is that whatever the filename define is, you have to enter the name in so that heade tags will recognize it. For example, if you look in filenames.pgp, you will see privacy.php is defined as FILENAME_PRIVACY, so if you wanted to add this page in Text Control, the name of the page would be privacy (although I think privacy.php would work too). After header tags changes the code in includes/header_tags.php, you will see FILENAME_PRIVACY in there. Notice it matches the same define in filenames.php. I hope that is a little clearer.

 

Jack

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,

 

In an other post I said I worked out all problems and made several changes to names of files in order to make it IMHO more OSC standard AND fully multi-language compatible ... Doing this I had to go quite deep into the code ... I sorted my problems as soon as I understood that for the page index.php the define in ... catalog\includes\languages\YOUR_LANGUAGE\header_tags.php ..... is different in structure from the other defines for the different pages ..... Example define('HEAD_TITLE_TAG_DEFAULT', 'PAGE TITLE ENGLISH FOR INDEX.PHP'); differs from define('HEAD_TITLE_TAG_PRODUCT_INFO','PAGE TITLE FOR PRODUCT_INFO.PHP'); ... This contributions workes really fine now ...

 

But what I don't understand is this .... Why wasn't made a new table in the database to add and modify all the rules needed for HTC to work (I mean all the defines that are dynamically set in header_tags.php) ?? I think a lot of the problems I read about in this forum would be solved if a Database table was used to store these data ... But maybe I am missing an important reason not to use a DB table ???? I consider modifying the contrib with the use of a DB table .... FYI ... I am not an expert ...

 

Thanks in advance for your reply !!

 

Arjan

The original author wrote the code that way and I kept it that way in my updates to be compatible with previous versions and because I think it is the better way to code. If you would like to change it to use the database, please create the contribution and upload it under a different name. Otherwise you will cause a lot of people a lot of grief.

 

Jack

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

What I was trying to say is that whatever the filename define is, you have to enter the name in so that heade tags will recognize it. For example, if you look in filenames.pgp, you will see privacy.php is defined as FILENAME_PRIVACY, so if you wanted to add this page in Text Control, the name of the page would be privacy (although I think privacy.php would work too). After header tags changes the code in includes/header_tags.php, you will see FILENAME_PRIVACY in there. Notice it matches the same define in filenames.php. I hope that is a little clearer.

 

Jack

 

Jack-

 

Yeah I follow you and when I do what you suggested I get the error message that I posted in my earlier message. How come no one else has experienced this issue? Did I mess up the install somewhere? Could the "dashes" be the problem as you mentioned. Is there an earlier version I should install that hasn't been hacked apart?

 

Thanks,

Jay

Link to comment
Share on other sites

The original author wrote the code that way and I kept it that way in my updates to be compatible with previous versions and because I think it is the better way to code. If you would like to change it to use the database, please create the contribution and upload it under a different name. Otherwise you will cause a lot of people a lot of grief.

 

Jack

 

Ok, I understand ... But as far as you know there is not a specifc techical reason to do it like this ?? ... I mean slowing down the handling of the website or something else ...

 

 

 

Arjan

Link to comment
Share on other sites

Jay - dashes are not allowed in variable names in php so I suspect that is where the problem lies.

 

Arjan - Database access is slower than disk access so that would be the reason why I would keep it as it is.

 

Jack

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

Hi-

 

I just installed version 2.5.5. It was a first time install. When I try to add a page in the Header Tags Control section in the Admin I get a parse error. Here is an example...In this case I was trying to add the page called "novelty-c-60.html" and here is the parse error that I receive:

Here is the code that the error code is referring to:

 

// novelty-c-60.html.php
 case (strstr($_SERVER['PHP_SELF'],FILENAME_NOVELTY-C-60.HTML) or strstr($PHP_SELF, FILENAME_NOVELTY-C-60.HTML));
$tags_array = tep_header_tag_page(HTTA_NOVELTY-C-60.HTML_ON, HEAD_TITLE_TAG_NOVELTY-C-60.HTML, 
								  HTDA_NOVELTY-C-60.HTML_ON, HEAD_DESC_TAG_NOVELTY-C-60.HTML, 
								  HTKA_NOVELTY-C-60.HTML_ON, HEAD_KEY_TAG_NOVELTY-C-60.HTML );

 

Then the entire site breaks.

 

Another problem I am having which may or may not be related is that I can't change the default description and default keywords. It always reverts back to the Oscommerce stuff. For some reason though the default title stays changed the way I want it.

 

I've got the SEO urls contrib added. I thought maybe this was affecting it somehow.

 

I dunno...Please Help!!!

 

Please help!!!

 

Does the page novelty-c-60.html actually exist as this looks like a url rewrite by SEO

 

have a look in your product admin section thats where the tags should be entered for products

 

regards

 

 

Chris

Link to comment
Share on other sites

Sure does look like an SEO rewrite. If Ultimate SEO was coded to use underscores instead of hyphens, HTC would be more compatible with it. I still couldn't guarantee they would work together well, but it's a start.

 

tomnevers, you might discuss the following issue in the Ultimate SEO support thread:

 

In seo.class.php, there are 3 occurrence of the single-quoted dash: '-'. If all 3 were replaced with an underscore instead, '_', what would the impact to Ultimate SEO be?

 

this would probably give you a better foundation to getting HTC working right for you.

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