Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

Did you make the changes to the head section of the index.php file? When you go to admin->Header Tags->Text Control, is the label index in red or black?

 

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

Did you make the changes to the head section of the index.php file? When you go to admin->Header Tags->Text Control, is the label index in red or black?

 

Jack

 

Hi Jack,

 

Yes I made changes to heed section and also all files in Admin>>Header Tags >>Text Control are black, index as well.

 

 

Andrew

Link to comment
Share on other sites

Are you using STS?

 

Jack

 

No I am not using STS.

I try to keep it simple, and installed only a few contribution. The most recent one was Ultimate_SEO_urls, and google site map. I am on IIS server.

 

 

Andrew

Link to comment
Share on other sites

Then the includes/header_tags.php and/or english/header_tags.php file are at fault. Start by checking your english/header_tags.php file to make sure it has the text you want to display for the index page.

 

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

Then the includes/header_tags.php and/or english/header_tags.php file are at fault. Start by checking your english/header_tags.php file to make sure it has the text you want to display for the index page.

 

Jack

 

Hi Jack,

 

includes/header_tags.php caused the problem .

 

Thanks again for the great support ! :thumbsup:

 

Andrew

Link to comment
Share on other sites

hi there

 

 

i have oscommerce site installed and i am trying to change evrything as according to the install instructions included with the The Header Tags Controller file

 

 

 

i am lost...i was going along replacing the code as suggested in the index file and in the product_info file.

then i came across some code it was asking me to find and i found it was not there...??

 

SO now i am stopped in my tracks

 

 

what can i do? Or better yet can i pay someone to edit the files for me?

 

Maybe i have the wrong version of osc???

 

 

 

PLEASE HELP!!!!

Link to comment
Share on other sites

You didn't say what it is that you can't find.

 

Jack

 

 

ok...i see that...

 

 

i was able to change in the index.php file and the product_info.php file as much as i could.

 

i got to this and had to stop, because the text was not there for me to replace...

 

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 } ?>

=============================================

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

 

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);

?>

<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 $htc['htc_title']; ?></h1></td>

 

 

Around line 298

 

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($htc['htc_description'])) { ?>

<tr>

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

</tr>

<tr>

<td><h2><?php echo $htc['htc_description']; ?></h2></td>

</tr>

<?php } ?>

 

================================================================================

======================

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>

 

NOTE: In any page in which you make the change to the title for Header Tags, you should

also locate the line containing HEADING_TITLE, remove the pageHeading class and

add the h1 tags as above.

 

 

 

 

 

I did notice that in the original copy of oscommerce 2.2 that the index.php and product_info.php files did have the required text to change. So i tried to replace the files in the template i have to the ones form oscommerce 2.2 and got all kinds a errors...obviosly that wasnt a good idea...

 

 

When installing a template over top of oscommerce 2.2 which folders and files from the template need to overwrite the original osc files and folders

 

 

thx alot...

Link to comment
Share on other sites

Hello,

 

htc works fine but i don´t like the way how the product keywords are added.

 

Now it looks like: World War III Special Trip .. (Name of the product)

 

So it´s possible to change the header_tags_fill_tags.php that the keywords that will be added looks like:

 

World War III Special Trip, world, war, III, speical, trip

 

hope anybody can help..

 

bye

Marco

Link to comment
Share on other sites

I did notice that in the original copy of oscommerce 2.2 that the index.php and product_info.php files did have the required text to change. So i tried to replace the files in the template i have to the ones form oscommerce 2.2 and got all kinds a errors...obviosly that wasnt a good idea...

When installing a template over top of oscommerce 2.2 which folders and files from the template need to overwrite the original osc files and folders

thx alot...

Far too many to list here and it isn't related to Header Tags. If the template removes the code that is mentioned in the instructions, you can skip that part or figure out how to add it back in.

 

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,

 

htc works fine but i don´t like the way how the product keywords are added.

 

Now it looks like: World War III Special Trip .. (Name of the product)

 

So it´s possible to change the header_tags_fill_tags.php that the keywords that will be added looks like:

hope anybody can help..

 

bye

Marco

You wouldn't want the same keywords for every product. That would be a mistake so changing fill tags wouldn't be the way to do it. Just go into a product edit page and edit the tags the way you want.

 

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

A new version has been uploaded. It contains the following changes:

 

- Fixed mistakes in the install instructions.

