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 got some problems with HTC 2.5.4;

 

1, In Admin -> Header Tags -> Text Control I only have the option to fill in the english tags, even though swedish is activated in my store (english is default right now). How do I edit page and text control for both english and swedish?

 

2, I can't edit 'Default Description' and 'Default Keywords'. When clicking update they are just the sam again.

 

I have set chmod to 777. I juse the latest version of STS 3.0 Beta 2. I didn't modify index.php and application_top.php during install. The code in application_top.php is already included in sts_display_output.php and the code in index.php was never used in my old shop, do I need the code in index.php?

1 - The code should select the proper language file. Try making a change and then looking at the timestamp on the english/header_tags.php and swedish/header_tags.pho files to see which one is being updated.

 

2 - Others have mentioned this but I can never get it to fail. Try replacing your admin categories.php file with the one from the archive to see it that works. You won't be able to use if you have made other changes to that file but it should work for a test.

 

You still need to make the changes to the index file for the categories description option to work.

 

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

  • Replies 4.6k
  • Created
  • Last Reply

Top Posters In This Topic

I'm glad you figured it out. But for those reading this, if you run the fill tags file, it will create those entries for you.

Jack

 

Hi there - this is where the confusion arose. I did run the fill tags file and it created all the individual product names for me so i didnt have to go through and do it all. But for some strange reason it didnt do the categories for me at all - so i had to go in each one and write the category meta stuff in the admin suite. After this it was picking up - so the fill tags didnt work for me - in the category instance, it did for products as i've got about 200 of them. Relief.

 

Is there a detailed guide anywhere about adding custom browser headings and meta-tags to additional pages i've made e.g. links page and so on. I've used STS so not sure if this impacts or saves any time? I've tried myself on a couple of pages but they've not worked - so i reverted to my back ups and i'm keen to try again.

Link to comment
Share on other sites

I went to Header Tag Controller - Page Control

 

Then added in the page name, ticked the 1st 3 switches, and added title, description, keywords in. I did this for the links page (links.php). And clicked update.

 

I went to the links page but none of the criteria have come through.

 

I checked in the header_tags files in includes and includes/languages/english folders and they've both been automatically updated by the admin panel - as expected.

 

So i'm confused over why its not showing up - is there some code i need to put into the links page itself to call on the header tag details i've created? Would anyone take an eye over my links.php code or have any advice on this? (with sts i assume i dont need to add any code to other pages as the STS code takes care of it all).

 

Thanks a lot

Link to comment
Share on other sites

I have played with STS in a while but I think you still have to add the code to the title section of each file you want to use header tags. Try adding it to links.php and see what happens.

 

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

I have played with STS in a while but I think you still have to add the code to the title section of each file you want to use header tags. Try adding it to links.php and see what happens.

 

Jack

 

Hi there, I've added it to links.php and nothing changed. The page doesnt crash or anything which is good - it just doesnt display the correct page header etc....

 

My code is (does anyone see any problems with this?):

 

<?php
/*
?$Id: conditions.php,v 1.22 2003/06/05 23:26:22 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_CONDITIONS);

?$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONDITIONS));
?>
<!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">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
?<tr>
? ?<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
? ?</table></td>
<!-- body_text //-->
? ?<td width="100%" valign="top"><table width="95%" ?border="0" cellspacing="0" cellpadding="0">
<tr>
?<td><img src="/images/1tr.gif" width="300" height="10"></td>
</tr>
<tr>
?<td><img src="/images/h_links.gif" width="300" height="18"></td>
</tr>
<tr>
?<td><img src="/images/1tr.gif" width="300" height="10"></td>
</tr>
</table>
? ? ?<div align="center"><a href="http://www.debbysgardenlinks.co.uk/">debbysgardenlinks.co.uk<br>
? ? ? ?<img src="/images/banner1.gif" width="462" border="0"></a>
? ? ?</div>
? ? ?<table width="462" ?border="0" cellpadding="10" cellspacing="0">
<tr>
?<td align="center" valign="middle" class="grey"><a href="http://www.grow.co.uk">grow.co.uk<br>
?<img src="http://www.grow.co.uk/growbutton.gif" width="80" height="43" border="0"></a></td>
</tr>
<tr>
?<td align="center" valign="middle" bgcolor="#DAE5F7" class="grey"><a href="http://www.bigukshop.com">bigukshop.com</a><br>
?The Big UK Shop - All your needs in one location.  We keep it simple, like MSN and Google!  The Big UK Shop Internet Shopping Directory - Gardening, Insurance, Electrical Goods, MP3 Players, Car Insurance, Website Hosting, Car Insurance, Home Insurance, Gadgets etc.</td>
</tr>
<tr>
?<td align="center" valign="middle" class="grey"><a href="http://www.treefinders.co.uk">treefinders.co.uk</a></td>
</tr>
<tr>
?<td align="center" valign="middle" class="grey"> </td>
</tr>
</table>


</td>
<!-- body_text_eof //-->
? ?<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
? ?</table></td>
?</tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

This is for the page: http://www.readingnightlife.co.uk/catalog/links.php - all of the side navigation you see results from the STS template contribution.

 

Not sure where the problem is. The page heading should be "Links - Top Topiary" - not just Top Topiary which is what i've applied to the default header controller settings in admin.

Edited by Perfect Eye
Link to comment
Share on other sites

One more little puzzle just to put out there for everyone, when i update the default settings in the admin suite not all of the information is getting retained. The title which change and stay changed, but when i alter the Default Descriptions and Default Keywords they appear to change but when i go back into the menu they've reverted back to the original copy.

 

e.g.

 

Default Description:

osCommerce : What\\\\'s New Here? - Hardware Software DVD Movies

 

Default Keywords:

Hardware Software DVD Movies What'''s New Here?

 

I'll change 'em again but it goes back to this again. Yet the Default Title is getting picked up and changing appropriately.

 

I check the header_tags include english file and sure enough the default title changes correctly - but not these 2 other fields. For some reason the admin section isnt forcing the header_tags files to change the description or keywords.

 

Anyone experienced this - or know where i should look to make the change?

Link to comment
Share on other sites

The code on your links page is working correctly. It is displaying the title it is given. The error is more likely in your includes/header_tags.php or english/header_tgas.php file. Try editing that manuallyand changing the title of the links page to XXX, or something that will be an obvious test, in englush/header_tags.php.

 

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

The code on your links page is working correctly. It is displaying the title it is given. The error is more likely in your includes/header_tags.php or english/header_tgas.php file. Try editing that manuallyand changing the title of the links page to XXX, or something that will be an obvious test, in englush/header_tags.php.

 

Jack

 

The links page is using the default page settings from admin - ignoring the specific links.php settings i have set up in admin. Not sure where the error is occuring - you're right its picking up the header tags contribution, as its showing default content - just not the links ones i've set up.

 

But the problem still lies that the default descriptions and keywords are not changing automatically through admin - the header tag files are not getting amended.

 

So when i view the links.php page source i see that the default title is getting used (changed to what i want it to be called) - but descriptions and keywords is:

 

<title>Top Topiary Test</title>

<META NAME="Description" Content="osCommerce : What\'s New Here? - Hardware Software DVD Movies">

<META NAME="Keywords" CONTENT="Hardware Software DVD Movies What\'s New Here?">

 

2 problems - 1) the default description and keywords wont change through admin and 2) external pages such as links are showing the default details - but not the page specific details i've set up in admin e.g. title should be "links page" and so on.

 

Any hints or tips anyone?

Link to comment
Share on other sites

I went into the English include file for Header_Tags and hard coded the default keywords and descriptions fields - to get rid of the stuff that I couldnt remove through admin.

 

This is the code for that file:

 

<?php
// /catalog/includes/languages/english/header_tags.php
// WebMakers.com Added: Header Tags Generator v2.5.2
// Add META TAGS and Modify TITLE
//
// DEFINITIONS FOR /includes/languages/english/header_tags.php

// Define your email address to appear on all pages
define('HEAD_REPLY_TAG_ALL',STORE_OWNER_EMAIL_ADDRESS);

// 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 AFTER 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','Top Topiary');
define('HEAD_DESC_TAG_ALL','For all Topiary Garden requirements we have a large stock of topiary shrubs and bushes compost, pots, tubs, stone and rocks. We supply exquisite topiary for gardens, weddings, exhibitions, shows, launches and events.');
define('HEAD_KEY_TAG_ALL','topiary, gardens, buxus, box, taxus, yew, Lauris Nobilis, Bay, bay tree,stndard bay,ligistrum,privet,pinus,pine,cupressus,cyprus,ball,spiral,pom pom,cone,gardens, landscape, design, construction, topiary garden, landscape gardening, tree, ornamental,exhibitions, shows, launches, events');

// 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', '0'); //Include HEADE_TITLE_DEFAULT in CATEGORY DISPLAY
define('HEAD_TITLE_TAG_DEFAULT', 'Home Page');
define('HEAD_DESC_TAG_DEFAULT','test1');
define('HEAD_KEY_TAG_DEFAULT','test1');

// links.php
define('HTTA_LINKS_ON','1');
define('HTDA_LINKS_ON','1');
define('HTKA_LINKS_ON','1');
define('HEAD_TITLE_TAG_LINKS','Links Page');
define('HEAD_DESC_TAG_LINKS','This page is a summary of useful 3rd party links.');
define('HEAD_KEY_TAG_LINKS','topiary, balls, offer, plant, flower, balls');

// product_info.php - if left blank in products_description table these values will be used
define('HTTA_PRODUCT_INFO_ON','1');
define('HTKA_PRODUCT_INFO_ON','1');
define('HTDA_PRODUCT_INFO_ON','1');
define('HEAD_TITLE_TAG_PRODUCT_INFO','');
define('HEAD_DESC_TAG_PRODUCT_INFO','');
define('HEAD_KEY_TAG_PRODUCT_INFO','');

// products_new.php - whats_new
define('HTTA_WHATS_NEW_ON','1');
define('HTKA_WHATS_NEW_ON','1');
define('HTDA_WHATS_NEW_ON','1');
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','1');
define('HTKA_SPECIALS_ON','1');
define('HTDA_SPECIALS_ON','1');
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','');

?>

 

So you can see that i have defined relevant text for the links page. But if you go to the links page in question it is displaying the text i have set up as default text. (http://www.readingnightlife.co.uk/catalog/links.php).

 

Would anyone be able to think of why this is so? I can post the contents of the other header tags file in the includes folder if it helps. Any help would be great!!

Link to comment
Share on other sites

From looking at includes/header_tags.php there is an entry for the links page - but its being ignored totally. Here's the code for that page:

 

<?php
/*
 /catalog/includes/header_tags.php
 WebMakers.com Added: Header Tags Generator v2.0
 Add META TAGS and Modify TITLE

 NOTE: Globally replace all fields in products table with current product name just to get things started:
 In phpMyAdmin use: UPDATE products_description set PRODUCTS_HEAD_TITLE_TAG = PRODUCTS_NAME

 Shoppe Enhancement Controller - Copyright (c) 2003 WebMakers.com
 Linda McGrath - [email protected]
*/


