Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

The reason a dash is used is because it is better for SEO purposes. If you write diamond_watches, the SE's see that as one word, while diamond-watches is seen as two words.

 

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 the HTC and Ultimate SEO are truly incompatible. I guess a good fork project would be to redesign HTC so it is compatible with Ultimate SEO.

Edited by surfalot
Link to comment
Share on other sites

How did you reach that conclusion? The page title only comes into play when adding a page in Page Control. Ultimate SEO changes the product titles and product pages are not added in Page Control so there's no problem that I can see. I assumed the op was referring to an actual page when he stated his problem. If he is trying to add a product page whose title has been altered by Ultimate SEO, then he is making a mistake. You can't add product pages in Page Control.

 

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

How did you reach that conclusion? The page title only comes into play when adding a page in Page Control. Ultimate SEO changes the product titles and product pages are not added in Page Control so there's no problem that I can see. I assumed the op was referring to an actual page when he stated his problem. If he is trying to add a product page whose title has been altered by Ultimate SEO, then he is making a mistake. You can't add product pages in Page Control.

 

Jack

 

Yes that is exactly what I was trying to do. I was trying to add a page to the page control that had been altered by Ultimate SEO.

 

If I am making a mistake, by adding a product page to the page control who's title has been altered by ultimate seo, then how do I create unique titles, descriptions and headers for each of these pages??

Link to comment
Share on other sites

The titles of product pages are handled automatically. Go to admin->Header Tags->Fill Tags, click on the Fill All buttons and then Update. That will set them all. If you want to edit them manually, go to admin->catalog and edit the product. You will see the field to fill in the title and meta tags information.

 

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

After installing Header Tags Controller (have gone back over all the install instructions to check it out) I have found a problem. When I go to Catalog in osC admin, select an item and click edit - the English language Product Description says 'Product Description' but the German and Spanish 'Product Description' says 'Meta Tag Information' (in bold). The box is for the Product Description and works fine in practice, but I can't track down where the error crept in.

 

Vger

Link to comment
Share on other sites

I just looked at mine and it displays properly in the other languages (using version 2.5.5). The bold Meta Tag Information is the heading used for the Header Tags section right after the products description so my guess is that the section of code that adds the Header Tags fields to be displayed is inside the previous loop. Although I can't explain why it would work in English. In any event, the problem has to be in the categories.php file. I would replace yours with the one from the contribution just to make sure it does work. If it does, you could compare files but the problem will probably end up being with the change described in the Install_Admin.txt file that begins with

Around line 552, find this section of 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

Have done both a manual admin/categories.php file comparison, checked it against the manual install instructions, and run a File Compare using Text Pad and the results are identical for the contribution file and the one I have installed. Weird.

 

Vger

Link to comment
Share on other sites

Did you compare the english/categories.php file with the german/categories.php file? I suppose it is possible that the define for Products Description

define('TEXT_PRODUCTS_DESCRIPTION', 'Products Description:');

was changed to Meta Tag Information by mistake in the other language files. That text can only come from teh cateogies.php file or the language file so if it is not the language file, I will try your categories file in my test shop if you want to post 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

Did you compare the english/categories.php file with the german/categories.php file? I suppose it is possible that the define for Products Description
define('TEXT_PRODUCTS_DESCRIPTION', 'Products Description:');

was changed to Meta Tag Information by mistake in the other language files. That text can only come from teh cateogies.php file or the language file so if it is not the language file, I will try your categories file in my test shop if you want to post it.

 

Jack

 

I thought I finally got this thing figured out but now when I attempt to create an account i get the following error. Please help! My site is broken...

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /public_html/includes/languages/english/create_account.php:2) in /public_html/includes/functions/sessions.php on line 67

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /public_html/includes/languages/english/create_account.php:2) in /public_html/includes/functions/sessions.php on line 67

 

Warning: Cannot modify header information - headers already sent by (output started at /public_html/includes/languages/english/create_account.php:2) in /public_html/includes/functions/general.php on line 29

