Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sign in to follow this  
Farrukh

[Contribution] Header Tags Controller for Admin MS 2.2

Recommended Posts

I got this error message when i tried to enter the meta descriptions and keywordsError: ''I can not write to this file. Please set the right user permissions on: /hsphere/local/home/tesfaye9/madeinafrica.com.au//index.php

Please help

 

 

Tesfaye

Share this post


Link to post
Share on other sites

Change the permissions in the following files to 777 (CHMOD).

 

catalog/includes/header_tags.php

catalog/includes/languages/english/header_tags.php

 

 

 

One thing I have noticed is that when I view the page source of my site, the product name does not have a space before the category.

 

eg.

 

ProductCategory

 

instead of

 

Product Category.

 

 

 

 

Next question:

Which options do most people have ticked with regards to HTTA HTDA HTKA HTCA. Do you generally have then the same for all or differnent ones for different pages? If so, which do you suggest for what?

 

 

 

 

One final question.

 

When entering the Keywords, should I be putting a comma after each one. eg Keyword 1, Keyword 2 (or should it be keyword 1 keyword 2)

 

Cheers

Edited by DeadDingo

Share this post


Link to post
Share on other sites

Cheers Jack

 

 

I have been checking my pages and not all them seem to be working correctly.

 

I did CHMOD 777

catalog/includes/header_tags.php

catalog/includes/languages/english/header_tags.php

 

The languages ones seems to be updating correctly, but the includes/header_tags.php does not seem to be doing so.

 

I have added the extra pages in the admin area for areas like cuntact_us, Shipping etc etc. They appear in the admin area, but the tags are not showing on the actual pages.

 

I then checked the includes/header_tags.php file and it has not added a lot of the pages. Some it has, but the majority it has not. If I manually edit the file it then works.

 

Any reason why it is not automatically updating the page?

 

Also when viewing a categories pages, it is not adding the categories name to the tags. Just the default info is there

Edited by DeadDingo

Share this post


Link to post
Share on other sites

 

Ive just installed the new version, on product_info ive got HTPA selected. but it comes out like

 

Product NameCategory ,

in the meta keyword and description

 

How can i get a space between productname and category

 

 

It works fine when I test it here but that might be due to the other settings. Do you have any other HT boxes checked for the product_info section?

 

Jack

 

I have managed to fix most of the issues above (by putting the original 2 files back that were found in the contrib) , but I am still getting the same problem that Philly had. (Only HTPA is selected, also tried it with others selected as well)

 

My metatags look like this

 

<title>Female Stars - Elizabeth Berkley</title>

<meta name="Description" content="Elizabeth BerkleyFemale Stars - " />

<meta name="Keywords" content="Elizabeth BerkleyFemale Stars , " />

 

It looks as though the "-" and "," are at the end instead of being between the 2 sections.

 

Please help.

Share this post


Link to post
Share on other sites
Guest

I am using XAMPP on my computer so I can test before using. I installed the Header Tags Controller per instructions that came with the download. Here are my notes as I installed;

 

In Catalog install instructions it says;

 

In product_info.php (around line 104)

 

FIND

<td class="pageHeading" valign="top"><?php echo $products_name; ?></td>

<td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>

 

REPLACE with

 

<td valign="top"><h1><?php echo $products_name; ?></h1></td>

<td align="right" valign="top"><h1><?php echo $products_price; ?></h1></td>

 

I don't have what's under find in my product_info.php.

 

Any idea's?

 

In Catalog install instructions it says;

 

In product_info.php

 

FIND: (around line 200)

<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>

</tr>

<?php

}

?>

 

 

ADD UNDER IT:

 

<tr>

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

</tr>

<tr>

<td class="smallText" align="center"><?php echo TEXT_VIEWING; ?> 

<?php echo '<a title="' . $tags_array['title'] . '" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_info['products_id'], 'NONSSL') . '"/# ' . $tags_array['title'] . '">' . $tags_array['title']; ?></a></td>

</tr>

 

NOTE: The placement of this is not critical. Anywhere neat the bottom of the page is fine.

You can also change or remove the TEXT_VIEWING text to fit your site.

 

I don't have what's under find in my product_info.php.

 

Any idea's?

 

 

After install I found this in the Admin-Catalog;

 

BOX_CATALOG_IMP_EXP

 

When I click on it I get the following error;

 

Object not found!

The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

 

If you think this is a server error, please contact the webmaster.

 

Error 404

localhost

03/31/07 11:28:00

Apache/2.2.2 (Win32) DAV/2 mod_ssl/2.2.2 OpenSSL/0.9.8b mod_autoindex_color PHP/5.1.4

 

 

Everything in admin seems to be working. When I go to my store and click on a category there is this statement at the top;

 