require(DIR_WS_LANGUAGES . $language . '/' . 'header_tags.php');

$tags_array = array();

// Define specific settings per page:
switch (true) {
 // ALLPRODS.PHP
 case (strstr($_SERVER['PHP_SELF'],FILENAME_ALLPRODS) or strstr($PHP_SELF,FILENAME_ALLPRODS) ):
   $the_category_query = tep_db_query("select cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . $current_category_id . "' and cd.categories_id = '" . $current_category_id . "' and cd.language_id = '" . $languages_id . "'");
   $the_category = tep_db_fetch_array($the_category_query);

   $the_manufacturers_query= tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . $HTTP_GET_VARS['manufacturers_id'] . "'");
   $the_manufacturers = tep_db_fetch_array($the_manufacturers_query);

   if (HTDA_ALLPRODS_ON=='1') {
     $tags_array['desc']= HEAD_DESC_TAG_ALLPRODS . ' ' . HEAD_DESC_TAG_ALL;
   } else {
     $tags_array['desc']= HEAD_DESC_TAG_ALLPRODS;
   }

   if (HTKA_ALLPRODS_ON=='1') {
     $tags_array['keywords']= HEAD_KEY_TAG_ALL . ' ' . HEAD_KEY_TAG_ALLPRODS;
   } else {
     $tags_array['keywords']= HEAD_KEY_TAG_ALLPRODS;
   }

   if (HTTA_ALLPRODS_ON=='1') {
     $tags_array['title']= HEAD_TITLE_TAG_ALLPRODS . ' ' . HEAD_TITLE_TAG_ALL . " " . $the_category['categories_name'] . $the_manufacturers['manufacturers_name'];
   } else {
     $tags_array['title']= HEAD_TITLE_TAG_ALLPRODS;
   }
   break;

 // products_all.PHP
 case (strstr($_SERVER['PHP_SELF'],FILENAME_PRODUCTS_ALL) or strstr($PHP_SELF,FILENAME_PRODUCTS_ALL) ):
   $the_category_query = tep_db_query("select cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . $current_category_id . "' and cd.categories_id = '" . $current_category_id . "' and cd.language_id = '" . $languages_id . "'");
   $the_category = tep_db_fetch_array($the_category_query);

   $the_manufacturers_query= tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . $HTTP_GET_VARS['manufacturers_id'] . "'");
   $the_manufacturers = tep_db_fetch_array($the_manufacturers_query);

   if (HTDA_PRODUCTS_ALL_ON=='1') {
     $tags_array['desc']= HEAD_DESC_TAG_PRODUCTS_ALL . ' ' . HEAD_DESC_TAG_ALL;
   } else {
     $tags_array['desc']= HEAD_DESC_TAG_PRODUCTS_ALL;
   }

   if (HTKA_PRODUCTS_ALL_ON=='1') {
     $tags_array['keywords']= HEAD_KEY_TAG_ALL . ' ' . HEAD_KEY_TAG_PRODUCTS_ALL;
   } else {
     $tags_array['keywords']= HEAD_KEY_TAG_PRODUCTS_ALL;
   }

   if (HTTA_ALLPRODS_ON=='1') {
     $tags_array['title']= HEAD_TITLE_TAG_PRODUCTS_ALL . ' ' . HEAD_TITLE_TAG_ALL . " " . $the_category['categories_name'] . $the_manufacturers['manufacturers_name'];
   } else {
     $tags_array['title']= HEAD_TITLE_TAG_PRODUCTS_ALL;
   }
   break;

// Help.php
 case (strstr($_SERVER['PHP_SELF'],FILENAME_HELP) or strstr($PHP_SELF, FILENAME_HELP));
   $tags_array = tep_header_tag_page(HTTA_HELP_ON, HEAD_TITLE_TAG_HELP, 
                                     HTDA_HELP_ON, HEAD_DESC_TAG_HELP, 
                                     HTKA_HELP_ON, HEAD_KEY_TAG_HELP );
  break;

// Help1.php
 case (strstr($_SERVER['PHP_SELF'],FILENAME_HELP1) or strstr($PHP_SELF, FILENAME_HELP1));
   $tags_array = tep_header_tag_page(HTTA_HELP1_ON, HEAD_TITLE_TAG_HELP1, 
                                     HTDA_HELP1_ON, HEAD_DESC_TAG_HELP1, 
                                     HTKA_HELP1_ON, HEAD_KEY_TAG_HELP1 );
  break;

// Help2.php
 case (strstr($_SERVER['PHP_SELF'],FILENAME_HELP2) or strstr($PHP_SELF, FILENAME_HELP2));
   $tags_array = tep_header_tag_page(HTTA_HELP2_ON, HEAD_TITLE_TAG_HELP2, 
                                     HTDA_HELP2_ON, HEAD_DESC_TAG_HELP2, 
                                     HTKA_HELP2_ON, HEAD_KEY_TAG_HELP2 );
  break;

// INDEX.PHP
 case (strstr($_SERVER['PHP_SELF'],FILENAME_DEFAULT) or strstr($PHP_SELF,FILENAME_DEFAULT) ):
   $the_category_query = tep_db_query("select categories_name, categories_htc_title_tag, categories_htc_desc_tag, categories_htc_keywords_tag from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'");
   $the_category = tep_db_fetch_array($the_category_query);

   $the_manufacturers_query= tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
   $the_manufacturers = tep_db_fetch_array($the_manufacturers_query);

   $showCatTags = false;
   if ($category_depth == 'nested' || ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id']))) 
     $showCatTags = true;
   
   if (HTDA_DEFAULT_ON=='1') {
     if ($showCatTags == true) {
        if (HTTA_CAT_DEFAULT_ON=='1') {
          $tags_array['desc']= $the_category['categories_htc_desc_tag'] . ' ' . HEAD_DESC_TAG_DEFAULT . ' ' . HEAD_DESC_TAG_ALL;
        } else {
          $tags_array['desc']= $the_category['categories_htc_desc_tag'] . ' ' . HEAD_DESC_TAG_ALL;
        }
     } else {
       $tags_array['desc']= HEAD_DESC_TAG_DEFAULT . ' ' . HEAD_DESC_TAG_ALL;
     }
   } else {
     if ($showCatTags == true) {
        if (HTTA_CAT_DEFAULT_ON=='1') {
          $tags_array['desc']= $the_category['categories_htc_desc_tag'] . ' ' . HEAD_DESC_TAG_DEFAULT;
        } else {
          $tags_array['desc']= $the_category['categories_htc_desc_tag'];
        }
     } else {
       $tags_array['desc']= HEAD_DESC_TAG_DEFAULT;
     }  
   }

   if (HTKA_DEFAULT_ON=='1') {
     if ($showCatTags == true) {
         if (HTTA_CAT_DEFAULT_ON=='1') {
           $tags_array['keywords']= $the_category['categories_htc_keywords_tag'] . ' ' . HEAD_KEY_TAG_ALL . ' ' . HEAD_KEY_TAG_DEFAULT;
         } else {  
           $tags_array['keywords']= $the_category['categories_htc_keywords_tag'] .  ' ' . HEAD_KEY_TAG_DEFAULT;
         }
     } else {
       $tags_array['keywords']= HEAD_KEY_TAG_ALL . ' ' . HEAD_KEY_TAG_DEFAULT;
     }  
   } else {
     if ($showCatTags == true) {
        if (HTTA_CAT_DEFAULT_ON=='1') {
          $tags_array['keywords']= $the_category['categories_htc_keywords_tag'] . ' ' . HEAD_KEY_TAG_DEFAULT;
        } else {
          $tags_array['keywords']= $the_category['categories_htc_keywords_tag'];
        }  
     } else {
        $tags_array['keywords']= HEAD_KEY_TAG_DEFAULT;
     }   
   }

   if (HTTA_DEFAULT_ON=='1') {
     if ($showCatTags == true) {
       if (HTTA_CAT_DEFAULT_ON=='1') {
         $tags_array['title']= $the_category['categories_htc_title_tag'] .' '.  HEAD_TITLE_TAG_DEFAULT . " " .  $the_manufacturers['manufacturers_name'] . ' - ' . HEAD_TITLE_TAG_ALL;
       } else {
         $tags_array['title']= $the_category['categories_htc_title_tag'] .' '.  $the_manufacturers['manufacturers_name'] . ' - ' . HEAD_TITLE_TAG_ALL;
       }
     } else {
       $tags_array['title']= HEAD_TITLE_TAG_DEFAULT . " " . $the_category['categories_name'] . $the_manufacturers['manufacturers_name'] . ' - ' . HEAD_TITLE_TAG_ALL;
     }
   } else {
     if ($showCatTags == true) {
       if (HTTA_CAT_DEFAULT_ON=='1') {
         $tags_array['title']= $the_category['categories_htc_title_tag'] . ' ' . HEAD_TITLE_TAG_DEFAULT;
       } else {
         $tags_array['title']= $the_category['categories_htc_title_tag'];
       } 
     } else {
       $tags_array['title']= HEAD_TITLE_TAG_DEFAULT;
     }  
   }

   break;

// links.php
 case (strstr($_SERVER['PHP_SELF'],FILENAME_LINKS) or strstr($PHP_SELF, FILENAME_LINKS));
   $tags_array = tep_header_tag_page(HTTA_LINKS_ON, HEAD_TITLE_TAG_LINKS, 
                                     HTDA_LINKS_ON, HEAD_DESC_TAG_LINKS, 
                                     HTKA_LINKS_ON, HEAD_KEY_TAG_LINKS );
  break;

// PRODUCT_INFO.PHP
 case ( strstr($_SERVER['PHP_SELF'],FILENAME_PRODUCT_INFO) or strstr($PHP_SELF,FILENAME_PRODUCT_INFO) ):
//    $the_product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_keywords_tag, pd.products_head_desc_tag, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . $HTTP_GET_VARS['products_id'] . "'");
   $the_product_info_query = tep_db_query("select pd.language_id, p.products_id, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_keywords_tag, pd.products_head_desc_tag, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . $HTTP_GET_VARS['products_id'] . "'" . " and pd.language_id ='" .  $languages_id . "'");
   $the_product_info = tep_db_fetch_array($the_product_info_query);

   if (empty($the_product_info['products_head_desc_tag'])) {
     $tags_array['desc']= HEAD_DESC_TAG_ALL;
   } else {
     if ( HTDA_PRODUCT_INFO_ON=='1' ) {
       $tags_array['desc']= $the_product_info['products_head_desc_tag'] . ' ' . HEAD_DESC_TAG_ALL;
     } else {
       $tags_array['desc']= $the_product_info['products_head_desc_tag'];
     }
   }

   if (empty($the_product_info['products_head_keywords_tag'])) {
     $tags_array['keywords']= HEAD_KEY_TAG_ALL;
   } else {
     if ( HTKA_PRODUCT_INFO_ON=='1' ) {
       $tags_array['keywords']= $the_product_info['products_head_keywords_tag'] . ' ' . HEAD_KEY_TAG_ALL;
     } else {
       $tags_array['keywords']= $the_product_info['products_head_keywords_tag'];
     }
   }

   if (empty($the_product_info['products_head_title_tag'])) {
     $tags_array['title']= HEAD_TITLE_TAG_ALL;
   } else {
     if ( HTTA_PRODUCT_INFO_ON=='1' ) {
       $tags_array['title']= clean_html_comments($the_product_info['products_head_title_tag']) . ' ' . HEAD_TITLE_TAG_ALL;
     } else {
       $tags_array['title']= clean_html_comments($the_product_info['products_head_title_tag']);
     }
   }

   break;


// PRODUCTS_NEW.PHP
 case ( strstr($_SERVER['PHP_SELF'],FILENAME_PRODUCTS_NEW) or strstr($PHP_SELF,FILENAME_PRODUCTS_NEW) ):
   if ( HEAD_DESC_TAG_WHATS_NEW!='' ) {
     if ( HTDA_WHATS_NEW_ON=='1' ) {
       $tags_array['desc']= HEAD_DESC_TAG_WHATS_NEW . ' ' . HEAD_DESC_TAG_ALL;
     } else {
       $tags_array['desc']= HEAD_DESC_TAG_WHATS_NEW;
     }
   } else {
     $tags_array['desc']= HEAD_DESC_TAG_ALL;
   }

   if ( HEAD_KEY_TAG_WHATS_NEW!='' ) {
     if ( HTKA_WHATS_NEW_ON=='1' ) {
       $tags_array['keywords']= HEAD_KEY_TAG_WHATS_NEW . ' ' . HEAD_KEY_TAG_ALL;
     } else {
       $tags_array['keywords']= HEAD_KEY_TAG_WHATS_NEW;
     }
   } else {
     $tags_array['keywords']= HEAD_KEY_TAG_ALL;
   }

   if ( HEAD_TITLE_TAG_WHATS_NEW!='' ) {
     if ( HTTA_WHATS_NEW_ON=='1' ) {
       $tags_array['title']= HEAD_TITLE_TAG_WHATS_NEW . ' ' . HEAD_TITLE_TAG_ALL;
     } else {
       $tags_array['title']= HEAD_TITLE_TAG_WHATS_NEW;
     }
   } else {
     $tags_array['title']= HEAD_TITLE_TAG_ALL;
   }

   break;


// SPECIALS.PHP
 case ( strstr($_SERVER['PHP_SELF'],FILENAME_SPECIALS)  or strstr($PHP_SELF,FILENAME_SPECIALS) ):
   if ( HEAD_DESC_TAG_SPECIALS!='' ) {
     if ( HTDA_SPECIALS_ON=='1' ) {
       $tags_array['desc']= HEAD_DESC_TAG_SPECIALS . ' ' . HEAD_DESC_TAG_ALL;
     } else {
       $tags_array['desc']= HEAD_DESC_TAG_SPECIALS;
     }
   } else {
     $tags_array['desc']= HEAD_DESC_TAG_ALL;
   }

   if ( HEAD_KEY_TAG_SPECIALS=='' ) {
     // Build a list of ALL specials product names to put in keywords
     $new = tep_db_query("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and s.status = '1' order by s.specials_date_added DESC ");
     $row = 0;
     $the_specials='';
     while ($new_values = tep_db_fetch_array($new)) {
       $the_specials .= clean_html_comments($new_values['products_name']) . ', ';
     }
     if ( HTKA_SPECIALS_ON=='1' ) {
       $tags_array['keywords']= $the_specials . ' ' . HEAD_KEY_TAG_ALL;
     } else {
       $tags_array['keywords']= $the_specials;
     }
   } else {
     $tags_array['keywords']= HEAD_KEY_TAG_SPECIALS . ' ' . HEAD_KEY_TAG_ALL;
   }

   if ( HEAD_TITLE_TAG_SPECIALS!='' ) {
     if ( HTTA_SPECIALS_ON=='1' ) {
       $tags_array['title']= HEAD_TITLE_TAG_SPECIALS . ' ' . HEAD_TITLE_TAG_ALL;
     } else {
       $tags_array['title']= HEAD_TITLE_TAG_SPECIALS;
     }
   } else {
     $tags_array['title']= HEAD_TITLE_TAG_ALL;
   }

   break;


// PRODUCTS_REVIEWS_INFO.PHP and PRODUCTS_REVIEWS.PHP
   case((basename($PHP_SELF)==FILENAME_PRODUCT_REVIEWS) or (basename($PHP_SELF)==FILENAME_PRODUCT_REVIEWS_INFO)):
   if ( HEAD_DESC_TAG_PRODUCT_REVIEWS_INFO=='' ) {
     if ( HTDA_PRODUCT_REVIEWS_INFO_ON=='1' ) {
       $tags_array['desc']= tep_get_header_tag_products_desc($HTTP_GET_VARS['reviews_id']) . ' ' . HEAD_DESC_TAG_ALL;
     } else {
       $tags_array['desc']= tep_get_header_tag_products_desc($HTTP_GET_VARS['reviews_id']);
     }
   } else {
     $tags_array['desc']= HEAD_DESC_TAG_PRODUCT_REVIEWS_INFO;
   }

   if ( HEAD_KEY_TAG_PRODUCT_REVIEWS_INFO=='' ) {
     if ( HTKA_PRODUCT_REVIEWS_INFO_ON=='1' ) {
       $tags_array['keywords']= tep_get_header_tag_products_keywords($HTTP_GET_VARS['reviews_id']) . ' ' . HEAD_KEY_TAG_ALL;
     } else {
       $tags_array['keywords']= tep_get_header_tag_products_keywords($HTTP_GET_VARS['reviews_id']);
     }
   } else {
     $tags_array['keywords']= HEAD_KEY_TAG_PRODUCT_REVIEWS_INFO;
   }

   if ( HEAD_TITLE_TAG_PRODUCT_REVIEWS_INFO=='' ) {
     if ( HTTA_PRODUCT_REVIEWS_INFO_ON=='1' ) {
       $tags_array['title']= ' Reviews: ' . tep_get_header_tag_products_title($HTTP_GET_VARS['reviews_id']) . HEAD_TITLE_TAG_ALL;
     } else {
       $tags_array['title']= tep_get_header_tag_products_title($HTTP_GET_VARS['reviews_id']);
     }
   } else {
     $tags_array['title']= HEAD_TITLE_TAG_PRODUCT_REVIEWS_INFO;
   }
   break;

// PRODUCTS_REVIEWS_WRITE.PHP
   case((basename($PHP_SELF)==FILENAME_PRODUCT_REVIEWS_WRITE)):
   if ( HEAD_DESC_TAG_PRODUCT_REVIEWS_WRITE=='' ) {
     if ( HTDA_PRODUCT_REVIEWS_WRITE_ON=='1' ) {
       $tags_array['desc']= tep_get_header_tag_products_desc($HTTP_GET_VARS['reviews_id']) . ' ' . HEAD_DESC_TAG_ALL;
     } else {
       $tags_array['desc']= tep_get_header_tag_products_desc($HTTP_GET_VARS['reviews_id']);
     }
   } else {
     $tags_array['desc']= HEAD_DESC_TAG_PRODUCT_REVIEWS_WRITE;
   }

   if ( HEAD_KEY_TAG_PRODUCT_REVIEWS_WRITE=='' ) {
     if ( HTKA_PRODUCT_REVIEWS_WRITE_ON=='1' ) {
       $tags_array['keywords']= tep_get_header_tag_products_keywords($HTTP_GET_VARS['reviews_id']) . ' ' . HEAD_KEY_TAG_ALL;
     } else {
       $tags_array['keywords']= tep_get_header_tag_products_keywords($HTTP_GET_VARS['reviews_id']);
     }
   } else {
     $tags_array['keywords']= HEAD_KEY_TAG_PRODUCT_REVIEWS_WRITE;
   }

   if ( HEAD_TITLE_TAG_PRODUCT_REVIEWS_WRITE=='' ) {
     if ( HTTA_PRODUCT_REVIEWS_WRITE_ON=='1' ) {
       $tags_array['title']= ' Reviews: ' . tep_get_header_tag_products_title($HTTP_GET_VARS['reviews_id']) . HEAD_TITLE_TAG_ALL;
     } else {
       $tags_array['title']= tep_get_header_tag_products_title($HTTP_GET_VARS['reviews_id']);
     }
   } else {
     $tags_array['title']= HEAD_TITLE_TAG_PRODUCT_REVIEWS_WRITE;
   }
   break;
   
  // about_us.PHP - was default.php
  case (strstr($_SERVER['PHP_SELF'],FILENAME_ABOUT_US) or strstr($PHP_SELF, FILENAME_ABOUT_US) ):
  $tags_array = tep_header_tag_page(HTTA_ABOUTUS_ON, HEAD_TITLE_TAG_ABOUTUS,
                                    HTDA_ABOUTUS_ON, HEAD_DESC_TAG_ABOUTUS,
                                    HTKA_ABOUTUS_ON, HEAD_KEY_TAG_ABOUTUS );
  break;

// ALL OTHER PAGES NOT DEFINED ABOVE
 default:
   $tags_array['desc'] = HEAD_DESC_TAG_ALL;
   $tags_array['keywords'] = HEAD_KEY_TAG_ALL;
   $tags_array['title'] = HEAD_TITLE_TAG_ALL;
   break;
 }

echo '  <title>' . $tags_array['title'] . '</title>' . "\n";
echo '  <META NAME="Description" Content="' . $tags_array['desc'] . '">' . "\n";
echo '  <META NAME="Keywords" CONTENT="' . $tags_array['keywords'] . '">' . "\n";
echo ' <meta http-equiv="Content-Type" content="text/html; charset=' . CHARSET  . '">'."\n";
echo '  <META NAME="Reply-to" CONTENT="' . HEAD_REPLY_TAG_ALL . '">' . "\n";

echo '<!-- EOF: Generated Meta Tags -->' . "\n";
?>

 

Again, to see links.php - go to http://www.readingnightlife.co.uk/catalog/links.php

 

You'll see that it is going to the default settings when something isnt defined - but you can see that links is getting defined yet still isnt working. Can anyone see any flaws in the code or think about why its not working?

Link to comment
Share on other sites

It appears that whatever i put in the links.php head area to call on the Header Tags contribution it gets over-ridden by STS regardless.

 

e.g. I could put in:

 

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

?>

 

To the header tag, or just have:

 

<title><?php echo TITLE; ?></title> (and none of the rest, like before, as i understand you dont need to put the above into every page if you use sts because it over-rides it anyway)

 

Yet it will still display the default title, description, and keywords set up in the header_tags file - and not my links specific tags. So it's getting called by STS regardless - without the above head tag code - so i'm now assuming its now an STS issue/conflict - or there's an error in my includes/header_tags file?

 

Can anyone help me get to the bottom of this?

Link to comment
Share on other sites

Try turning off the STS code in sts_display_output.php. You will need to add the Header Tags code to at least one of your files for this to work. If it works, then you have a problem with STS.

 

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

1 - The code should select the proper language file. Try making a change and then looking at the timestamp on the english/header_tags.php and swedish/header_tags.pho files to see which one is being updated.

 

2 - Others have mentioned this but I can never get it to fail. Try replacing your admin categories.php file with the one from the archive to see it that works. You won't be able to use if you have made other changes to that file but it should work for a test.

 

You still need to make the changes to the index file for the categories description option to work.

 

Jack

 

 

1 - The english one is modified. I thought I would be able to modify both languages from Admin -> Header Tags -> Text Control AND Page Control? How can I do that?

 

2 - Oh, I meant admin/header_tags_english.php. I can't modify default title, default description and default keywords in admin/header_tags_english.php. When clicking update they are just the sama again. The others seems to work though.

Link to comment
Share on other sites

1 - You should be able to. You have to switch the language in use for admin and make sure the header_tags.php file has been copied to the other language directory. I just tested it here and it worked fine.

 

2 - Others have mentioned this and I am at a loss for a reason since I cannot get it to fail. I'll be uploading a new version in the next week or so. Maybe it will work better for you.

 

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

Oh, I don't use several languages in my admin. All contributions are in english and it would be unnecessary to translate even the language files for the contributions.

 

There's no way to include swedish in admin/header_tags_english.php? (two languages simultaneously).

 

Or is it possible to have 2 x Page Control and Text Control in admins left column?

Link to comment
Share on other sites

Hi Jack, I have decided to post my question here now instead of the SEO thread as I feel it is more relevant.

I have managed to delete the code from the fill_tags.php so that my categories are not automatically updated (although this is not fully tested yet).

I opened my categories.php in admin/ and found lots of entries for categories but no way of identifying which was which. I havent a clue if this is the right file.

I will apologise in advance for the following long code but here is my categories.php

  require('includes/application_top.php');

 

 require(DIR_WS_CLASSES . 'currencies.php');

 $currencies = new currencies();

 

 $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

// Ultimate SEO URLs v2.1

// If the action will affect the cache entries

   if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_seo_cache.php');

 

 if (tep_not_null($action)) {

   switch ($action) {

     case 'setflag':

       if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) {

         if (isset($HTTP_GET_VARS['pID'])) {

           tep_set_product_status($HTTP_GET_VARS['pID'], $HTTP_GET_VARS['flag']);

         }

 

         if (USE_CACHE == 'true') {

           tep_reset_cache_block('categories');

           tep_reset_cache_block('also_purchased');

         }

       }

 

       tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $HTTP_GET_VARS['cPath'] . '&pID=' . $HTTP_GET_VARS['pID']));

       break;

     case 'insert_category':

     case 'update_category':

       if (isset($HTTP_POST_VARS['categories_id'])) $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']);

       $sort_order = tep_db_prepare_input($HTTP_POST_VARS['sort_order']);

 

       $sql_data_array = array('sort_order' => $sort_order);

 

       if ($action == 'insert_category') {

         $insert_sql_data = array('parent_id' => $current_category_id,

                                  'date_added' => 'now()');

 

         $sql_data_array = array_merge($sql_data_array, $insert_sql_data);

 

         tep_db_perform(TABLE_CATEGORIES, $sql_data_array);

 

         $categories_id = tep_db_insert_id();

       } elseif ($action == 'update_category') {

         $update_sql_data = array('last_modified' => 'now()');

 

         $sql_data_array = array_merge($sql_data_array, $update_sql_data);

 

         tep_db_perform(TABLE_CATEGORIES, $sql_data_array, 'update', "categories_id = '" . (int)$categories_id . "'");

       }

 

       $languages = tep_get_languages();

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

         $categories_name_array = $HTTP_POST_VARS['categories_name'];

         //HTC BOC

         $categories_htc_title_array = $HTTP_POST_VARS['categories_htc_title_tag'];

         $categories_htc_desc_array = $HTTP_POST_VARS['categories_htc_desc_tag'];

         $categories_htc_keywords_array = $HTTP_POST_VARS['categories_htc_keywords_tag'];

         $categories_htc_description_array = $HTTP_POST_VARS['categories_htc_description'];

         //HTC EOC

 

         $language_id = $languages[$i]['id'];

 

     //HTC BOC

     $sql_data_array = array('categories_name' => tep_db_prepare_input($categories_name_array[$language_id]),

          'categories_htc_title_tag' => tep_db_prepare_input($categories_htc_title_array[$language_id]),

          'categories_htc_desc_tag' => tep_db_prepare_input($categories_htc_desc_array[$language_id]),

          'categories_htc_keywords_tag' => tep_db_prepare_input($categories_htc_keywords_array[$language_id]),

          'categories_htc_description' => tep_db_prepare_input($categories_htc_description_array[$language_id]));

     //HTC EOC

 

         if ($action == 'insert_category') {

           $insert_sql_data = array('categories_id' => $categories_id,

                                    'language_id' => $languages[$i]['id']);

 

           $sql_data_array = array_merge($sql_data_array, $insert_sql_data);

 

           tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array);

         } elseif ($action == 'update_category') {

           tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array, 'update', "categories_id = '" . (int)$categories_id . "' and language_id = '" . (int)$languages[$i]['id'] . "'");

         }

       }

 

       if ($categories_image = new upload('categories_image', DIR_FS_CATALOG_IMAGES)) {

         tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . tep_db_input($categories_image->filename) . "' where categories_id = '" . (int)$categories_id . "'");

       }

 

       if (USE_CACHE == 'true') {

         tep_reset_cache_block('categories');

         tep_reset_cache_block('also_purchased');

       }

 

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

       break;

     case 'delete_category_confirm':

       if (isset($HTTP_POST_VARS['categories_id'])) {

         $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']);

 

         $categories = tep_get_category_tree($categories_id, '', '0', '', true);

         $products = array();

         $products_delete = array();

 

         for ($i=0, $n=sizeof($categories); $i<$n; $i++) {

           $product_ids_query = tep_db_query("select products_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$categories[$i]['id'] . "'");

 

           while ($product_ids = tep_db_fetch_array($product_ids_query)) {

             $products[$product_ids['products_id']]['categories'][] = $categories[$i]['id'];

           }

         }

 

         reset($products);

         while (list($key, $value) = each($products)) {

           $category_ids = '';

 

           for ($i=0, $n=sizeof($value['categories']); $i<$n; $i++) {

             $category_ids .= "'" . (int)$value['categories'][$i] . "', ";

           }

           $category_ids = substr($category_ids, 0, -2);

 

           $check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$key . "' and categories_id not in (" . $category_ids . ")");

           $check = tep_db_fetch_array($check_query);

           if ($check['total'] < '1') {

             $products_delete[$key] = $key;

           }

         }

 

// removing categories can be a lengthy process

         tep_set_time_limit(0);

         for ($i=0, $n=sizeof($categories); $i<$n; $i++) {

           tep_remove_category($categories[$i]['id']);

         }

 

         reset($products_delete);

         while (list($key) = each($products_delete)) {

           tep_remove_product($key);

         }

       }

 

       if (USE_CACHE == 'true') {

         tep_reset_cache_block('categories');

         tep_reset_cache_block('also_purchased');

       }

 

       tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath));

       break;

     case 'delete_product_confirm':

       if (isset($HTTP_POST_VARS['products_id']) && isset($HTTP_POST_VARS['product_categories']) && is_array($HTTP_POST_VARS['product_categories'])) {

         $product_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']);

         $product_categories = $HTTP_POST_VARS['product_categories'];

 

         for ($i=0, $n=sizeof($product_categories); $i<$n; $i++) {

           tep_db_query("delete from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$product_id . "' and categories_id = '" . (int)$product_categories[$i] . "'");

         }

 

         $product_categories_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$product_id . "'");

         $product_categories = tep_db_fetch_array($product_categories_query);

 

         if ($product_categories['total'] == '0') {

           tep_remove_product($product_id);

         }

       }

 

       if (USE_CACHE == 'true') {

         tep_reset_cache_block('categories');

         tep_reset_cache_block('also_purchased');

       }

 

       tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath));

       break;

     case 'move_category_confirm':

       if (isset($HTTP_POST_VARS['categories_id']) && ($HTTP_POST_VARS['categories_id'] != $HTTP_POST_VARS['move_to_category_id'])) {

         $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']);

         $new_parent_id = tep_db_prepare_input($HTTP_POST_VARS['move_to_category_id']);

 

         $path = explode('_', tep_get_generated_category_path_ids($new_parent_id));

 

         if (in_array($categories_id, $path)) {

           $messageStack->add_session(ERROR_CANNOT_MOVE_CATEGORY_TO_PARENT, 'error');

 

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

         } else {

           tep_db_query("update " . TABLE_CATEGORIES . " set parent_id = '" . (int)$new_parent_id . "', last_modified = now() where categories_id = '" . (int)$categories_id . "'");

 

           if (USE_CACHE == 'true') {

             tep_reset_cache_block('categories');

             tep_reset_cache_block('also_purchased');

           }

 

           tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $new_parent_id . '&cID=' . $categories_id));

         }

       }

 

       break;

     case 'move_product_confirm':

       $products_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']);

       $new_parent_id = tep_db_prepare_input($HTTP_POST_VARS['move_to_category_id']);

 

       $duplicate_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$products_id . "' and categories_id = '" . (int)$new_parent_id . "'");

       $duplicate_check = tep_db_fetch_array($duplicate_check_query);

       if ($duplicate_check['total'] < 1) tep_db_query("update " . TABLE_PRODUCTS_TO_CATEGORIES . " set categories_id = '" . (int)$new_parent_id . "' where products_id = '" . (int)$products_id . "' and categories_id = '" . (int)$current_category_id . "'");

 

       if (USE_CACHE == 'true') {

         tep_reset_cache_block('categories');

         tep_reset_cache_block('also_purchased');

       }

 

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

       break;

     case 'insert_product':

     case 'update_product':

       if (isset($HTTP_POST_VARS['edit_x']) || isset($HTTP_POST_VARS['edit_y'])) {

         $action = 'new_product';

       } else {

         if (isset($HTTP_GET_VARS['pID'])) $products_id = tep_db_prepare_input($HTTP_GET_VARS['pID']);

         $products_date_available = tep_db_prepare_input($HTTP_POST_VARS['products_date_available']);

 

         $products_date_available = (date('Y-m-d') < $products_date_available) ? $products_date_available : 'null';

 

         $sql_data_array = array('products_quantity' => tep_db_prepare_input($HTTP_POST_VARS['products_quantity']),

// mod multi indvship

                                 'products_ship_price_one' => tep_db_prepare_input($HTTP_POST_VARS['products_ship_price_one']),

                                 'products_ship_price_two' => tep_db_prepare_input($HTTP_POST_VARS['products_ship_price_two']),

                                 'products_ship_price_three' => tep_db_prepare_input($HTTP_POST_VARS['products_ship_price_three']),

                                 'products_ship_price_four' => tep_db_prepare_input($HTTP_POST_VARS['products_ship_price_four']),

//multi indvship

                                 'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model']),

                                 'products_price' => tep_db_prepare_input($HTTP_POST_VARS['products_price']),

                                 'products_date_available' => $products_date_available,

                                 'products_weight' => tep_db_prepare_input($HTTP_POST_VARS['products_weight']),

                                 'products_status' => tep_db_prepare_input($HTTP_POST_VARS['products_status']),

                                 'products_tax_class_id' => tep_db_prepare_input($HTTP_POST_VARS['products_tax_class_id']),

                                 'manufacturers_id' => tep_db_prepare_input($HTTP_POST_VARS['manufacturers_id']));

 

         if (isset($HTTP_POST_VARS['products_image']) && tep_not_null($HTTP_POST_VARS['products_image']) && ($HTTP_POST_VARS['products_image'] != 'none')) {

           $sql_data_array['products_image'] = tep_db_prepare_input($HTTP_POST_VARS['products_image']);

         }

 

         if ($action == 'insert_product') {

           $insert_sql_data = array('products_date_added' => 'now()');

 

           $sql_data_array = array_merge($sql_data_array, $insert_sql_data);

 

           tep_db_perform(TABLE_PRODUCTS, $sql_data_array);

           $products_id = tep_db_insert_id();

 

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

         } elseif ($action == 'update_product') {

           $update_sql_data = array('products_last_modified' => 'now()');

 

           $sql_data_array = array_merge($sql_data_array, $update_sql_data);

 

           tep_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "'");

         }

 

         $languages = tep_get_languages();

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

           $language_id = $languages[$i]['id'];

 

          //HTC BOC

           $sql_data_array = array('products_name' => tep_db_prepare_input($HTTP_POST_VARS['products_name'][$language_id]),

                                   'products_description' => tep_db_prepare_input($HTTP_POST_VARS['products_description'][$language_id]),

                                   'products_url' => tep_db_prepare_input($HTTP_POST_VARS['products_url'][$language_id]),

                                   'products_head_title_tag' => tep_db_prepare_input($HTTP_POST_VARS['products_head_title_tag'][$language_id]),

                                   'products_head_desc_tag' => tep_db_prepare_input($HTTP_POST_VARS['products_head_desc_tag'][$language_id]),

                                   'products_head_keywords_tag' => tep_db_prepare_input($HTTP_POST_VARS['products_head_keywords_tag'][$language_id]));

          //HTC EOC

 

           if ($action == 'insert_product') {

             $insert_sql_data = array('products_id' => $products_id,

                                      'language_id' => $language_id);

 

             $sql_data_array = array_merge($sql_data_array, $insert_sql_data);

 

             tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array);

           } elseif ($action == 'update_product') {

             tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_id . "'");

           }

         }

 

         if (USE_CACHE == 'true') {

           tep_reset_cache_block('categories');

           tep_reset_cache_block('also_purchased');

         }

 

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

       }

       break;

     case 'copy_to_confirm':

       if (isset($HTTP_POST_VARS['products_id']) && isset($HTTP_POST_VARS['categories_id'])) {

         $products_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']);

         $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']);

 

         if ($HTTP_POST_VARS['copy_as'] == 'link') {

           if ($categories_id != $current_category_id) {

             $check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$products_id . "' and categories_id = '" . (int)$categories_id . "'");

             $check = tep_db_fetch_array($check_query);

             if ($check['total'] < '1') {

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

             }

           } else {

             $messageStack->add_session(ERROR_CANNOT_LINK_TO_SAME_CATEGORY, 'error');

           }

         } elseif ($HTTP_POST_VARS['copy_as'] == 'duplicate') {

           $product_query = tep_db_query("select products_ship_price_one, products_ship_price_two, products_ship_price_three, products_ship_price_four, 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_ship_price_one, products_ship_price_two, products_ship_price_three, products_ship_price_four, 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']) . "',  '" . $product['products_ship_price_one'] . "',  '" . $product['products_ship_price_two'] . "',  '" . $product['products_ship_price_three'] . "',  '" . $product['products_ship_price_four'] . "', '" . 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

 

           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;

   }

 }

 

