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 Jack,

I think I got it figured out. All I did was remove the reference to clean_html_comments from the line that was giving the Fatal Error.

I hope this is not going to cause any other problems. I can't beleive it was that easy, I always over complicate. Thanks again for all of your help,

I am off to install the sitemap contrib.

Link to comment
Share on other sites

  • Replies 4.6k
  • Created
  • Last Reply

Top Posters In This Topic

Well Yes My index.php files doesnt have the same lines of code as the text file wants me to change.

 

has 'similar'

 

I know a little and have tried and failed for a while now. If anyone can tell me what I should change then that would be sweet. As im asking for help I will reward if you like :)

 

Thanks for the reply Jack

 

Cheers

James

This is a common problem when installing contributions. You need to compare the code you have with that in the new contribution. Sometimes it is not obvious what to do. All you can do then is to changeit and see what happens. You may break a different contribuiton in the process so you need to be sure to back everything up so it can be restored. In your previous post, you had this

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

Are you saying you cannot find the code that it is saying to replace?

 

Jack

 

I filled in some title, description and keywords in product admin page and it showed up on the products page like it should.

 

I then removed the page product_info from admin -> header tags -> text control since i thought that page wasnt needed since i filled in the info above.. and now the tags in mu shop are gone on the product page! I added product_info.php in admin again but the tags do not show on the product page.. and yes, the info is still in admin -> catalog -> the product...

 

Somebody pleas help me.. the tags are showing on all other pages.. but not on the product pages. I have not modified the php files during this..

When you remove a page with the tool in admin like that, it eraes the entry from the header tags files in the shop. The product_info page is a special page and cannot just be added back in that way, You need to copy the code for it from the includes/header_tags.php file in the contribution. Don't just copy the whole file though or you will erase all of your other changes, unless there haven't been any.

 

Jack

 

 

Hi Jack,

I think I got it figured out. All I did was remove the reference to clean_html_comments from the line that was giving the Fatal Error.

I hope this is not going to cause any other problems. I can't beleive it was that easy, I always over complicate. Thanks again for all of your help,

I am off to install the sitemap contrib.

The code for that is needed. If your shop works fine with that part removed, then you have it declared somewhere else. As long as it works, you should be OK.

 

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

Thanks Jack!! :) W could not figure that out myself.

 

There is no "-" between product name and store name on the product page, like there is on the other pages. Am I suppose to add a "-" when filling in the title or could that be done automatical?

Link to comment
Share on other sites

Thanks Jack.. I have had this before but this one Im not dong very well with. I think need to learn some skills. Anyway to be very specific.

 

I need to:

 

Around line 78:



  Find



<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

  </tr>



  and replace it with 



	   <td><h1><?php echo $category['categories_htc_title_tag']; ?></h1></td>

	   <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

	  </tr>

	   <?php if (tep_not_null($category['categories_htc_description'])) { ?> 

	  <tr>

	   <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

	  </tr>

	  <tr>

	   <td><h2><?php echo $category['categories_htc_description']; ?></h2></td>

	  </tr>

	  <?php } ?>

 

 

and also

 

Around line 247:



  Find



?>

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

  <tr>

	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

	  <tr>

		<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>



  and replace it with 



  $category_query = tep_db_query("select cd.categories_htc_title_tag, cd.categories_htc_description from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");

  $category = tep_db_fetch_array($category_query); 

?>

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

  <tr>

	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

	  <tr>

		<td><h1><?php echo $category['categories_htc_title_tag']; ?></h1></td>

 

and finally

 