if (isset($HTTP_GET_VARS['manufacturers_id'])) $db_query = tep_db_query("select manufacturers_htc_title_tag as htc_title, manufacturers_htc_description as htc_description from " . TABLE_MANUFACTURERS_INFO . " where languages_id = '" . (int)$languages_id . "' and manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); else $db_query = tep_db_query("select categories_htc_title_tag as htc_title, categories_htc_description as htc_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'"); $htc = tep_db_fetch_array($db_query); ?>

 

and when I click to view a product I get a blank page.

 

Appearantly I need help ..... PLEASE anyone??????

 

I have the following Contributions installed and working before this install.

About_PayPal_Box

Guest Account v2.2 MS2

osCommerce_PayPal_IPN_v2.2

RSS Feed v1.0

 

 

 

Thanks

 

Michael

Share this post


Link to post
Share on other sites
Guest
I am using XAMPP on my computer so I can test before using. I installed the Header Tags Controller per instructions that came with the download. Here are my notes as I installed;

Everything in admin seems to be working. When I go to my store and click on a category there is this statement at the top;

and when I click to view a product I get a blank page.

 

Appearantly I need help ..... PLEASE anyone??????

 

I have the following Contributions installed and working before this install.

About_PayPal_Box

Guest Account v2.2 MS2

osCommerce_PayPal_IPN_v2.2

RSS Feed v1.0

Thanks

 

Michael

 

See above post - My stores product page does come up with the product but you have to scroll 2-3 pages down to see it ???

Share this post


Link to post
Share on other sites
if (isset($HTTP_GET_VARS['manufacturers_id'])) $db_query = tep_db_query("select manufacturers_htc_title_tag as htc_title, manufacturers_htc_description as htc_description from " . TABLE_MANUFACTURERS_INFO . " where languages_id = '" . (int)$languages_id . "' and manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); else $db_query = tep_db_query("select categories_htc_title_tag as htc_title, categories_htc_description as htc_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'"); $htc = tep_db_fetch_array($db_query); ?>
If you are seeing the above on the page, it means you made a mistake in the installation. A php delimiter was most like not copied so the code is being seen as html.

 

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

Share this post


Link to post
Share on other sites
Guest
If you are seeing the above on the page, it means you made a mistake in the installation. A php delimiter was most like not copied so the code is being seen as html.

 

Jack

 

I found it. It stopped the stuff on topp but I still have the other problems. Thanks Jack :)

Share this post


Link to post
Share on other sites

That can be caused by having the HT boxes checked, which will attached the default values, and not having anything in the default values.

 

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

Share this post


Link to post
Share on other sites

I only have thw HTPA box ticked and my default values have been filled in.

 

If I untick the HTPA box, it just lists her name. But I want more than just the name listed so I have to have the box ticked

Edited by DeadDingo

Share this post


Link to post
Share on other sites

I have unticked the HTPA box as that is the one causing the problem. I have some of the others ticked instead to give me extra info needed.

 

 

On a different issue :(

 

When I go to my Admin Catalog area I get the following error

 

Parse error: syntax error, unexpected T_CASE in /admin/categories.php on line 337

 

tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$dup_products_id . "', '" . (int)$categories_id . "')");

$products_id = $dup_products_id;

}

 

if (USE_CACHE == 'true') {

tep_reset_cache_block('categories');

tep_reset_cache_block('also_purchased');

}

}

 

tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $categories_id . '&pID=' . $products_id));

break;

case 'new_product_preview':

// copy image only if modified

$products_image = new upload('products_image');

$products_image->set_destination(DIR_FS_CATALOG_IMAGES);

if ($products_image->parse() && $products_image->save()) {

$products_image_name = $products_image->filename;

} else {

$products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : '');

}

break;

}

}

 

Line 337 is the one in Bold

Edited by DeadDingo

Share this post


Link to post
Share on other sites
Guest
I don't know what the other problems are.

 

Jack

 

 

It was the entry in the column_left.php. I took it out and works good so far.

Share this post


Link to post
Share on other sites
I have unticked the HTPA box as that is the one causing the problem. I have some of the others ticked instead to give me extra info needed.

On a different issue :(

 

When I go to my Admin Catalog area I get the following error

 

Parse error: syntax error, unexpected T_CASE in /admin/categories.php on line 337

Line 337 is the one in Bold

 

I have found what my problem was. There was an extra } above the problem area

 

}

//HTC EOC

}

 

tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$dup_products_id . "', '" . (int)$categories_id . "')");

$products_id = $dup_products_id;

}

 

if (USE_CACHE == 'true') {

tep_reset_cache_block('categories');

tep_reset_cache_block('also_purchased');

}

}

 

tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $categories_id . '&pID=' . $products_id));

break;

case 'new_product_preview':

// copy image only if modified

(the red line was the bit that the error was complaining about. The bold } was the offending item causing the problem)

 

 

Sorry for all the posts, just wanted to update and give feedback on how I corrected my mistakes, incase it helps others.

 

 

 

 