// check if the catalog image directory exists

 if (is_dir(DIR_FS_CATALOG_IMAGES)) {

   if (!is_writeable(DIR_FS_CATALOG_IMAGES)) $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error');

 } else {

   $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error');

 }

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">

<script language="javascript" src="includes/general.js"></script>

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">

<div id="spiffycalendar" class="text"></div>

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

 

<!-- body //-->

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

 <tr>

   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

   </table></td>

<!-- body_text //-->

   <td width="100%" valign="top">

<?php

 if ($action == 'new_product') {

   $parameters = array('products_name' => '',

                      'products_description' => '',

                      'products_url' => '',

                      'products_id' => '',

                      'products_quantity' => '',

                      'products_model' => '',

                      'products_image' => '',

                      'products_price' => '',

                      'products_weight' => '',

                      'products_date_added' => '',

                      'products_last_modified' => '',

                      'products_date_available' => '',

                      'products_status' => '',

                          'products_tax_class_id' => '',

                      'manufacturers_id' => '');

 

   $pInfo = new objectInfo($parameters);

 

  //HTC BOC

  if (isset ($HTTP_GET_VARS['pID']) && (!$HTTP_POST_VARS) ) {

     $product_query = tep_db_query("select p.products_ship_price_one, p.products_ship_price_two, p.products_ship_price_three, p.products_ship_price_four, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");

     $product = tep_db_fetch_array($product_query);

  //HTC EOC

 

     $pInfo->objectInfo($product);

   } elseif (tep_not_null($HTTP_POST_VARS)) {

     $pInfo->objectInfo($HTTP_POST_VARS);

     $products_name = $HTTP_POST_VARS['products_name'];

     $products_description = $HTTP_POST_VARS['products_description'];

     $products_url = $HTTP_POST_VARS['products_url'];

   }

 

   $manufacturers_array = array(array('id' => '', 'text' => TEXT_NONE));

   $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");

   while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {

     $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'],

                                    'text' => $manufacturers['manufacturers_name']);

   }

 

   $tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE));

   $tax_class_query = tep_db_query("select tax_class_id, tax_class_title from " . TABLE_TAX_CLASS . " order by tax_class_title");

   while ($tax_class = tep_db_fetch_array($tax_class_query)) {

     $tax_class_array[] = array('id' => $tax_class['tax_class_id'],

                                'text' => $tax_class['tax_class_title']);

   }

 

   $languages = tep_get_languages();

 

   if (!isset($pInfo->products_status)) $pInfo->products_status = '1';

   switch ($pInfo->products_status) {

     case '0': $in_status = false; $out_status = true; break;

     case '1':

     default: $in_status = true; $out_status = false;

   }

