Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

Hi,

 

I installed header tags but i've got a major problem. When I use Fill up, the field in the tables (categories description and products description ) stay empty ....

 

I ned help !

 

thanks

Fill Tags only fills in the title, description and keywords for Header Tags. You have to fill in those others yourself.

 

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

So this is where I am at:

 

I tried the additional code and file for the STS template system

 

When I try to look at my pages I get:

Fatal error: Cannot redeclare tep_get_header_tag_products_title() (previously declared in /home/.sites/133/site55/web/catalog/includes/functions/header_tags.php:8) in /home/.sites/133/site55/web/catalog/includes/functions/header_tags.php on line 8

 

Please help.

That error means you have tep_get_header_tag_products_title declared twice or are calling it twice. You should search your files for

function tep_get_header_tag_products_title

and make sure you only find one result. See the special instructions for STS in the install file for Header Tags. Maybe you missed that.

 

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

That error means you have tep_get_header_tag_products_title declared twice or are calling it twice. You should search your files for

function tep_get_header_tag_products_title

and make sure you only find one result. See the special instructions for STS in the install file for Header Tags. Maybe you missed that.

 

Jack

 

 

Hi Jack,

 

I didn't miss the instructions for STS but they were a little confusing because I can't file the file sts_output.php.

 

NOTE for STS Users: The above also applies to STS shops but does not

always work for some reason. If your STS shop fails, in your sts_output.php file,

 

FIND

require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

require(DIR_WS_FUNCTIONS . 'header_tags.php');

CHANGE TO

require_once(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

require_once(DIR_WS_FUNCTIONS . 'header_tags.php');

 

I am using the latest STS install STS Plus 4.0.6 and the only file with that I could find with output in its name is sts_display_output.php. And I coudn't find the code listed above in that file to change it.

 

I did install the headertags.php file by rigadin which he recommended for STS users and that's as far as I have got as I am getting this error. The reference to tep is only listed once in the file where it is located so yeah... if I could find the output file or where this code is I am sure the problem would be fixed - I just feel I'm looking for a needle in the hay stack at the moment.

Link to comment
Share on other sites

So I worked it out.

 

In the contriibution by rigadin, (the file name is headertags.php) the code currently is:

 

  $sts->start_capture();
 if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
require(DIR_WS_FUNCTIONS . 'header_tags.php');
require(DIR_WS_INCLUDES . 'header_tags.php');
 } 
 $sts->stop_capture('headertags');

 

I had to change this to

 

  $sts->start_capture();
 if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
require_once(DIR_WS_FUNCTIONS . 'header_tags.php');
require(DIR_WS_INCLUDES . 'header_tags.php');
 } 
 $sts->stop_capture('headertags');

Link to comment
Share on other sites

Hopefully this will be the last problem....

 

The Category Title and Description are not appearing in the catalog. I'm just getting blank spaces. I've done an update on the fill tags but still nothing. I'm wondering if this could be a problem still with the STS or something else. I've checked my code a few times and I can't see that I have missed anything but if anyone can provide a clue that'd be great.

Link to comment
Share on other sites

Some clarifications about Header tags and STS...

- STS PLUS is a different contribution than STS. The purpose is the same but the code is quite different. You can find STS PLUS here: http://www.oscommerce.com/community/contributions,3893

- To have Header Tags working with STS PLUS, you need to install a module. You can get the module from the same page as the Header Tags contribution.

- If you use STS or STS PLUS, you do not need to modify all files in catalog to include the Header Tag file. If you do, you'll get the following error: Cannot redeclare tep_get_header_tag_products_title()

- You can solve the problem by changing back all files in catalog, or use include_once instead of include in the Header Tag module for STS PLUS.

 

 

- Rigadin

Edited by 241
Link to comment
Share on other sites

Hi again,

 

I seem to have one minor problem, which has appeared since installing this contribution (or it may just be coincidence); for some reason some letter 'n's' have appeared at the top of my site and I've no idea how: See Here

 

Any idea's how I can remove them and why they appeared in the first place?

 

Cheers

Link to comment
Share on other sites

Hi again,

 

I seem to have one minor problem, which has appeared since installing this contribution (or it may just be coincidence); for some reason some letter 'n's' have appeared at the top of my site and I've no idea how: See Here

 