- Fixed problem with the specials page where the default keywords were always being appended to the keywords string, regardless of the HTKA setting.

- Fixed typo in includes/header_tags.php for about us section.

- Fixed code in admin/includes/functions/header_tags.php file for write function - misspelled variable

- Fixed spelling mistake in includes/header_tags.php for product_reviews.

- Added fix to index code so the category and manufacturer descriptions cover the whole width of the page (per fix mentioned on the forum).

- Added German and Spanish files provided in other versions.

- Added missing code in includes/languages/english/header_tags.php for products_reviews_write.php.

- Added new switch option, HTPA, for product_info page. When set, the category name for the product will be added to the title and meta tags.

- Added option to check permissions settings.

- Removed debug statement from header_tags_controller.php file.

- Removed code for products_all in includes/header_tags.php since it is for an out-dated contribution.

- Changed code in Page Control to prevent deletion of special case pages.

- Changed code to allow page names with a dash to be added in Page Control.

- Changed fill tags code to account for error found by drachenpaps.

- Cleaned up instructions, removed unused code from files.

 

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

Jack,

 

I'm having some trouble here. Great contrib BTW.

 

I changed,

 

	  $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

 

To this

 

	  $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

 

So that in the keywords it displays properly but it's still off on the spacing as it needs a space before just not 100% sure on how to.

 

here's an example page;

 

http://www.misterbling.com/spinning-duo-to...atch-p-116.html

 

Notice the "Spinning Rim Watches" being the category. Before it had a - now it's a , but the space is still needed.

 

Thanks

Edited by misterbling
Link to comment
Share on other sites

I have just installed Header Tags V2.5.9.1 . I am getting no error codes but my Product Tags are not getting updated. I get the default on each page. My Category, Manufacturer, and Product Header Titles and description displayed on my pages are fine, but no Meta changes.

Rick

 

I'm having the same trouble with today's new version. The product info page shows the default settings and adding some debugging lines seems to indicate that the problem lies with /catalog/includes/header_tags.php simply ignoring the switch (true) as far as evaluating the cases following. Dumping the result of the case strstr gives either the page name if true or blank if false, and it doesn't seem to evaluate the page name as 'true' ?! Is there perhaps another test I can add, maybe eval(strstr($_SERVER['PHP_SELF'],FILENAME_PRODUCT_INFO)) or some such thing?

 

TIA, this is a wonderful contribution, though intertwining it with the SEO package has been a bit of a job.

Link to comment
Share on other sites

	  $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

 

To this

 

	  $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

 

Notice the "Spinning Rim Watches" being the category. Before it had a - now it's a , but the space is still needed.

 

Thanks

Good catch. That should be a comma for the keywords. As for the space, just change ',' to ' ,', although spaces don't matter in keywords.

 

Jack

Edited by Jack_mcs

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'm having the same trouble with today's new version. The product info page shows the default settings and adding some debugging lines seems to indicate that the problem lies with /catalog/includes/header_tags.php simply ignoring the switch (true) as far as evaluating the cases following. Dumping the result of the case strstr gives either the page name if true or blank if false, and it doesn't seem to evaluate the page name as 'true' ?! Is there perhaps another test I can add, maybe eval(strstr($_SERVER['PHP_SELF'],FILENAME_PRODUCT_INFO)) or some such thing?

 

TIA, this is a wonderful contribution, though intertwining it with the SEO package has been a bit of a job.

I don't understand what you are having difficulty with. If the new switch isn't changing, be sure it has been added to the includes/languages/english/header_tags.php file.

 

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 don't understand what you are having difficulty with. If the new switch isn't changing, be sure it has been added to the includes/languages/english/header_tags.php file.

 

Jack

 

Thanks for the quick response, Jack. In preparing to respond just now I stuck my debug text inside the product info switch area and lo, see it echoed to the page, so it looks like it works if you work it, as they say.... I need to take a good look at the checkboxes and what it is they do, cuz that's where my problem lies. Thanks again for an incredibly cool tool that I just need to get a little experience with. Happy holidays! ;)

 

-m

Link to comment
Share on other sites

A new version has been uploaded. It contains the following changes:

 

- Added missing code in includes/languages/english/header_tags.php for products_reviews_write.php.

 

Jack

Jack, in the above file you changed a couple of lines as follows:

 

define('HEAD_TITLE_TAG_ALL','osCommerce :');