?>

<link rel="stylesheet" type="text/css" href="includes/javascript/spiffyCal/spiffyCal_v2_1.css">

<script language="JavaScript" src="includes/javascript/spiffyCal/spiffyCal_v2_1.js"></script>

<script language="javascript"><!--

 var dateAvailable = new ctlSpiffyCalendarBox("dateAvailable", "new_product", "products_date_available","btnDate1","<?php echo $pInfo->products_date_available; ?>",scBTNMODE_CUSTOMBLUE);

//--></script>

<script language="javascript"><!--

var tax_rates = new Array();

<?php

   for ($i=0, $n=sizeof($tax_class_array); $i<$n; $i++) {

     if ($tax_class_array[$i]['id'] > 0) {

       echo 'tax_rates["' . $tax_class_array[$i]['id'] . '"] = ' . tep_get_tax_rate_value($tax_class_array[$i]['id']) . ';' . "\n";

     }

   }

?>

 

function doRound(x, places) {

 return Math.round(x * Math.pow(10, places)) / Math.pow(10, places);

}

 

function getTaxRate() {

 var selected_value = document.forms["new_product"].products_tax_class_id.selectedIndex;

 var parameterVal = document.forms["new_product"].products_tax_class_id[selected_value].value;

 

 if ( (parameterVal > 0) && (tax_rates[parameterVal] > 0) ) {

   return tax_rates[parameterVal];

 } else {

   return 0;

 }

}

 

