Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

I've installed the (7 Sep 2005 - Header Tags Controller v2.5.5 Complete) version.

It works in English pages only, in other pages ( for example Russian and Hebrew) it doesn't work.

I have installed all that is requierd for other languages according to the guidens text files (Install_Admin.TXT and Install_Catalog.TXT)

Please help me in this matter.

Link to comment
Share on other sites

  • Replies 4.6k
  • Created
  • Last Reply

Top Posters In This Topic

My eye's bleeding lol..

anyway I got Header Tags Controller 2.5.5 installed with minimal headaches.everything seemed fine until I went in catalog on the admin side where I got a MYSQL error 1064 about catalog ID and stuff.After much reading I was unable to find a solution(even tried the 2020 bug fix),But then I remembered during the editing of the files I had to "customize" them where I also have Wolfen stein featured catagories installed.Wolf's contribution and this one bot required the same edits in the catagories file.for example

Wolf edit:

           	 // BOF Wolfen featured sets
          $product_query = tep_db_query("select products_quantity, products_model, products_image, products_price, products_date_available, products_weight, products_tax_class_id, products_featured, products_featured_until, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
          $product = tep_db_fetch_array($product_query);
          tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_price, products_date_added, products_date_available, products_weight, products_status, products_featured, products_featured_until, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "',  now(), '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_featured'] . "', '" . (int)$product['products_featured_until'] . "', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')");
          $dup_products_id = tep_db_insert_id();
          $description_query = tep_db_query("select language_id, products_name, products_description, products_short, products_url from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$products_id . "'");
          while ($description = tep_db_fetch_array($description_query)) {
            tep_db_query("insert into " . TABLE_PRODUCTS_DESCRIPTION . " (products_id, language_id, products_name, products_description, products_short, products_url, products_viewed) values ('" . (int)$dup_products_id . "', '" . (int)$description['language_id'] . "', '" . tep_db_input($description['products_name']) . "', '" . tep_db_input($description['products_description']) . "', '" . tep_db_input($description['products_short']) . "', '" . tep_db_input($description['products_url']) . "', '0')");
          }
 // EOF Wolfen featured sets

header Controller

                 $product_query = tep_db_query("select products_quantity, products_model, products_image, products_price, products_date_available, products_weight, products_tax_class_id, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
           $product = tep_db_fetch_array($product_query);

           tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "',  now(), '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')");
           $dup_products_id = tep_db_insert_id();

           //HTC BOC 
           $description_query = tep_db_query("select language_id, products_name, products_description, products_head_title_tag, products_head_desc_tag, products_head_keywords_tag, products_url from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$products_id . "'");
           while ($description = tep_db_fetch_array($description_query)) {
             tep_db_query("insert into " . TABLE_PRODUCTS_DESCRIPTION . " (products_id, language_id, products_name, products_description, products_head_title_tag, products_head_desc_tag, products_head_keywords_tag, products_url, products_viewed) values ('" . (int)$dup_products_id . "', '" . (int)$description['language_id'] . "', '" . tep_db_input($description['products_name']) . "', '" . tep_db_input($description['products_description']) . "', '" . tep_db_input($description['products_head_title_tag']) . "', '" . tep_db_input($description['products_head_desc_tag']) . "', '" . tep_db_input($description['products_head_keywords_tag']) . "', '" . tep_db_input($description['products_url']) . "', '0')");
           }       
           //HTC EOC

This is just one example there are many like this.

Is there any way that this can be done?Is it possible to have it twice in the php file without causing issue's?

To make a temp solution I just upload the catagories php file that was included in header package and everything is working fine now except I can not add any featured products or have access to the ultimate SEO urls.

here's another example

Wolf's

  // BOF Wolfen featured sets
  if (isset($HTTP_GET_VARS['search'])) {
    $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_featured, p.products_featured_until, p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and pd.products_name like '%" . tep_db_input($search) . "%' order by pd.products_name");
  } else {
    $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_featured, p.products_featured_until from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by pd.products_name");
  }
  while ($products = tep_db_fetch_array($products_query)) {
    $products_count++;
    $rows++;
 // EOF Wolfen featured sets

 

header Controller

    if (isset($HTTP_GET_VARS['search'])) {
     $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and pd.products_name like '%" . tep_db_input($search) . "%' order by pd.products_name");
   } else {
     $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by pd.products_name");
   }
   while ($products = tep_db_fetch_array($products_query)) {
     $products_count++;
     $rows++;

Link to comment
Share on other sites

It appears you don't have the Header Tags code inserted into the product_info.php page.

 

Jack

 

Thanks a bunch it works beautiful now, I am so glad e have people like you to help us... Thanks for all your help and hard work.

 

 

 

 

Sumfun

Link to comment
Share on other sites

Chad - Header Tags and Wolfen Featured Sets work fine together. The database queries have to be edited to include the new parts for both of them. The easiest way is to copy the code header tags says to install below the line that you have with Featured Sets. Scroll across the line until you find a difference and copy/paste from the bottom line to the top.

 

Billy - You're welcome. :) I, like the majority of members here I'm sure, enjoy helping.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Bug 3:

the edited catalog/product_info.php does not allow the product pages to appear.

 

I do have a heavily modified product_info.php, but it's just a little snippet of code to add??

 

Here's what I have that crashes the product pages with the Header Tags Controller snippet added:

<?php
/*
?$Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $

?osCommerce, Open Source E-Commerce Solutions
?http://www.oscommerce.com

?Copyright (c) 2003 osCommerce

?Released under the GNU General Public License
*/

?require('includes/application_top.php');

?require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

?$product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
?$product_check = tep_db_fetch_array($product_check_query);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<?php
// BOF: WebMakers.com Changed: Header Tag Controller v2.5.2
// Replaced by header_tags.php
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
?require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?> 
?<title><?php echo TITLE; ?></title>
<?php
}
// EOF: WebMakers.com Changed: Header Tag Controller v2.5.2
?>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script language="javascript"><!--
function popupWindow(url) {
?window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le
ft=150')
}
//--></script>

 

Jack_mcs, thanks for the advice on Bug 1 & 2

 

 

Wow, HeaderTags 2.5.5 version solved all of my previous bugs all at once that I had with the previous version.

Link to comment
Share on other sites

I really hate asking for help again but I just can not figure this out.

Ok I have got header controller installed and working great.I am able to go in on the admin side and adjust every setting there with no problem.I finally got my catagories.php file working soso.I have finally got rid of all the errors,and now have the Meta Tag Information availible to fill out as I had new products.My only issue is now my featured products short decription box is missing.Everything else is there (option to add as a featured) is and will add as a featured product but I have no way of entering any info and it's not pulling any decription text to fill it out.I have the Words per short description when it's not written set to 40.

I know what part of the script is causing not having the short description box but I can not figure out how to edit it to make it appear.Everyway I try the whole add new product page is messed up boxes all the way to the left and just a complete mess.

here is what I believe I have to add the make the short description box appear.

          <tr>
           <td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_SHORT; ?></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_short[' . $languages[$i]['id'] . ']', 'soft', '70', '4', (isset($products_short[$languages[$i]['id']]) ? $products_short[$languages[$i]['id']] : tep_get_products_short($pInfo->products_id, $languages[$i]['id']))); ?></td>
             </tr>
           </table></td>
         </tr>
<?php

This is the area that has to be modified while installing the header controller.I need both of them.And have no clue how to edit it correctly.

here is what I have currently for that area ruffly line 693

          <tr>
           <td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_PAGE_TITLE; ?></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_head_title_tag[' . $languages[$i]['id'] . ']', 'soft', '70', '5', (isset($products_head_title_tag[$languages[$i]['id']]) ? $products_head_title_tag[$languages[$i]['id']] : tep_get_products_head_title_tag($pInfo->products_id, $languages[$i]['id']))); ?></td>
             </tr>
           </table></td>
         </tr>

Right before that I have TEXT_PRODUCTS_DESCRIPTION; edit.I have been trying to edit this with beyond compare and with my old catagories file those edits are in the same place.

If anybody is using this contribution with Wolf's featured products i would Highly appreacitate it if you could post/pm or catagories files so i could take a look.

 

Thanks

Link to comment
Share on other sites

Wow, HeaderTags 2.5.5 version solved all of my previous bugs all at once that I had with the previous version.

I appreciate you mentioning this. Quite a few people complained about the problems but, even though I requested feedback to see if the problems were fixed, no one bothered to respond.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi, newbie here,

Install is messed up. Advice welcome even if just to say start over-which is my question :

Should I just start my install over :-( or can my mistake be easily understood so I can say aha how dumb. I downloaded Maxime's 2.5.5d (actually the zip is called b not d)

 

In admin,

At address :

http://localhost/catalog/admin/header_tags_controller.php?selected_box=header%20tags

 

I see (I turned on errors in /www/catalog/admin/includes/application_top.php)

Notice: Constant HEADING_TITLE_CONTROLLER already defined in /www/catalog/admin/includes/languages/french/header_tags_controller.php on line 13
...
Notice: Constant TEXT_FILL_TAGS already defined in /www/catalog/admin/includes/languages/french/header_tags_controller.php on line 33

 

for each of the new constants.

 

And also 30 times this line :

Notice: Undefined offset: 1 in /www/catalog/admin/includes/functions/header_tags.php on line 134

 

Page Name 	 
Notice: Undefined variable: page in /www/catalog/admin/header_tags_controller.php on line 322
Switches:  HTTA: 	 HTDA: 	 HTKA: 	 HTCA: 	 (Explain)
Title  
Notice: Undefined variable: title in /www/catalog/admin/header_tags_controller.php on line 352
Descriptions  
Notice: Undefined variable: desc in /www/catalog/admin/header_tags_controller.php on line 356
Keyword(s)  
Notice: Undefined variable: key in /www/catalog/admin/header_tags_controller.php on line 360

 

And for Page Name near the bottom of the admin header tags window :

Notice: Undefined variable: newfiles in /www/catalog/admin/header_tags_controller.php on line 423

 

In English, same :

Notice: Constant HEADING_TITLE_CONTROLLER already defined in /www/catalog/admin/includes/languages/english/header_tags_controller.php on line 13
...
Notice: Constant TEXT_FILL_TAGS already defined in /www/catalog/admin/includes/languages/english/header_tags_controller.php on line 35

and

Notice: Undefined offset: 1 in /www/catalog/admin/includes/functions/header_tags.php on line 134

 

and

Notice: Undefined variable: newfiles in /www/catalog/admin/header_tags_controller.php on line 423

with additional error in left column between "Tools" and "Header Tags":

Notice: Use of undefined constant BOX_HEADER_TAGS_FILL_TAGS - assumed 'BOX_HEADER_TAGS_FILL_TAGS' in /www/catalog/admin/includes/boxes/header_tags_controller.php on line 26

 

 

Actually my admin directory has a different name but it is still under catalog. I manually changed it to admin in the above pastes for clarity.

 

Any advice on tools would also be appreciated. I used emacs some 20 years ago and would be comfortable with emacs tools. (My fingers seem to remember keystokes that my brain doesn't. Like C-u0 C-l which is handy. I said "gee thanks, fingers.") How to see where constants were defined twice for example would be cool. I don't know any php.

 

If you think that I should just start over that is what I will do.

Thanks very much in advance.

India

*** Je suis plus souvent sur le forum français ***

ms2fr, Header Tags 2.5.5b, Order logging before payment, Better PayPal Description perso, Free shipping per product, Must agree to terms, Country State Selector, World Zones, Visible countries, Store Pick Up, several shipping modules, Personal Invoice Number, 'On the Fly' Auto Thumbnailer using GD Library, More_Pics_6 for 2.2 ms2, Ultimate SEO URLs 2-2.1d/e,Virement Bancaire, Estimated Shipping 1.5, xml_guide, SP+,Step By Step 1.8, Order Editor 2.6.3, Google Analytics, Dynamic Sitemap 2.0, OSC-Expeditor, Recover Cart Sales, Links Manager 1.15

local : linux 2.6 Fedora Core 3, server : APACHE 2.0.54, MySQL 4.1.18, php : 4.4.0 (on strike refuse to update)

remote : IcoOpenBSD 4.x, server : IcodiaSecureHttpd, MySQL 4.1.24, php : 4.4.9

 

You never get a second chance to make a first impression.

Link to comment
Share on other sites

Ok. i give up, i have been searching the forum for a solution for a while now and i can not seem to find a solution.

 

 

i have the contribution installed perfectly and running, the only little problem is that it does not show the individual product name and category in the header, it only displays my default title.

 

all other pages that does not have a individual content works fine.

 

 

 

please help someone

Link to comment
Share on other sites

OK sorry I fixed this one. In admin/includes/languages/english.php, added (again since wiped changes oops)

define('BOX_HEADER_TAGS_FILL_TAGS', 'Fill Tags');

Which *was* in the instuctions.

 

with additional error in left column between  "Tools" and "Header Tags":

Notice: Use of undefined constant BOX_HEADER_TAGS_FILL_TAGS - assumed 'BOX_HEADER_TAGS_FILL_TAGS' in /www/catalog/admin/includes/boxes/header_tags_controller.php on line 26

*** Je suis plus souvent sur le forum français ***

ms2fr, Header Tags 2.5.5b, Order logging before payment, Better PayPal Description perso, Free shipping per product, Must agree to terms, Country State Selector, World Zones, Visible countries, Store Pick Up, several shipping modules, Personal Invoice Number, 'On the Fly' Auto Thumbnailer using GD Library, More_Pics_6 for 2.2 ms2, Ultimate SEO URLs 2-2.1d/e,Virement Bancaire, Estimated Shipping 1.5, xml_guide, SP+,Step By Step 1.8, Order Editor 2.6.3, Google Analytics, Dynamic Sitemap 2.0, OSC-Expeditor, Recover Cart Sales, Links Manager 1.15

local : linux 2.6 Fedora Core 3, server : APACHE 2.0.54, MySQL 4.1.18, php : 4.4.0 (on strike refuse to update)

remote : IcoOpenBSD 4.x, server : IcodiaSecureHttpd, MySQL 4.1.24, php : 4.4.9

 

You never get a second chance to make a first impression.

Link to comment
Share on other sites

Ok. i give up, i have been searching the forum for a solution for a while now and i can not seem to find a solution.

i have the contribution installed perfectly and running, the only little problem is that it does not show the individual product name and category in the header, it only displays my default title.

 

all other pages that does not have a individual content works fine.

please help someone

Does your product_info.php file have the code installed for Header Tags per the instructions?

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi Jack. thank you for replying so fast.

 

 

all my files in "catalog" dir have the code

 

/*
 $Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

//################## Added Enable / Disable Categories #################
//  $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
 $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id left join " . TABLE_CATEGORIES . " c on p2c.categories_id = c.categories_id, " . TABLE_PRODUCTS_DESCRIPTION . "  pd where c.categories_status = '1' and p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
//################## End Added Enable / Disable Categories #################
 $product_check = tep_db_fetch_array($product_check_query);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
// BOF: WebMakers.com Changed: Header Tag Controller v2.5.2
// Replaced by header_tags.php
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?> 
 <title><?php echo TITLE; ?></title>
<?php

 

i noticed that when i browse the categories i get a "-" infront of the default title

 

 

i hope this all makes sense to you

 

i have sts installed

Link to comment
Share on other sites

Do you have the HTTA box unchecked for product info? If you do, then that will do it. If it is checked, try turning STS off for a quick test. Does the title display correctly in the page now?

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi again

recap : Redid admin part of install. Nothing is different. Install seems ok--but it would be very reassuring to know if these notices are expected or if there is something wrong.

Thanks in advance for any reassuring words,

 

India

 

[24-Sep-2005 05:32:48] PHP Notice: Constant HEADING_TITLE_ENGLISH already defined in /www/catalog/LapinPied/includes/languages/english/header_tags_controller.php on line 14

[24-Sep-2005 05:32:48] PHP Notice: Constant HEADING_TITLE_FILL_TAGS already defined in /www/catalog/LapinPied/includes/languages/english/header_tags_controller.php on line 15

[24-Sep-2005 05:32:48] PHP Notice: Constant TEXT_INFORMATION_ADD_PAGE already defined in /www/catalog/LapinPied/includes/languages/english/header_tags_controller.php on line 17

[24-Sep-2005 05:32:48] PHP Notice: Constant TEXT_INFORMATION_DELETE_PAGE already defined in /www/catalog/LapinPied/includes/languages/english/header_tags_controller.php on line 19

[24-Sep-2005 05:32:48] PHP Notice: Constant TEXT_INFORMATION_CHECK_PAGES already defined in /www/catalog/LapinPied/includes/languages/english/header_tags_controller.php on line 22

[24-Sep-2005 05:32:48] PHP Notice: Constant TEXT_PAGE_TAGS already defined in /www/catalog/LapinPied/includes/languages/english/header_tags_controller.php on line 27

[24-Sep-2005 05:32:48] PHP Notice: Constant TEXT_ENGLISH_TAGS already defined in /www/catalog/LapinPied/includes/languages/english/header_tags_controller.php on line 31

[24-Sep-2005 05:32:48] PHP Notice: Constant TEXT_FILL_TAGS already defined in /www/catalog/LapinPied/includes/languages/english/header_tags_controller.php on line 35

[24-Sep-2005 05:32:48] PHP Notice: Undefined offset: 1 in /www/catalog/LapinPied/includes/functions/header_tags.php on line 134

[24-Sep-2005 05:32:48] PHP Notice: Undefined variable: page in /www/catalog/LapinPied/header_tags_controller.php on line 322

[24-Sep-2005 05:32:48] PHP Notice: Undefined variable: title in /www/catalog/LapinPied/header_tags_controller.php on line 352

[24-Sep-2005 05:32:48] PHP Notice: Undefined variable: desc in /www/catalog/LapinPied/header_tags_controller.php on line 356

[24-Sep-2005 05:32:48] PHP Notice: Undefined variable: key in /www/catalog/LapinPied/header_tags_controller.php on line 360

[24-Sep-2005 05:32:48] PHP Notice: Undefined variable: newfiles in /www/catalog/LapinPied/header_tags_controller.php on line 423

*** Je suis plus souvent sur le forum français ***

ms2fr, Header Tags 2.5.5b, Order logging before payment, Better PayPal Description perso, Free shipping per product, Must agree to terms, Country State Selector, World Zones, Visible countries, Store Pick Up, several shipping modules, Personal Invoice Number, 'On the Fly' Auto Thumbnailer using GD Library, More_Pics_6 for 2.2 ms2, Ultimate SEO URLs 2-2.1d/e,Virement Bancaire, Estimated Shipping 1.5, xml_guide, SP+,Step By Step 1.8, Order Editor 2.6.3, Google Analytics, Dynamic Sitemap 2.0, OSC-Expeditor, Recover Cart Sales, Links Manager 1.15

local : linux 2.6 Fedora Core 3, server : APACHE 2.0.54, MySQL 4.1.18, php : 4.4.0 (on strike refuse to update)

remote : IcoOpenBSD 4.x, server : IcodiaSecureHttpd, MySQL 4.1.24, php : 4.4.9

 

You never get a second chance to make a first impression.

Link to comment
Share on other sites

Hi again,

While waiting for reassuring words, after some googling to learn what undefined offset actually meant, I found this (which will obviously only be helpful to other newbies like me) :

The cause of the notice is PHP trying to access a variable or offset in an array that does not exist. To work around this, you should simply check to see if the variable or key exists before trying to access them by using isset().
by Avochem

So I modified GetSectionName() in admin/includes/functions/headertags.php . Probably not needed since apparently php is tolerant, but when you are new you have no idea what's going on and what passes and what doesn't --it's just a great unknown. The notice was just bugging me. But probably there's lots of notices that I will just have to learn to ignore?

 

Anyway that simple check fixed it. (I don't know php so just guessed the syntax if verbose).

is :
function GetSectionName($line)
{
 $name = explode(" ", $line);
 if (isset($name[1]))
   {
     $name[1] = trim($name[1]);
     $pos = strpos($name[1], '.');
     $sectionName = substr($name[1], 0, $pos); //india 24.09.2005
     //echo "\t".$sectionName;  //india 24.09.2005
     return ($sectionName); 
   }
 else
   {
     return "";
   }
}

was :
function GetSectionName($line)
{
 $name = explode(" ", $line);
 $name[1] = trim($name[1]);
 $pos = strpos($name[1], '.');
 return (substr($name[1], 0, $pos)); 
}

Any advice or reassuring words appreciated.

India

 

...

Thanks in advance for any reassuring words,

 

India

 

[24-Sep-2005 05:32:48] PHP Notice:  Undefined offset:  1 in /www/catalog/LapinPied/includes/functions/header_tags.php on line 134

Edited by IndiaStarker

*** Je suis plus souvent sur le forum français ***

ms2fr, Header Tags 2.5.5b, Order logging before payment, Better PayPal Description perso, Free shipping per product, Must agree to terms, Country State Selector, World Zones, Visible countries, Store Pick Up, several shipping modules, Personal Invoice Number, 'On the Fly' Auto Thumbnailer using GD Library, More_Pics_6 for 2.2 ms2, Ultimate SEO URLs 2-2.1d/e,Virement Bancaire, Estimated Shipping 1.5, xml_guide, SP+,Step By Step 1.8, Order Editor 2.6.3, Google Analytics, Dynamic Sitemap 2.0, OSC-Expeditor, Recover Cart Sales, Links Manager 1.15

local : linux 2.6 Fedora Core 3, server : APACHE 2.0.54, MySQL 4.1.18, php : 4.4.0 (on strike refuse to update)

remote : IcoOpenBSD 4.x, server : IcodiaSecureHttpd, MySQL 4.1.24, php : 4.4.9

 

You never get a second chance to make a first impression.

Link to comment
Share on other sites

Hi,

I've installed the Heaer Tag Controller on my STS shop over development server

 

The problem that I face is...

STS clears the code (META TAGS AND TITLE) generated by HTC

 

In application_top.php, I've placed the code

 

// BOF: WebMakers.com Added: Header Tags Controller v2.5.2

require(DIR_WS_FUNCTIONS . 'header_tags.php');

// Clean out HTML comments from ALT tags etc.

require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

// EOF: WebMakers.com Added: Header Tags Controller v2.5.2

 

In sts_display_output.php I've changed the code to

 

require_once(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

require_once(DIR_WS_FUNCTIONS . 'header_tags.php');

 

earlier it was:

require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

require(DIR_WS_FUNCTIONS . 'header_tags.php');

 

* I've tested admin section successfully

 

Can anyone help me with this?

Meanwhile I'll try and install v2.5.5

Regards,

 

Jignesh Shah

Link to comment
Share on other sites

Hi again

recap : Redid admin part of install. Nothing is different. Install seems ok--but it would be very reassuring to know if these notices are expected or if there is something wrong.

Thanks in advance for any reassuring words,

 

India

 

[24-Sep-2005 05:32:48] PHP Notice:  Constant HEADING_TITLE_ENGLISH already defined in /www/catalog/LapinPied/includes/languages/english/header_tags_controller.php on line 14

[24-Sep-2005 05:32:48] PHP Notice:  Constant HEADING_TITLE_FILL_TAGS already defined in /www/catalog/LapinPied/includes/languages/english/header_tags_controller.php on line 15

[24-Sep-2005 05:32:48] PHP Notice:  Constant TEXT_INFORMATION_ADD_PAGE already defined in /www/catalog/LapinPied/includes/languages/english/header_tags_controller.php on line 17

[24-Sep-2005 05:32:48] PHP Notice:  Constant TEXT_INFORMATION_DELETE_PAGE already defined in /www/catalog/LapinPied/includes/languages/english/header_tags_controller.php on line 19

[24-Sep-2005 05:32:48] PHP Notice:  Constant TEXT_INFORMATION_CHECK_PAGES already defined in /www/catalog/LapinPied/includes/languages/english/header_tags_controller.php on line 22

[24-Sep-2005 05:32:48] PHP Notice:  Constant TEXT_PAGE_TAGS already defined in /www/catalog/LapinPied/includes/languages/english/header_tags_controller.php on line 27

Those errors should not be displaying. They are indicating an error in your shop and are probably caused becase the code was installed twice. Try using the files in the contriubiton to replace yours temporairly to find the problem. I would suspect your functions/general.php file to start.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Jack,

Thanks for replying. Appreciated. In latest attept, all the admin files have just been simply copied as is. I did a diff on functions/general.php and I even downloaded your contrib (before Maxime's French addition) and diffed the general.php again for good measure. no diff !

Not sure what you mean by installing twice.

Symptoms same after clobbering admin files with those from the contrib.

I think I would like to use a tool. at this point. Any suggestion welcome.

Also, the notices obviously are not seen if notices are turned off...

:-(

Thanks in advance for suggestions.

India

Those errors should not be displaying. They are indicating an error in your shop and are probably caused becase the code was installed twice. Try using the files in the contriubiton to replace yours temporairly to find the problem. I would suspect your functions/general.php file to start.

 

Jack

*** Je suis plus souvent sur le forum français ***

ms2fr, Header Tags 2.5.5b, Order logging before payment, Better PayPal Description perso, Free shipping per product, Must agree to terms, Country State Selector, World Zones, Visible countries, Store Pick Up, several shipping modules, Personal Invoice Number, 'On the Fly' Auto Thumbnailer using GD Library, More_Pics_6 for 2.2 ms2, Ultimate SEO URLs 2-2.1d/e,Virement Bancaire, Estimated Shipping 1.5, xml_guide, SP+,Step By Step 1.8, Order Editor 2.6.3, Google Analytics, Dynamic Sitemap 2.0, OSC-Expeditor, Recover Cart Sales, Links Manager 1.15

local : linux 2.6 Fedora Core 3, server : APACHE 2.0.54, MySQL 4.1.18, php : 4.4.0 (on strike refuse to update)

remote : IcoOpenBSD 4.x, server : IcodiaSecureHttpd, MySQL 4.1.24, php : 4.4.9

 

You never get a second chance to make a first impression.

Link to comment
Share on other sites

The term HEADING_TITLE_ENGLISH, for example, should ony be defined one time in english/header_tags_controller.php. You are getting a duplicate defined message which means that that term is either included elsewhere in your files or the header_tags_controller file was somehow added twice. Doa search of your whole shop for the above term. You should get two hits. If oyu get more than that, then that is the problem. If you get the two, then open those files and search for that term to ensure it is not defined twice in one of them.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

OK do my notes below tell us your second idea is the winner --the header_tags_controller files were added twice ? What does this mean exactly--some kind of include and include ?

Should I search for something like include header_tags_controller.php ?

Thanks again for helping. It's very nice of you. I tried searches below which shows for example HEADING_TITLE_ENGLISH is only defined once in admin/includes/languages/french/header_tags_controller.php and admin/includes/languages/english/header_tags_controller.php which I suppose is what you meant when you said I should get two hits. (I need a recursive grep tool--which one do you use ?--it's been so long--used to have one in my previous life as a student 25 years ago. )

 

I will search on my own for something like include soon as I find a php tutorial... :-)

best regards,

India

(You didn't mention the undefined variables. Hope it's all the same pb.)

 

----------- notes --------------- (ignore the messed up foreign characters they're really ok)

[india@Freya catalog]$ find . -name "header_tags_controller.php"

./LapinPied/includes/boxes/header_tags_controller.php

./LapinPied/includes/languages/english/header_tags_controller.php

./LapinPied/includes/languages/french/header_tags_controller.php

./LapinPied/header_tags_controller.php

 

[india@Freya catalog]$ grep HEADING_TITLE_ENGLISH ./LapinPied/includes/boxes/hea der_tags_controller.php

[india@Freya catalog]$ grep HEADING_TITLE_ENGLISH ./LapinPied/includes/languages //english/header_tags_controller.php

define('HEADING_TITLE_ENGLISH', 'Header Tags - English');

[india@Freya catalog]$ grep HEADING_TITLE_ENGLISH ./LapinPied/includes/languages/french/header_tags_controller.php

define('HEADING_TITLE_ENGLISH', 'M\ufffftatags - Fran\uffffais');

[india@Freya catalog]$ grep HEADING_TITLE_ENGLISH ./LapinPied/header_tags_controller.php

 

 

 

The term HEADING_TITLE_ENGLISH, for example, should ony be defined one time in english/header_tags_controller.php. You are getting a duplicate defined message which means that that term is either included elsewhere in your files or the header_tags_controller file was somehow added twice. Doa search of your whole shop for the above term. You should get two hits. If oyu get more than that, then that is the problem. If you get the two, then open those files and search for that term to ensure it is not defined twice in one of them.

 

Jack

*** Je suis plus souvent sur le forum français ***

ms2fr, Header Tags 2.5.5b, Order logging before payment, Better PayPal Description perso, Free shipping per product, Must agree to terms, Country State Selector, World Zones, Visible countries, Store Pick Up, several shipping modules, Personal Invoice Number, 'On the Fly' Auto Thumbnailer using GD Library, More_Pics_6 for 2.2 ms2, Ultimate SEO URLs 2-2.1d/e,Virement Bancaire, Estimated Shipping 1.5, xml_guide, SP+,Step By Step 1.8, Order Editor 2.6.3, Google Analytics, Dynamic Sitemap 2.0, OSC-Expeditor, Recover Cart Sales, Links Manager 1.15

local : linux 2.6 Fedora Core 3, server : APACHE 2.0.54, MySQL 4.1.18, php : 4.4.0 (on strike refuse to update)

remote : IcoOpenBSD 4.x, server : IcodiaSecureHttpd, MySQL 4.1.24, php : 4.4.9

 

You never get a second chance to make a first impression.

Link to comment
Share on other sites

Ouf as we say here. I found the magic incantation for a recursive grep.

 

[india@Freya catalog]$ find . -name "*.php"|xargs grep HEADING_TITLE_ENGLISH

./LapinPied/includes/languages/english/header_tags_controller.php:define('HEADING_TITLE_ENGLISH', 'Header Tags - English');

./LapinPied/includes/languages/french/header_tags_controller.php:define('HEADING_TITLE_ENGLISH', 'M\ufffftatags - Fran\uffffais');

./LapinPied/header_tags_english.php:      <td class="HTC_Head"><?php echo HEADING_TITLE_ENGLISH; ?></td>

 

which confirms prior theory.

 

To search for all the appperances of header_tags_controller.php where the defines live I did this,

[india@Freya catalog]$ find . -name "*.php"|xargs grep header_tags_controller.php

./LapinPied/includes/functions/header_tags.php:  $Id: header_tags_controller.php,v 1.0 2005/04/08 22:50:52 hpdl Exp $

./LapinPied/includes/boxes/header_tags_controller.php:  $Id: header_tags_controller.php,v 1.00 2003/10/02 Exp $

./LapinPied/includes/languages/french.php:// header_tags_controller text in includes/boxes/header_tags_controller.php

./LapinPied/includes/languages/english.php:// header_tags_controller text in includes/boxes/header_tags_controller.php

./LapinPied/includes/filenames.php:  define('FILENAME_HEADER_TAGS_CONTROLLER', 'header_tags_controller.php');

./LapinPied/includes/column_left.php:  require(DIR_WS_BOXES . 'header_tags_controller.php');

./LapinPied/header_tags_english.php:  $Id: header_tags_controller.php,v 1.0 2005/04/08 22:50:52 hpdl Exp $

./LapinPied/header_tags_controller.php:  $Id: header_tags_controller.php,v 1.2 2004/08/07 22:50:52 hpdl Exp $

which isn't helping me in the spirit of something added twice. What string should I search on anyway ?

Thanks again,

-i

 

OK do my notes below tell us your second idea is the winner --the header_tags_controller files were added twice ? What does this mean exactly--some kind of include and include ?

Should I search for something like include header_tags_controller.php ?

Thanks again for helping. It's very nice of you. I tried searches below which shows for example HEADING_TITLE_ENGLISH is only defined once in admin/includes/languages/french/header_tags_controller.php and admin/includes/languages/english/header_tags_controller.php which I suppose is what you meant when you said I should get two hits. (I need a recursive grep tool--which one do you use ?--it's been so long--used to have one in my previous life as a student 25 years ago. )

 

I will search on my own for something like include soon as I find a php tutorial... :-)

best regards,

India

(You didn't mention the undefined variables. Hope it's all the same pb.)

 

----------- notes --------------- (ignore the messed up foreign characters they're really ok)

[india@Freya catalog]$ find . -name "header_tags_controller.php"

./LapinPied/includes/boxes/header_tags_controller.php

./LapinPied/includes/languages/english/header_tags_controller.php

./LapinPied/includes/languages/french/header_tags_controller.php

./LapinPied/header_tags_controller.php

 

[india@Freya catalog]$ grep HEADING_TITLE_ENGLISH ./LapinPied/includes/boxes/hea der_tags_controller.php

[india@Freya catalog]$ grep HEADING_TITLE_ENGLISH ./LapinPied/includes/languages //english/header_tags_controller.php

define('HEADING_TITLE_ENGLISH', 'Header Tags - English');

[india@Freya catalog]$ grep HEADING_TITLE_ENGLISH ./LapinPied/includes/languages/french/header_tags_controller.php

define('HEADING_TITLE_ENGLISH', 'M\ufffftatags - Fran\uffffais');

[india@Freya catalog]$ grep HEADING_TITLE_ENGLISH ./LapinPied/header_tags_controller.php

*** Je suis plus souvent sur le forum français ***

ms2fr, Header Tags 2.5.5b, Order logging before payment, Better PayPal Description perso, Free shipping per product, Must agree to terms, Country State Selector, World Zones, Visible countries, Store Pick Up, several shipping modules, Personal Invoice Number, 'On the Fly' Auto Thumbnailer using GD Library, More_Pics_6 for 2.2 ms2, Ultimate SEO URLs 2-2.1d/e,Virement Bancaire, Estimated Shipping 1.5, xml_guide, SP+,Step By Step 1.8, Order Editor 2.6.3, Google Analytics, Dynamic Sitemap 2.0, OSC-Expeditor, Recover Cart Sales, Links Manager 1.15

local : linux 2.6 Fedora Core 3, server : APACHE 2.0.54, MySQL 4.1.18, php : 4.4.0 (on strike refuse to update)

remote : IcoOpenBSD 4.x, server : IcodiaSecureHttpd, MySQL 4.1.24, php : 4.4.9

 

You never get a second chance to make a first impression.

Link to comment
Share on other sites

Should there be a HEADING_TITLE_FRENCH ?

and / or a header_tags_french.php ?

*** Je suis plus souvent sur le forum français ***

ms2fr, Header Tags 2.5.5b, Order logging before payment, Better PayPal Description perso, Free shipping per product, Must agree to terms, Country State Selector, World Zones, Visible countries, Store Pick Up, several shipping modules, Personal Invoice Number, 'On the Fly' Auto Thumbnailer using GD Library, More_Pics_6 for 2.2 ms2, Ultimate SEO URLs 2-2.1d/e,Virement Bancaire, Estimated Shipping 1.5, xml_guide, SP+,Step By Step 1.8, Order Editor 2.6.3, Google Analytics, Dynamic Sitemap 2.0, OSC-Expeditor, Recover Cart Sales, Links Manager 1.15

local : linux 2.6 Fedora Core 3, server : APACHE 2.0.54, MySQL 4.1.18, php : 4.4.0 (on strike refuse to update)

remote : IcoOpenBSD 4.x, server : IcodiaSecureHttpd, MySQL 4.1.24, php : 4.4.9

 

You never get a second chance to make a first impression.

Link to comment
Share on other sites

There should only be a HEADING_TITLE_ENGLISH but it should be defined in your French directory.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

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.
Note: Your post will require moderator approval before it will be visible.

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