Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header Tag Controller Question


Criz

Recommended Posts

Hello,

 

I have installed the Header Tag Controller mod, which is working great. I currently have one problem. When I add new products, it seems like the Header Tag Controller is not generating Page Titles for these new product pages.

 

Can anyone help me out here?

 

Thanks,

 

Chris

Link to comment
Share on other sites

AFAIK, that contribution has no way to set the titles or any of the other info that it uses...it would be up to you to add the proper values to the fields for each product in the DB.

 

I saved myself some work and added some code to admin/categories.php to insert the product name both to the products_name field and to the products_head_title field at the same time. I did also add three fields to the bottom of the product insert/edit section to work with the title, description and keywords on the pages rather than in the DB.

 

If you'd want to use the exact product names to include in the title instead of something else, you can try changing this code in the functions/header_tags.php under the tep_get_header_tag_products_title function.

 

Change this:

 

$product_header_tags = tep_db_query("select products_head_title_tag from " . TABLE_PRODUCTS_DESCRIPTION . " where language_id = '" . $languages_id . "' and products_id = '" . $HTTP_GET_VARS['products_id'] . "'");

 

to this:

 

$product_header_tags = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where language_id = '" . $languages_id . "' and products_id = '" . $HTTP_GET_VARS['products_id'] . "'");

 

This should automatically pull the product names in for use in the page titles. Again, if you want to use a title different from the product names, don't use this.

 

HTH

Link to comment
Share on other sites

Hi Ross,

 

Thanks for your reaction.

 

All the products in my dbase got automatically the Title tag, generated by Header Tag Controller. The strange thing is, that it doesn't work for new products. In my opinion it should work also for new products.

 

I definitely look into the codes you supplied.

 

Regards,

 

Chris

Link to comment
Share on other sites

Dear Linda,

 

I have taken a look at the adminstration tool and will for sure install. But my point/question was not about that.

 

When I installed your contribution, it automatically generated header tags for all the current products in my dbase. Is that something happening only when I install the contribution? Or does that also need to happen when adding new products.

 

After installing, all the product pages had the product name in the page title, exactly like I wished it would be. The new products do not have the product name in the page title.

 

Could you please shed a light on this matter?

 

Thanks,

 

Chris

Link to comment
Share on other sites

If you originally replaced all the titles with the product name then they are in there for your old products.

 

But, from that point on, you need to add something there.

 

It really depends on how you configured the settings as to what is being displayed on the product_info.php

Link to comment
Share on other sites

Ross,

 

I have added the code you provided. It does not seem to work for me, although the codes looks ok. When I changed the code to your code, nothing happened. When I entered something in products_head_title_tag in TABLE_PRODUCTS_DESCRIPTION it still pulled in the date from there and not from the products_name.

 

I looked into it, but did not find an answer yet.

 

Maybe you can help me out.

 

Thanks,

 

Chris

Link to comment
Share on other sites

Check how you have the configuration defined for the settings in the language files.

 

They determine what shows on what page.

 

You can have individual product info, the ALL settings which is the default, or a combination.

 

Don't be confused by the DEFAULT tags, those are for the default.php page.

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