function updateGross() {

 var taxRate = getTaxRate();

 var grossValue = document.forms["new_product"].products_price.value;

 

 if (taxRate > 0) {

   grossValue = grossValue * ((taxRate / 100) + 1);

 }

 

 document.forms["new_product"].products_price_gross.value = doRound(grossValue, 4);

}

 

function updateNet() {

 var taxRate = getTaxRate();

 var netValue = document.forms["new_product"].products_price_gross.value;

 

 if (taxRate > 0) {

   netValue = netValue / ((taxRate / 100) + 1);

 }

 

 document.forms["new_product"].products_price.value = doRound(netValue, 4);

}

//--></script>

   <?php echo tep_draw_form('new_product', FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '') . '&action=new_product_preview', 'post', 'enctype="multipart/form-data"'); ?>

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

     <tr>

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

         <tr>

           <td class="pageHeading"><?php echo sprintf(TEXT_NEW_PRODUCT, tep_output_generated_category_path($current_category_id)); ?></td>

           <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

         </tr>

       </table></td>

     </tr>

     <tr>

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

     </tr>

     <tr>

       <td><table border="0" cellspacing="0" cellpadding="2">

         <tr>

           <td class="main"><?php echo TEXT_PRODUCTS_STATUS; ?></td>

           <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_radio_field('products_status', '1', $in_status) . ' ' . TEXT_PRODUCT_AVAILABLE . ' ' . tep_draw_radio_field('products_status', '0', $out_status) . ' ' . TEXT_PRODUCT_NOT_AVAILABLE; ?></td>

         </tr>

         <tr>

           <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

         </tr>

         <tr>

           <td class="main"><?php echo TEXT_PRODUCTS_DATE_AVAILABLE; ?><br><small>(YYYY-MM-DD)</small></td>

           <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' '; ?><script language="javascript">dateAvailable.writeControl(); dateAvailable.dateFormat="yyyy-MM-dd";</script></td>

         </tr>

         <tr>

           <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

         </tr>

         <tr>

           <td class="main"><?php echo TEXT_PRODUCTS_MANUFACTURER; ?></td>

           <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, $pInfo->manufacturers_id); ?></td>

         </tr>

         <tr>

           <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

         </tr>