where the old code was:

 

define('HEAD_TITLE_TAG_ALL','osCommerce : ');

The only difference was the space between the : '); at the end of osCommerce. Was this done on purpose? What difference does it make?

 

Thanks,

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

hi there

 

 

thanks 4 the reply

 

maybe you could have a look at what i have done so far..i installed the header code, and it is working great! with the great template i wanted installed too!. but now i must have messed up some tables codeing or something like that, because when a categorie is viewed it shows it on the far right side...and when a product is opened it moves it to the right side as well...i think i have narrowed it down to somewhere in the product_info.php file ...whew lots a trial and error on those two files...(index.php and product_info.php)

 

demo store address is www.inetarticle.com/dlstore

 

admin is as usuall located at /dlstore/admin

 

if you can help please let me know...I'll b up 4 a while

 

john

Link to comment
Share on other sites

Hi,

 

I have installed this great contibution <the STS v4.3 +HTC2.5.9 Package>.

 

In addition to these two contributions, i have the Ulitmate SEO, The Articles, and the Xsell prouduct contributions as well.

 

the problem is mainly (for now...) with the Xsell and the HTC contributions: Ffter i added to the ADMIN--> Includes--> FILENAMES.PHP the "Define" lines for the HTC i seem to get an error when clicking on the Cross Sell Product link in: Administration--> cataloge.

iget the following 404 error:

 

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

Not Found

The requested URL /shop/admin/xsell_products.php was not found on this server.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

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

 

when i removed the HTC Define Lines from the FILENAMES.PHP file, the cross sell worked...

 

plssssssss help as i want to keep both contributions....

 

Below is the ADMIN-->includes--> filenames.php

 

// define the filenames used in the project

define('FILENAME_BACKUP', 'backup.php');

define('FILENAME_BANNER_MANAGER', 'banner_manager.php');

define('FILENAME_BANNER_STATISTICS', 'banner_statistics.php');

define('FILENAME_CACHE', 'cache.php');

define('FILENAME_CATALOG_ACCOUNT_HISTORY_INFO', 'account_history_info.php');

define('FILENAME_CATEGORIES', 'categories.php');

define('FILENAME_CONFIGURATION', 'configuration.php');

define('FILENAME_COUNTRIES', 'countries.php');

define('FILENAME_CURRENCIES', 'currencies.php');

define('FILENAME_CUSTOMERS', 'customers.php');

define('FILENAME_DEFAULT', 'index.php');

define('FILENAME_DEFINE_LANGUAGE', 'define_language.php');

define('FILENAME_FILE_MANAGER', 'file_manager.php');

define('FILENAME_GEO_ZONES', 'geo_zones.php');

define('FILENAME_LANGUAGES', 'languages.php');

define('FILENAME_MAIL', 'mail.php');

define('FILENAME_MANUFACTURERS', 'manufacturers.php');

define('FILENAME_MODULES', 'modules.php');

define('FILENAME_NEWSLETTERS', 'newsletters.php');

define('FILENAME_ORDERS', 'orders.php');

define('FILENAME_ORDERS_INVOICE', 'invoice.php');

define('FILENAME_ORDERS_PACKINGSLIP', 'packingslip.php');

define('FILENAME_ORDERS_STATUS', 'orders_status.php');

define('FILENAME_POPUP_IMAGE', 'popup_image.php');

define('FILENAME_PRODUCTS_ATTRIBUTES', 'products_attributes.php');

define('FILENAME_PRODUCTS_EXPECTED', 'products_expected.php');

define('FILENAME_REVIEWS', 'reviews.php');

define('FILENAME_SERVER_INFO', 'server_info.php');

define('FILENAME_SHIPPING_MODULES', 'shipping_modules.php');

define('FILENAME_SPECIALS', 'specials.php');

define('FILENAME_STATS_CUSTOMERS', 'stats_customers.php');

define('FILENAME_STATS_PRODUCTS_PURCHASED', 'stats_products_purchased.php');

define('FILENAME_STATS_PRODUCTS_VIEWED', 'stats_products_viewed.php');

define('FILENAME_TAX_CLASSES', 'tax_classes.php');

define('FILENAME_TAX_RATES', 'tax_rates.php');

define('FILENAME_WHOS_ONLINE', 'whos_online.php');

define('FILENAME_ZONES', 'zones.php');

 