Any idea's how I can remove them and why they appeared in the first place?

 

Cheers

 

Your 'n' are coming from the includes/header_tags.php file. Look at this:

echo '  <title>' . $tags_array['title'] . '</title>' . "\n";
echo '  <META NAME="Description" Content="' . $tags_array['desc'] . '">' . "\n";
echo '  <META NAME="Keywords" CONTENT="' . $tags_array['keywords'] . '">' . "\n";
echo ' <meta http-equiv="Content-Type" content="text/html; charset=' . CHARSET  . '">'."\n";
//NOTE: If you want your email add to your source code, remove the two slashes on the 
//following line of code. This serves no useful purpose and is not suggested tobe used
//echo '  <META NAME="Reply-to" CONTENT="' . HEAD_REPLY_TAG_ALL . '">' . "\n";

echo '<!-- EOF: Generated Meta Tags -->' . "\n";

 

They are the "\n" but I don't know why they are showing up. Check in your file if there is something wrong, and the fastest is to just remove them. I think.

 

- Rigadin

Link to comment
Share on other sites

Your 'n' are coming from the includes/header_tags.php file.

 

They are the "\n" but I don't know why they are showing up. Check in your file if there is something wrong, and the fastest is to just remove them. I think.

 

- Rigadin

Hi Rigadin,

 

Many thanks, I forgot to check that file, I was looking at includes/languages/english/header_tags.php but nothing seemed wrong in there! Updated the correct file and all appears to be okay, still a little confused as to why they appeared there!

 

Thanks for helping me out again, much appreciated.

 

:thumbsup:

Link to comment
Share on other sites

My index.php title, keyword, etc is being used on my product_info.php pages. None of my product_info.php pages are showing the product info in the page titles - it just shows the category.

 

In other words, when choosing a specific category and then chosing a product within that category will all display the same title. When I change the default index page name it changes on the product_info pages too. Somehow it thinks my product_info pages are still the index.php page.

 

For example: http://www.mystethoscope.com/Cardionics-St...ic-Stethoscope/

 

I do have a SEO contribution installed for the URLs.....

 

Any help would be appreciated!

Edited by bbott
Link to comment
Share on other sites

Also... some pages are not working with this contribution.

 

For example, the shipping.php page. I set the title, keyworsd, etc. for the shipping.php page and placed the head code sniplet but the only thing that appears as the page title is the URL - not what I assigned to it.

Link to comment
Share on other sites

The site you posted doesn't have any products so I can't see what the problem is. You should verify that your products have the title and meta information set in them.

 

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

Hello Jack,

 

I installed your Header Tag Controller on my website on which I also use SE friendly URL's contribution.

 

I'm experiencing same problem as reported in this thread by other users.

 

The category meta tags are being populated correctly which you can see here

http://http://adrenalinefilms.ca/Mountain-Biking-DVD/

 

but doesn't work for individual products (defaults are populated instead):

http://http://adrenalinefilms.ca/Back-in-the-Saddle/

 

It works OK with the old style URL's:

http://adrenalinefilms.ca/product_info.php/products_id/100

 

but not when you use the SE friendly URL's like so:

http://adrenalinefilms.ca/Science-of-Triat...Lecture-Series/

 

Does anyone know if there is a way of making your contribution work with the SE friendly URL's contribution. I think the problem is in teh fact that SE friendly URL contribution uses index.php to display products instead of product_info.php. So is there any way to make the header tag controller work?

 

thanks!

 

This is basically my same problem.

Link to comment
Share on other sites

I just installed the new header tags contoller v2.5.6.

 

It fixed the problem that myself and others were having when trying to write the new tags in the Headers_Tags_English.php file throught the admin panel under the text control selection. (For this I thank you).

 

The new problem I am having is through the catagories.php file when I am trying to change the tags it does not save the changes to the database.

 

In my efforts to trouble shoot this I can tell you that the fill tags command does write to the database and the clear tags command clears the information.

 

If anyone has any ideas to share it would help out with my male pattern baldness.

 

Thanks

Link to comment
Share on other sites

Wow, already?

 