<?php

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

?>

         <tr>

           <td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_NAME; ?></td>

           <td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('products_name[' . $languages[$i]['id'] . ']', (isset($products_name[$languages[$i]['id']]) ? $products_name[$languages[$i]['id']] : tep_get_products_name($pInfo->products_id, $languages[$i]['id']))); ?></td>

         </tr>

<?php

   }

?>

         <tr>

           <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

         </tr>

         <tr bgcolor="#ebebff">

           <td class="main"><?php echo TEXT_PRODUCTS_TAX_CLASS; ?></td>

           <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_pull_down_menu('products_tax_class_id', $tax_class_array, $pInfo->products_tax_class_id, 'onchange="updateGross()"'); ?></td>

         </tr>

         <tr bgcolor="#ebebff">

           <td class="main"><?php echo TEXT_PRODUCTS_PRICE_NET; ?></td>

           <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_price', $pInfo->products_price, 'onKeyUp="updateGross()"'); ?></td>

         </tr>

         <tr bgcolor="#ebebff">

           <td class="main"><?php echo TEXT_PRODUCTS_PRICE_GROSS; ?></td>

           <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_price_gross', $pInfo->products_price, 'OnKeyUp="updateNet()"'); ?></td>

         </tr>

<!-- mod multi indvship -->

         <tr>

           <td class="main"><?php echo 'Indv. Shipping Price 1:'; ?></td>

           <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_ship_price_one', $pInfo->products_ship_price_one); ?></td>

         </tr>

         <tr>

           <td class="main"><?php echo 'Indv. Shipping Price 2:'; ?></td>

           <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_ship_price_two', $pInfo->products_ship_price_two); ?></td>

         </tr>

         <tr>

           <td class="main"><?php echo 'Indv. Shipping Price 3:'; ?></td>

           <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_ship_price_three', $pInfo->products_ship_price_three); ?></td>

         </tr>

         <tr>

           <td class="main"><?php echo 'Indv. Shipping Price 4:'; ?></td>

           <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_ship_price_four', $pInfo->products_ship_price_four); ?></td>

         </tr>