define('FILENAME_XSELL_PRODCTS', 'xsell.php');

 

define('FILENAME_ARTICLE_REVIEWS', 'article_reviews.php');

define('FILENAME_ARTICLES', 'articles.php');

define('FILENAME_ARTICLES_CONFIG', 'articles_config.php');

define('FILENAME_ARTICLES_XSELL', 'articles_xsell.php');

define('FILENAME_AUTHORS', 'authors.php');

 

define('FILENAME_HEADER_TAGS_CONTROLLER', 'header_tags_controller.php');

define('FILENAME_HEADER_TAGS_ENGLISH', 'header_tags_english.php');

define('FILENAME_HEADER_TAGS_FILL_TAGS', 'header_tags_fill_tags.php');

 

Thanks a lot!!!

Installed contributions:

Ultimate_SEO, Article Manager 1.5, Dynamic SiteMap 2.0, Infopages, Google SiteMap XMl w/admin 2.1, HeaderTagControler 2.6.1, FCKosc 2.21, X-sell 2.3, Google Analytics Modul, All Products, Page Cache 1.5, EasyPopulate2.7d, Multi Product Manager 2.5, Define Main Page, and probably few others...

Link to comment
Share on other sites

Jack, in the above file you changed a couple of lines as follows:

 

define('HEAD_TITLE_TAG_ALL','osCommerce :');

where the old code was:

 

define('HEAD_TITLE_TAG_ALL','osCommerce : ');

The only difference was the space between the : '); at the end of osCommerce. Was this done on purpose? What difference does it make?

 

Thanks,

I don't recall doing that but, no, it doesn't make a difference.

 

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 there

thanks 4 the reply

 

maybe you could have a look at what i have done so far..i installed the header code, and it is working great! with the great template i wanted installed too!. but now i must have messed up some tables codeing or something like that, because when a categorie is viewed it shows it on the far right side...and when a product is opened it moves it to the right side as well...i think i have narrowed it down to somewhere in the product_info.php file ...whew lots a trial and error on those two files...(index.php and product_info.php)

 

demo store address is www.inetarticle.com/dlstore

 

admin is as usuall located at /dlstore/admin

 

if you can help please let me know...I'll b up 4 a while

 

john

The problem is most likely that the template removed some of the table structure that is common in oscommerce. So when you added code to use those tables, it is confusing the html. The problems you mentioned would be the result of the changes for both the index and product_info files. You will have to figure out how to make those changes so they fit in with your layout.

 

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 have installed this great contibution <the STS v4.3 +HTC2.5.9 Package>.

 

In addition to these two contributions, i have the Ulitmate SEO, The Articles, and the Xsell prouduct contributions as well.

 

the problem is mainly (for now...) with the Xsell and the HTC contributions: Ffter i added to the ADMIN--> Includes--> FILENAMES.PHP the "Define" lines for the HTC i seem to get an error when clicking on the Cross Sell Product link in: Administration--> cataloge.

iget the following 404 error:

 

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

Not Found

The requested URL /shop/admin/xsell_products.php was not found on this server.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

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

 

when i removed the HTC Define Lines from the FILENAMES.PHP file, the cross sell worked...

There's no reason why both contributions cannot work together, especially in admin. Try going directly to the page - http://yourdomain.com/admin/xsell.php. That will help isolate the problem. If you still cannot get to it, then there is a problem with the X-sell install. That would seem to be the case since your definition says to use xsell.php but your error is looking for xsell_products.php.

 

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

There's no reason why both contributions cannot work together, especially in admin. Try going directly to the page - http://yourdomain.com/admin/xsell.php. That will help isolate the problem. If you still cannot get to it, then there is a problem with the X-sell install. That would seem to be the case since your definition says to use xsell.php but your error is looking for xsell_products.php.

 

Jack

 

 

 

 

Hi and Thanks Jack,

 

<problem solved, changed few install things...>

 

Great contibution!!!

 

Sharon.

Installed contributions:

Ultimate_SEO, Article Manager 1.5, Dynamic SiteMap 2.0, Infopages, Google SiteMap XMl w/admin 2.1, HeaderTagControler 2.6.1, FCKosc 2.21, X-sell 2.3, Google Analytics Modul, All Products, Page Cache 1.5, EasyPopulate2.7d, Multi Product Manager 2.5, Define Main Page, and probably few others...

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