Link to comment
Share on other sites

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /public_html/includes/languages/english/create_account.php:2) in /public_html/includes/functions/sessions.php on line 67

This kind of error usually means you have a space or other item outside of your start and end php tags. look at the top of /public_html/includes/languages/english/create_account.php for any non-php code. All include files must start with <?php at the top and end with ?> at the bottom, and nothing else outside them.

Link to comment
Share on other sites

This kind of error usually means you have a space or other item outside of your start and end php tags. look at the top of /public_html/includes/languages/english/create_account.php for any non-php code. All include files must start with <?php at the top and end with ?> at the bottom, and nothing else outside them.

 

Thanks that was basically the problem

Link to comment
Share on other sites

I have searched this thread, but I couldn't find the solution to my problem. Do you by any chance know how to fix the double slash bug ? When I go in the admin panel, Header Tags -> Text control, I have the default description "osCommerce : What\\'s New Here? - Hardware Software DVD Movies". The problem is that each time I update it, I keep getting more slashes or ' in "What's". I know that \ is an escape character, and it gets there somehow, but I don't know how to fix it. Did any of you have the same problem ? The problem occurs at all the edit boxes (Default Title, Default Descriptions ,etc).

Link to comment
Share on other sites

When I go in the admin panel, Header Tags -> Text control, I have the default description "osCommerce : What\\'s New Here? - Hardware Software DVD Movies".

I tracked it down to /admin/header_tags_english.php

Lines 25-27 read:

	  $main['title'] = addslashes($_POST['main_title']);  //read in the knowns
  $main['desc'] = addslashes($_POST['main_desc']);
  $main['keyword'] = addslashes($_POST['main_keyword']);

change to:

	  $main['title'] = $_POST['main_title'];  //read in the knowns
  $main['desc'] = $_POST['main_desc'];
  $main['keyword'] = $_POST['main_keyword'];

the proper add & remove slashes are actually handled elsewhere.

 

But I only experienced it in the top DEFAULT tags boxes. Are you seeing it elsewhere?

Edited by surfalot
Link to comment
Share on other sites

I got this one working thanks for your help!

 

Does anyone know if there's a contrib that will create a unique footer on each of my pages? I want to optimize each of my page categories for the type of products im selling on that page.

 

Thanks,

Jay

Link to comment
Share on other sites

But I only experienced it in the top DEFAULT tags boxes. Are you seeing it elsewhere?

 

Thank you for the solution.

 

That was the only place where I have seen the problem. I made the correction, and now the 'Default Title' and the 'Default Descriptions' fields are ok, but I still get a duplicate slash (and more keep poping up with every update) in the 'Default Keyword(s)'. I'll look it up myself also, because hopefully I'll find the bug after you posted on the fix.

 

Now I have a different problem. Maybe someone else has this one too. When I tested to see if the 'Default Title' has problems, I've set a title something like "Store 'Commerce" (without quotes), just to have some characters that need escaping, and now I get the title "Store \'Commerce" and even after the fix, if I update it, it still says "Store \'Commerce" instead of the new value, even if in the 'Default Title' field the corect value is showed. It doesn't want to update...

 

If someone has stumbled on this problems and has a solution, please share :mellow:

Link to comment
Share on other sites

I found the solution to the double slash that keeps appearing in the 'Default Keyword(s)' field, even after removing the addslashes function.

 

In the same file and place as surfalot said earlier, /admin/header_tags_english.php

now I have the following lines:

	  $main['title'] = $_POST['main_title'];  //read in the knowns
  $main['desc'] = $_POST['main_desc'];
  $main['keyword'] = stripslashes($_POST['main_keyword']);

 

I tested to see if the first two lines work with the stripslashes function, but it doesn't matter if you put it or not. But in the last line, after I added that stripslashes function I get the normal text, even if it has '.

 

The title problem still remains. Even if I have set the correct title in the 'Default title' fileld, I still get an old title. It just won't update. I tried IE and Firefox to see if it was something from the browser but it shows the same. I use HTC 2.5.5.

Edited by umc
Link to comment
Share on other sites