<!-- end multi indvship -->

         <tr>

           <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

         </tr>

<script language="javascript"><!--

updateGross();

//--></script>

<!-- HTC BOC //-->

<?php

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

?>

        <tr>

           <td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td>

           <td><table border="0" cellspacing="0" cellpadding="0">

             <tr>

               <td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td>

               <td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? $products_description[$languages[$i]['id']] : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td>

 

             </tr>

           </table></td>

         </tr>

<?php

   }

?>

         <tr>

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

         </tr>

         <tr>

           <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

         </tr>

<?php

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

?>

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

<?php

   }

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

?>

         <tr>

           <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

         </tr>

          <tr>

           <td class="main" valign

Link to comment
Share on other sites

Oh, I don't use several languages in my admin. All contributions are in english and it would be unnecessary to translate even the language files for the contributions.

 

There's no way to include swedish in admin/header_tags_english.php? (two languages simultaneously).

 

Or is it possible to have 2 x Page Control and Text Control in admins left column?

While in admin, click on the Administration link (upper left) and change the language to Swedish. Make the changes you require to be made for Header Tags and then switch back. If you don't have Swedish installed, it won't work for you anyway so there is no point in trying to cahnge the text.

 

You could possibly change the code to include the separate languages but it would not be an easy job.

 

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