I just installed a fresh osC test store and the new package. Everything seems to be working good.

 

Is it product or category changes that are not working? or both?

 

The code that pushes the product tags updates to the database is in the following lines in categories.php that in the package:

266-268

For category tag updates:

64-67

 

If those lines made it into your categories.php, you should be able to make manual updates from the products and category entry pages.

Link to comment
Share on other sites

very strange problem here. Catalog side works great. No probs there.

 

But, the problem occurs when I use the code which starts with:

 

--------------------------------------------------------------------------------------

 

<tr>

<td colspan="2" class="main"><hr><?php echo TEXT_PRODUCT_METTA_INFO; ?></td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<?php

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

?>

<tr>

<td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_PAGE_TITLE; ?></td>

<td><table border="0" cellspacing="0" cellpadding="0">

<tr>

<td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td>

<td class="main"><?php echo tep_draw_textarea_field('products_head_title_tag[' . $languages[$i]['id'] . ']', 'soft', '70', '5', (isset($products_head_title_tag[$languages[$i]['id']]) ? $products_head_title_tag[$languages[$i]['id']] : tep_get_products_head_title_tag($pInfo->products_id, $languages[$i]['id']))); ?></td>

</tr>

</table></td>

</tr>

<?php

}

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

?>

--------------------------------------------------------------------------------------

 

For some reason, the text box does not load. The text which corresponds to TEXT_PRODUCTS_PAGE_TITLE appears fine, so does the country flag. But everything below this, in fact the remainder of the page (when Im editing a product), is not loaded.

 

Does anyone know why this is or has had the same problem. The fields are in the database.

Edited by scanditan
Link to comment
Share on other sites

Try replacing your admin/categories.php file with the included one. If the problem goes away, there you made a mistake on the installation and will need to go through that 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

Try replacing your admin/categories.php file with the included one. If the problem goes away, there you made a mistake on the installation and will need to go through that again.

Jack

 

I think the catagories side of it may be conflicting with my catagoies discription mod.

 

I will work the code out on that before I post again.

 

Thanks for the idea I did try replacing my fill with the included one and it works.

Link to comment
Share on other sites

I think the catagories side of it may be conflicting with my catagoies discription mod.

 

I will work the code out on that before I post again.

 

Thanks for the idea I did try replacing my fill with the included one and it works.

 

Ok I just had a moment of clarity.

 

I will not need the Catagories decription mod anymore.

 

This mod does the same thing.

 

Thanks for the assistance.

Link to comment
Share on other sites

You don't need to remove categories description if you don't want. You just have to remember that if you want to edit a category in admin, you have to turn off the Categories Description option in admin->configuration and turn it on again when you are done. It makes things a little more difficult but it may be easier than backing out the code.

 

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

You don't need to remove categories description if you don't want. You just have to remember that if you want to edit a category in admin, you have to turn off the Categories Description option in admin->configuration and turn it on again when you are done. It makes things a little more difficult but it may be easier than backing out the code.

 

Jack

 

Jack

 

I backed the code out and it is working on the catagories side.

 

I guess the reason I thought I needed to remove it was because the tags and descriptions for this mod show up when you are looking at the catagories. I figured it would take the place of the "Catagories Description" mod.

 

If you know of a way that it is benificial to use the two in conjuction I can just undo all of my changes and put it back.

 

It would take me 2 mins to do.

 

Foot note: Still not working on the product side.

Link to comment
Share on other sites

They can't both work at the same time since they use the same section of code in index.php. So whichever is easier for you to do is what you should go with. Since you have it out already, I would just leave it out. That will make adding contributions to the admin/categories.php file a little easier in the future.

 

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

They can't both work at the same time since they use the same section of code in index.php. So whichever is easier for you to do is what you should go with. Since you have it out already, I would just leave it out. That will make adding contributions to the admin/categories.php file a little easier in the future.

 

Jack

 

Jack

 

I have beating away at the code all evening trying to get fckeditor integrated with the header tags catagories description text field.

 

I have had no luck with this.

 

Do you know if there are any plans in the works to make an html editor intigration with this mod.

 

For the time being I will just use the editor outside the page and then cut and paste it in.

 

Let me know what you think.

 

Thanks

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