Also if you use the fckeditor you will need to make an edit to in the categories.php update to get it to work properly

 

change

<?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']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td>
		  </tr>
		</table></td>
	  </tr>
<?php
}
?>

 

to

 

<?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_fckeditor('products_description[' . $languages[$i]['id'] . ']','600','300',(isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td>
		  </tr>
		</table></td>
	  </tr>
<?php
}
?>

Share this post


Link to post
Share on other sites
Guest

After testing on home computer using XAMPP I installed in online store. In admin I get the following'

 

Warning: file(includes/languages/english/header_tags.php) [function.file]: failed to open stream: No such file or directory in /hsphere/local/home/mkelly60/wholesaleplace.net/images2/header_tags_controller.php on line 280

 

I also have;

 

Permissions settings for the includes/header_tags.php file appear to be incorrect 
Permissions settings for the includes/languages/english/header_tags.php file appear to be incorrect 

 

I have tried chmod 755 and 777 with no luck. Any suggestions?

 

Thanks to all for a good thread :)

Share this post


Link to post
Share on other sites

What are you using to CHMOD. I found that my hsphere would not do it properly, so I had to use wsftp (refresh the page after to make sure it is OK) It needs to be 777.

 

Did you upload all the files to the correct place? If so try reuploading the head_tag files again from the contrib.

 

 

Also sent you a PM regading something else

Share this post


Link to post
Share on other sites
Guest
What are you using to CHMOD. I found that my hsphere would not do it properly, so I had to use wsftp (refresh the page after to make sure it is OK) It needs to be 777.

 

Did you upload all the files to the correct place? If so try reuploading the head_tag files again from the contrib.

Also sent you a PM regading something else

 

Thanks For the Info. I had the paths set wrong in admin. Oh ... thanks for the other info. :) It's being changed !!!!

Share this post


Link to post
Share on other sites

A new version has been uploaded. It is mainly just a maintenance update. The following changes were made:

 

-> Fixed - code in includes/header_tags.php for index page was not loading the tags correctly for other languages.

-> Fixed problem with functions file being loaded twice in some shops (changed require to require_once in admin/header_tags_controller.php and admin/header_tags_english.php).

-> Fixed - coding mistake in includes/header_tags.php that prevented the manufacturers from being displayed.

-> Fixed coding mistake in admin/includes/header_tags_controller.php as found by jonatanvalencia.

-> Removed unnecessary code from the includes/header_tags.php file for the all products section.

-> Added code to display the correct permissions settings when they are not set correctly.

 

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

Share this post


Link to post
Share on other sites

Hi,

 

I just updated to 2.6.3

 

One thing..

 

Ive set product_info to be HTPA only

 

www.mojointeriors.co.uk

 

If you click on any product on the above link, for example the Arne Jacobsen Egg Chair

 

and then look at the page info, (i have disabled right click so you may have to work around this)

 

I get "Arne Jacobsen, Egg Chair, Chair, Chairs, Designer Arne jacobsen, Designer FurnitureChairs - Lounge ,"

 

it seems to have not incorporated a space between the product keywords and the category name in both the keywords / description meta tags?

 

Any ideas on how i can solve this?

Share this post


Link to post
Share on other sites

That is a coding mistake from the previous version. To fix it, in includes/header_tags.php, find

 

$tags_array['desc']= $the_product_info['products_head_desc_tag'];
  if (HTPA_DEFAULT_ON=='1') {
	$tags_array['desc'] .= $cat['cat_name'] . ' - ';		 //display cat name too

and change the last line to

$tags_array['desc'] .= ' ' . $cat['cat_name'] . ' - ';		 //display cat name too

Then find

$tags_array['keywords']= $the_product_info['products_head_keywords_tag'];
  if (HTPA_DEFAULT_ON=='1') {
	$tags_array['keywords'] .= $cat['cat_name'] . ' , ';		 //display cat name too

and change the last line to

$tags_array['keywords'] .= ' ' . $cat['cat_name'] . ' , ';		 //display cat name too

 

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

Share this post


Link to post
Share on other sites

Are there a limited number of pages you can add to the header tags area? After I did the updates all my extra pages info got lost, even though it was in the admin area and the languages file.

 

Also when adding pages and the info (within page control) I then go into Text control and some sections are blank where I actually put text and some are mixed up with others.

 

I end up having to start again with it all and hope that it all works.

Share this post


Link to post
Share on other sites

Hi!

 

I'm almost entering panic mode. I've just discovered that meta tags aren't being published at all on my site. All I get are is the basic title tag.

 

I don't get any keywords, descriptions or titles from the product pages. No keywords or anything on the home page either.

 

I do have the header tags controller that came with the install of OS Commerce. I downloaded the package back in January.

 

I'm not even sure where to start looking from here.

 

Any suggestions?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×