I also need help with the error seen on my screenshots. Only seen in Explorer and Firefox, not in Safari. Something I've forgot? Since I use STS I have not modified application_top.php and all files in catalog.

 

Seen in all pages

 

Source code

You should re-read the installation instrucitons and try again.

 

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, I have decided to post my question here now instead of the SEO thread as I feel it is more relevant.

I have managed to delete the code from the fill_tags.php so that my categories are not automatically updated (although this is not fully tested yet).

I opened my categories.php in admin/ and found lots of entries for categories but no way of identifying which was which. I havent a clue if this is the right file.

I will apologise in advance for the following long code but here is my categories.php

I don't understand why you posted your categories file. The change you needed make was in the fill tags file.

 

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

You should re-read the installation instrucitons and try again.

 

Jack

 

Are there some parts of the installation I don't have to worry about when using STS? The code in application_top.php is for example already included in sts_display_output.php Or should I ask in the STS forum how HTC and STS work together.

Link to comment
Share on other sites

While in admin, click on the Administration link (upper left) and change the language to Swedish. Make the changes you require to be made for Header Tags and then switch back. If you don't have Swedish installed, it won't work for you anyway so there is no point in trying to cahnge the text.

 

You could possibly change the code to include the separate languages but it would not be an easy job.

 

Jack

 

But I suppose I can just change the header tags in swedish/header_tags.php and don't bother of using the admin at all? I believe fill_tags.php is the only feature I need after the store has gone live.

Edited by Fredrik.r
Link to comment
Share on other sites

Bug 1: When you delete meta content pages, it does not translate the code correctly in the process and resaves english/header_tags.php with a truncated start, and displays PHP code all over the pages.

 

Everything above "WebMakers.com" in the below header_tags.php file is deleted.

 

This is what is being deleted automatically:

 

<?php
// /catalog/includes/languages/english/header_tags.php
//

 

(catalog/includes/languages/english/header_tags.php error)

 

 

 

 

 

Bug 2: When creating a new meta-content page (in this case, for shipping.php), the page will not appear.

The correct code seems to be writing to catalog/includes/header_tags.php.

Here's the code it doesn't like:

 

// shipping.php
 case (strstr($_SERVER['PHP_SELF'],FILENAME_SHIPPING) or strstr($PHP_SELF, FILENAME_SHIPPING) ):
  $tags_array = tep_header_tag_page(HTTA_SHIPPING, HEAD_TITLE_TAG_SHIPPING,
                                    HTDA_SHIPPING, HEAD_DESC_TAG_SHIPPING,
                                    HTKA_SHIPPING, HEAD_KEY_TAG_SHIPPING );
  break;

 

If I take the above code out of catalog/includes/header_tags.php, the page will reapper, but of course, will only draw from the Default meta content.

 

 

 

Both of these files set to chmod 777.

 

If these fixes have been posted, please provide the link! Thanks.

Link to comment
Share on other sites

Are there some parts of the installation I don't have to worry about when using STS? The code in application_top.php is for example already included in sts_display_output.php Or should I ask in the STS forum how HTC and STS work together.

If you follow the install instructions, it works. It sounds like you didn't do that so now you don't know if it is because it is installed incorrectly or if there is some other problem. I've installed Header Tags in many shops using STS and it works fine.

 

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.

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