Me again... I have manually set the title in includes/languages/english/header_tags.php and it's displayed ok now...

 

but I still don't know why it wasn't updated. Could it have something to do with the fact that I also have the STS contribution installed ? I read that STS has HTC included, but I installed STS after HTC, and the modifications from the catalog side remain. In the readme of STS it sais that when you want to install HTC you should do the admin side modification, copy the new files, but don't modify the files from the catalog side.

 

If that was already done by my I have to undo the modifications ? I'd rather not do a rollback, because between the installation of HTC and STS I have added more contribs, and I wouldn't like to add them again...

Link to comment
Share on other sites

I read that STS has HTC included, but I installed STS after HTC, and the modifications from the catalog side remain.

I can't speak for STS.

 

I have not experienced the continued problems you're having with HTC. After making the changes I posted, HTC has been working correctly, both in the admin and on the catalog.

Link to comment
Share on other sites

Hello,

 

I have Header Tags Controller installed on 4 shops now and I can tell you it is a fantastic tool for getting higher placement in the search engines. I'm thrilled with the results (and my clients are too). :P

 

I'm building a site now that is for art prints. My categories are the artists names, and I would like the product description page to include the Artist Name in the page title, as well as the title of the print. So I'd like the product page to show both the category and product name in the page title.

 

I'm not sure how to edit the header_tags.php file to handle this dynamically or if there is some other way? Is there somebody who can suggest what to do?

 

Many thanks for a great contrib!

Janet

Link to comment
Share on other sites

Spanish Header Tags do not update. English tags do.. What could be wrong? What can I check? I'm using HeaderTags_V_2.5.5

If you are referring to using the "Fill Tags" in the admin, try modifying file /admin/header_tags_fill_tags.php as mentioned in this post:

http://www.oscommerce.com/forums/index.php?sho...=51815&st=1640# (posts 1650-1655)

Link to comment
Share on other sites

Hello,

 

I have Header Tags Controller installed on 4 shops now and I can tell you it is a fantastic tool for getting higher placement in the search engines. I'm thrilled with the results (and my clients are too). :P

 

I'm building a site now that is for art prints. My categories are the artists names, and I would like the product description page to include the Artist Name in the page title, as well as the title of the print. So I'd like the product page to show both the category and product name in the page title.

 

I'm not sure how to edit the header_tags.php file to handle this dynamically or if there is some other way? Is there somebody who can suggest what to do?

 

Many thanks for a great contrib!

Janet

There is not any code in place to do what you want to do. You would need to edit the includes/header_tags.php file to read in the category name and then insert that into the title string where desired.

 

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 was working with version 2.4.4, and finally found the problem, inside admin/categories.php

 

This was the problem area of the code:

<?php
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
	 <tr>
		<td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></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_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? $products_description[$languages[$i]['id']] : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td>

		  </tr>
		</table></td>
	  </tr>
  <tr>
		<td colspan="2" class="main"><hr><?php echo TEXT_PRODUCT_METTA_INFO; ?></td>
	  </tr>
<?php
}
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>

 

It was cycling through languages, but the closing bracket was in the same section of php that used the next call to cycle through the languages. So what I did was to place the closing bracket in a section of its own, and the next call to languages did not then have a closing bracket in that section of code, as in:

<?php
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
	 <tr>
		<td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></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_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? $products_description[$languages[$i]['id']] : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td>

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

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

 

This gets rid of the problem of the additional 'Metta Tag Information' text appearing under the German and Spanish Product Description areas.

 

I could have saved myself a lot of work by looking at version 2.5.5 because that's how it's coded in the new version.

 

Vger

 

 

Did you compare the english/categories.php file with the german/categories.php file? I suppose it is possible that the define for Products Description
define('TEXT_PRODUCTS_DESCRIPTION', 'Products Description:');

was changed to Meta Tag Information by mistake in the other language files. That text can only come from teh cateogies.php file or the language file so if it is not the language file, I will try your categories file in my test shop if you want to post it.

 

Jack

Edited by Vger
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...