Around line 294



 Find



  <td align="right"><?php echo tep_image(DIR_WS_IMAGES . $image, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

 </tr>



REPLACE with



	   <td align="right"><?php echo tep_image(DIR_WS_IMAGES . $image, $category['categories_htc_title_tag'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

	  </tr>

	  <?php if (tep_not_null($category['categories_htc_description'])) { ?> 

	  <tr>

	   <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

	  </tr>

	  <tr>

	   <td><h2><?php echo $category['categories_htc_description']; ?></h2></td>

	  </tr>

	  <?php } ?>

 

These 3 find and replaces I cant do with the index.php file :( which is in the link of my previous post or

link

 

or better a d/l version zip version

 

If you can help Cheers and will sort you out somthing. If not cheers for replying. And I might have to get somone onto it.

 

James

 

 

This is all the instructions final instructions in Install_Catalogue.txt

 

Cheers

James

Link to comment
Share on other sites

You are using a template that considerably changes the code. It is possible to install it in such a template but the included instructions won't work for you. You need to find the code that is being included and make the changes there. Given your earlier statements about your level of experience regarding making these changes, it would be be a very difficult job for you to do I'm afraid.

 

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

I would re-install the includes/header_tags.php and english/header_tags.php files. If your title doesn't display correctly, then it is in the actual file. Otherwise, it is in one of the above.

 

Jack

Did you change the code in categories.php so that the header_tags code uses the eidtitor?

 

Jack

 

 

Jack,

 

I reinstalled the files and still have the same problem. I realized that the problem is occuring with 2 files that have names that are longer version of other files. For instance, "shopping_cart.php" is showing the title for "art.php" and "nigeria.php" is showing the title for "niger.php". I have everything defined correctly in the files -- I am not sure why it seems to be doing this. I am going to look through the code to see if anything stands out.

 

Julie

Link to comment
Share on other sites

I would re-install the includes/header_tags.php and english/header_tags.php files. If your title doesn't display correctly, then it is in the actual file. Otherwise, it is in one of the above.

 

Jack

Did you change the code in categories.php so that the header_tags code uses the eidtitor?

 

Jack

 

 

I tried moving my shorter file names, like "art.php" & "niger.php" to the end of includes/header_tags.php (after the longer file names) and it seems to have solved my problem. I looked through the code and don't see anything obvious as to why this was necessary.

Link to comment
Share on other sites

Hi. I seem to be having a problem with the same issue as somebody who recently posted. No matter what I try, the category name never appears in the title bar, nor do the names for the products on their respective pages' title bars.

 

Anybody hae some ideas?

 

Some background: I've had a topic going on this on the installation forum (http://www.oscommerce.com/forums/index.php?showtopic=177874)

Early on, I needed to install the registe_globals patch.

 

Thank you very much.

Bruce

 

Did you run fill_tags? If you click on edit for a product in admin->catalog, do the header tags fields have entries?

 

Jack

 

Hi. Thank you. But, yes, I did that earlier - and still nothing.

Bruce

Link to comment
Share on other sites

Still nothing doesn't help. Please see my previous post:

If you click on edit for a product in admin->catalog, do the header tags fields have entries?

 

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

The point was that if I am to help you, I need an answer to the question. I assume that your response this time means you have looked at the product to see if the meta tags are filled but since you won't answer that question, I could be mistaken.

 

Assumming that is true and that the problem is that your category titles are not showing, then that only leaves the index.php file. The code on that page was not changed or not changed properly. You should double check the instructions and make sure you have made all of the required changes.

 

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

The point was that if I am to help you, I need an answer to the question. I assume that your response this time means you have looked at the product to see if the meta tags are filled but since you won't answer that question, I could be mistaken.

 

Assumming that is true and that the problem is that your category titles are not showing, then that only leaves the index.php file. The code on that page was not changed or not changed properly. You should double check the instructions and make sure you have made all of the required changes.

 

Jack

 

Jack,

I'm sorry. Yes, the fields are filled. I'll double check everything I did. I checked around on my site last night a bit and noticed that the shipping.php page comes with osCommerce in the title bar - and I changed that earlier in admin. So the contribution seems not to be working at all for me.

Now the title bar seems to be the least of my problems. This contributions is the last change I've made to the site, and last night was the first time I went to sign in on my shopping cart since the change, and I all I get now after signing in is a blank page.

I really need some help.

Thank you.

Bruce

Link to comment
Share on other sites

Bhomis

I am having the same problem as you are, i have entry fields for the category header tags, but if you type something in there, and then view source for that category, nothing shows up. My index page matches that of the one in the contrib yet I am still having problems.

Link to comment
Share on other sites

Bhomis

Ok i think i got it working. It's all about how you are filling out the header tag page in includes/lang/english/header_tags

This is how i Have mine and seems to be working now; replace my website name/keywords with your own

// For all pages not defined or left blank, and for products not defined

// These are included unless you set the toggle switch in each section below to OFF ( '0' )

// The HEAD_TITLE_TAG_ALL is included BEFORE the specific one for the page

// The HEAD_DESC_TAG_ALL is included AFTER the specific one for the page

// The HEAD_KEY_TAG_ALL is included AFTER the specific one for the page

define('HEAD_TITLE_TAG_ALL','J.A.W. Products, Inc. : ');

define('HEAD_DESC_TAG_ALL',' J.A.W. Products, Inc. : Great prices on

blah blah blah blah blah blah');

define('HEAD_KEY_TAG_ALL','your default keywords');

 

// DEFINE TAGS FOR INDIVIDUAL PAGES

 

// index.php

define('HTTA_DEFAULT_ON','0'); // Include HEAD_TITLE_TAG_ALL in Title

define('HTKA_DEFAULT_ON','0'); // Include HEAD_KEY_TAG_ALL in Keywords

define('HTDA_DEFAULT_ON','0'); // Include HEAD_DESC_TAG_ALL in Description

define('HTTA_CAT_DEFAULT_ON', '1'); //Include HEADE_TITLE_DEFAULT in

 

CATEGORY DISPLAY

define('HEAD_TITLE_TAG_DEFAULT', 'J.A.W. Products, Inc.');

define('HEAD_DESC_TAG_DEFAULT','J.A.W. Products, Inc. :

blah blah blah blah description');

define('HEAD_KEY_TAG_DEFAULT','default keywords');

 

// product_info.php - if left blank in products_description table these values will be used

define('HTTA_PRODUCT_INFO_ON','0');

define('HTKA_PRODUCT_INFO_ON','0');

define('HTDA_PRODUCT_INFO_ON','0');

define('HEAD_TITLE_TAG_PRODUCT_INFO','0');

define('HEAD_DESC_TAG_PRODUCT_INFO','0');

define('HEAD_KEY_TAG_PRODUCT_INFO','0');

 

// products_new.php - whats_new

define('HTTA_WHATS_NEW_ON','0');

define('HTKA_WHATS_NEW_ON','0');

define('HTDA_WHATS_NEW_ON','0');

define('HEAD_TITLE_TAG_WHATS_NEW','New Products');

define('HEAD_DESC_TAG_WHATS_NEW','');

define('HEAD_KEY_TAG_WHATS_NEW','');

 

// specials.php

// If HEAD_KEY_TAG_SPECIALS is left blank, it will build the keywords from the

 

products_names of all products on special

define('HTTA_SPECIALS_ON','0');

define('HTKA_SPECIALS_ON','0');

define('HTDA_SPECIALS_ON','0');

define('HEAD_TITLE_TAG_SPECIALS','Specials');

define('HEAD_DESC_TAG_SPECIALS','');

define('HEAD_KEY_TAG_SPECIALS','');

 

// product_reviews_info.php and product_reviews.php - if left blank in

 

products_description table these values will be used

define('HTTA_PRODUCT_REVIEWS_INFO_ON','1');

define('HTKA_PRODUCT_REVIEWS_INFO_ON','1');

define('HTDA_PRODUCT_REVIEWS_INFO_ON','1');

define('HEAD_TITLE_TAG_PRODUCT_REVIEWS_INFO','');

define('HEAD_DESC_TAG_PRODUCT_REVIEWS_INFO','');

define('HEAD_KEY_TAG_PRODUCT_REVIEWS_INFO','');

 

?>

 

 

I spoke too soon, it seems to be calling keywords and title AND description all as the same as the category title, wont show anything that i type in myself.

Link to comment
Share on other sites

I am so confused; I thought the point of this contribution was so that we could also add our own keywords to the product edit pages, why else is there a space for this? Yet when i enter words, nothing happens, it just puts the product title as the keywords, descrip and title but it doesnt add the words i type at all. sometimes i need to put phrases for people to find us, but its not showing anything i type

Link to comment
Share on other sites

Try adding a keyword in the keyword box for a product in admin. After you save it, switch to some other part of the admin section and then go back to that product. Is your keyword still there? If not, then you have a problem in the categories.php file. If it is, then you have a problem in the product_info.php file. Let me know which it is and we can go from there.

 

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

Yes if i type words in the entry boxes, they do stay there when i come back to the page. but I have NO IDEA what is going on. Here is an example

If you go to this page:

http://jawproducts.com/catalog/index.php?cPath=25_143_216

If you view the source, it says wax spatulas for all the metas. Yet i do not have the word "wax spatula" typed ANYWHERE in the metas. I have other words in there to test it, i typed "test keywords", "Test descriptioN" for the metas and it does nothing.

Thanks Jack

 

That "fill tags" section on the admin panel is dangerous, instructions say to hit "fill tags" or "fill all" or "fill only emptY" but when i hit that , all my product info tags that i already had inserted disappear and it just goes back to the title of the pages for the tags. Im so frustrated

Link to comment
Share on other sites

Try adding a keyword in the keyword box for a product in admin. After you save it, switch to some other part of the admin section and then go back to that product. Is your keyword still there? If not, then you have a problem in the categories.php file. If it is, then you have a problem in the product_info.php file. Let me know which it is and we can go from there.

 

Jack

 

Jack,

Hi there. Thanks for your help. I've been combing through everything step by step that I did and I found an error I made in application_top.php which corrected everything but the categories and the products showing up in the title bar. It seems as though everything else I did was correct though.

 

Okay, I did what you said and the keyword is still there. So it's product_info.php?

 

Thanks,

Bruce

Link to comment
Share on other sites

CATEGORY DISPLAY

define('HEAD_TITLE_TAG_DEFAULT', 'J.A.W. Products, Inc.');

define('HEAD_DESC_TAG_DEFAULT','J.A.W. Products, Inc. :

blah blah blah blah description');

define('HEAD_KEY_TAG_DEFAULT','default keywords');

 

CATEGORY DISPLAY? Where do I find that?

Thanks,

Bruce

Link to comment
Share on other sites

Yes if i type words in the entry boxes, they do stay there when i come back to the page. but I have NO IDEA what is going on. Here is an example

If you go to this page:

http://jawproducts.com/catalog/index.php?cPath=25_143_216

If you view the source, it says wax spatulas for all the metas. Yet i do not have the word "wax spatula" typed ANYWHERE in the metas. I have other words in there to test it, i typed "test keywords", "Test descriptioN" for the metas and it does nothing.

Thanks Jack

 

That "fill tags" section on the admin panel is dangerous, instructions say to hit "fill tags" or "fill all" or "fill only emptY" but when i hit that , all my product info tags that i already had inserted disappear and it just goes back to the title of the pages for the tags. Im so frustrated

You have to have Wax in there somewhere since it is not part of the shop nor of Header Tags. When you go to admin->Header Tags->Text Control, are you saying you don't see it anywhere?

 

As for fill tags, making backups is always the an easy lesson to learn after you do that a few times. The option works fine for me and no one else has a reported a problem. But that doesn't mean that there isn't a problem on your shop. So whenever you run a new tool like this, always do a backup first. Just go to admin->tools->backup and click the button. It only takes a minute.

 

Jack

 

 

Jack,

Hi there. Thanks for your help. I've been combing through everything step by step that I did and I found an error I made in application_top.php which corrected everything but the categories and the products showing up in the title bar. It seems as though everything else I did was correct though.

 

Okay, I did what you said and the keyword is still there. So it's product_info.php?

 

Thanks,

Bruce

The problem is in the product_info.php file, the includes/header_tags.php file or the includea/languages/english/header_tags.php file (most unlikely). The only problem it could be on the product_info.php file is if you didn't add the code to replace the title in the head section of the page. If that is OK, try replacing, temporairly, the includes/header_tags.php file. Does it work then?

 

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

The problem is in the product_info.php file, the includes/header_tags.php file or the includea/languages/english/header_tags.php file (most unlikely). The only problem it could be on the product_info.php file is if you didn't add the code to replace the title in the head section of the page. If that is OK, try replacing, temporairly, the includes/header_tags.php file. Does it work then?

 

Jack

 

Jack,

Hi. Thanks.

I'm okay with my product_info.php. What should I be looking for on either header_tags.php page?

Bruce

Link to comment
Share on other sites

Hi,

 

I still can't get Fill Tags to work properly.. everything else seems to work. I suppose Fill Tags should be able to fill in meta tags from the product name and product description, but when I try with for example "Fill only empty tags" nothing happens. Fo fill the tags manually is not a problem, but I would really appreciate the auto fill.

Edited by Fredrik.r
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...