Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header Tag Controller and Admin


gordanab

Recommended Posts

Hi, a quick question- how do I know I installed the Header Tag Controller and Admin correctly? What a I looking for?

 

I went through all of the steps in the instructions for both contributions and my site seems to be working fine even on checkout but I can't tell if I installed these mods right. I don't notice anything different in my admin - unless I overlooked something before I installed these mods.

 

Thanks in advance for your help.

 

G:)

Link to comment
Share on other sites

In Admin, in the product creation page, you should see new text boxes to enter the header tages, header description, and header keywords for each product.

 

In the Cataglog, in the header_tags.php or whatever it is called, you have to define these threee things for any page that you wish to have a unique header for.

 

You can flip through my website if you will. Pay particular attention to the Title bar at the very top as you go through some of the pages, and you will see how it works.

 

Keep in mind that this is a live store, please don't test any orders.

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

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

Thank you!! I finally found the time to sit down and figure out what I was doing wrong with the Header Controller. Luckily it was just two very tiny }and else ifs that were giving me parse errors but once i fixed them now I can see that it's definately working.

 

You have a great site BTW. Do you find it's harder to do mods after you've put all of your products into the database? I've been trying to get all of my mods done before I really build the site but it's taking so long I'm thinking I might just need to take the plunge before all of my extra features are installed.

 

Thanks for your help.

 

G:)

Link to comment
Share on other sites

  • 3 weeks later...

I installed Header Tag Controller Admin and I had two parse error as well. I made some changes to the code and I am wondering if I was doing it right:

 

In Header Tag Controller Admin, it says:

 

In admin/categories.php

 

Find the following (approx line 568)

 

} elseif ($HTTP_GET_VARS['action'] == 'new_product') {

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

$product_query = tep_db_query("select pd.products_name, pd.products_description, 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 = '" . $HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "'");

$product = tep_db_fetch_array($product_query);

 

 

Replace with the following

 

 

} elseif ($HTTP_GET_VARS['action'] == 'new_product') {

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

$product_query = tep_db_query("select 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 = '" . $HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "'");

$product = tep_db_fetch_array($product_query);

 

 

But I could not find

 

 

} elseif ($HTTP_GET_VARS['action'] == 'new_product') {

 

 

in my admin/categories.php

 

 

but I only found:

 

 

if ($HTTP_GET_VARS['action'] == 'new_product') {

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

$product_query = tep_db_query("select pd.products_name, pd.products_description, 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 = '" . $HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "'");

$product = tep_db_fetch_array($product_query);

 

 

so I replaced that with:

 

 

if ($HTTP_GET_VARS['action'] == 'new_product') {

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

$product_query = tep_db_query("select 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 = '" . $HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "'");

$product = tep_db_fetch_array($product_query);

 

 

May I ask if I was doing this right?

Best regards,

 

Elmo

Link to comment
Share on other sites

  • 2 weeks later...

Sure enough, I had entered the code incorrectly

Now, how can I set the switch so it only shows the default tags when there are NO entries in the tables??

Right now, I'm showing the default as well as the entries in the tags.

Funny though, on the "title tag" its printing the manual entry at the end of the default tags as opposed to the other two tags, which are in the begining of the default tags! Is that confusing or what??:rolleyes:

SS:20030317

Link to comment
Share on other sites

Thanks for the info on where to find the Admin download. Linda also gave me a pointer. :D

 

Question: I've got everything installed and it appears to be working. In adding a new product, the languages break their "categories" when it comes to the input text boxes. For example: Instead of English, Dutch, and Spanish be listed for product description, page title, page description, keywords - now only English text boxes are listed and then the following languages list 4 text boxes without those labels (descr, title, descr, keywords).

 

Example:

Prod Description

english

 

Page Title

english

 

Page Description

english

 

Title

english

 

Keywords

english

 

dutch

dutch

dutch

dutch

 

spanish

spanish

spanish

spanish

 

Is that how the contribution should display or should it be like the original:

 

Prod Description

eng

span

dutch

 

Page Title

eng

span

dutch

 

etc..... ?

 

-shaun

Link to comment
Share on other sites

This is what I have to draw the fields in my categories.php file:

          <tr>

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

         </tr>

<tr>

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

   <tr><td><table>

         <tr>

           <td colspan="2" class="main" align="center">META TAG SETTINGS</td>

         </tr>



<?php

// WebMakers.com Added: Header Tags

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

?>

         <tr>

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

         </tr>

         <tr>

           <td class="main" valign="top"><?php 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_input_field('products_head_title_tag[' . $languages[$i]['id'] . ']', (($products_head_title_tag[$languages[$i]['id']]) ? stripslashes($products_head_title_tag[$languages[$i]['id']]) : tep_get_products_head_title_tag($pInfo->products_id, $languages[$i]['id'])),'size="72" maxlength="64"'); ?></td>

             </tr>

           </table></td>

         </tr>

         <tr>

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

         </tr>

          <tr>

           <td class="main" valign="top"><?php echo TEXT_PRODUCTS_HEADER_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_head_desc_tag[' . $languages[$i]['id'] . ']', 'soft', '70', '4', (($products_head_desc_tag[$languages[$i]['id']]) ? stripslashes($products_head_desc_tag[$languages[$i]['id']]) : tep_get_products_head_desc_tag($pInfo->products_id, $languages[$i]['id']))); ?></td>

             </tr>

           </table></td>

         </tr>

         <tr>

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

         </tr>

          <tr>

           <td class="main" valign="top"><?php echo TEXT_PRODUCTS_KEYWORDS; ?></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_keywords_tag[' . $languages[$i]['id'] . ']', 'soft', '70', '6', (($products_head_keywords_tag[$languages[$i]['id']]) ? stripslashes($products_head_keywords_tag[$languages[$i]['id']]) : tep_get_products_head_keywords_tag($pInfo->products_id, $languages[$i]['id']))); ?></td>

             </tr>

           </table></td>

         </tr>



<?php

   }

?>

   </table></td></tr>

 </table></td>

</tr>

 

You may need to adjust this some, but I have it located after the FOR loop for the products_description field.

Link to comment
Share on other sites

Thanks, Linda! Going to check it out.

 

One other thing I'm chasing down is that any page using the default tags also has the variable names printed. For instance, my actual custom title will be printed in the browser's top bar but then it's followed by HEAD_TITLE_TAG_DEFAULT Likewise for the description and keywords within the source code. This only happens for the default. The custom tags for other pages do not have this happening.

 

Pointers?

 

Thanks again for the code sample above - going to check mine.

 

-shaun

Link to comment
Share on other sites

Sounds like you do not have the language files loading.

 

Re-check your installation and make sure all of the includes were added and you uploaded the changes to your site.

Link to comment
Share on other sites

Linda: Well... I've stared at it :shock: and can't seem to find where things are going wrong in the listing of the languages during new product entry. I plugged in the code just as directed and from what I see... it's very similar to your sample. For some reason, mine's listing the text boxes "by language" and not "by cateogory" (i.e. description, title, keywords).

 

Here is the code I've got (little on the top to give reference of position).

 

            <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; $i<sizeof($languages); $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'] . ']', (($products_name[$languages[$i]['id']]) ? stripslashes($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>

<?php

   for ($i=0; $i<sizeof($languages); $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', (($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td>

             </tr>

           </table></td>

         </tr>

        

        

         <tr>

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

         </tr>          

         <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', (($products_head_title_tag[$languages[$i]['id']]) ? stripslashes($products_head_title_tag[$languages[$i]['id']]) : tep_get_products_head_title_tag($pInfo->products_id, $languages[$i]['id']))); ?></td>

             </tr>

           </table></td>

         </tr>

         <tr>

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

         </tr>          

          <tr>

           <td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_HEADER_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_head_desc_tag[' . $languages[$i]['id'] . ']', 'soft', '70', '5', (($products_head_desc_tag[$languages[$i]['id']]) ? stripslashes($products_head_desc_tag[$languages[$i]['id']]) : tep_get_products_head_desc_tag($pInfo->products_id, $languages[$i]['id']))); ?></td>

             </tr>

           </table></td>

         </tr>

         <tr>

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

         </tr>          

          <tr>

           <td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_KEYWORDS; ?></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_keywords_tag[' . $languages[$i]['id'] . ']', 'soft', '70', '5', (($products_head_keywords_tag[$languages[$i]['id']]) ? stripslashes($products_head_keywords_tag[$languages[$i]['id']]) : tep_get_products_head_keywords_tag($pInfo->products_id, $languages[$i]['id']))); ?></td>

             </tr>

           </table></td>

         </tr>

         

         

<?php

   }

?>

 

 

Anything jump out as being wrong? Thanks for the great support!

Link to comment
Share on other sites

Got it fixed. :D I inserted:

 

<?php

   }

?>

  <?php

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

?>

 

between each section (description, title, keywords) in order to make it run through every language before moving on to the next section. Before, it was running through each section "per language" so it would echo all my english boxes, then echo all my spanish boxes, then echo all my dutch boxes.

 

Now, all the language boxes are displayed in their proper sections.

 

Not sure why it didn't originally, but this fixed it in my case. :D

 

-shaun

Link to comment
Share on other sites

  • 3 weeks later...
Yes it's a separate contribute.  

It's called Header Tag Controller Admin.  

Should be fairly close to where the other one is!

I have looked through all the contributions for this title, or anything like it and I swear I can't find it. I'm serious, please check before you think I am just not looking closely enough :wink:. Was it taken down? Does anyone else have a link to it I can use? Thanks!

 

David

Link to comment
Share on other sites

Hey David -

 

You know that "am I going crazy" feeling you're having? That was ME when I tried finding it.

 

The catch: It's not on a separate page... but rather on the SAME page as the Header Tags Controller download. Look in the yellow boxes... 2 down from the most current (at this time) version of the Header Tags Controller.

 

You'll see this:

 

07/14/2002 - Header Tags Controller Admin v0.01 Author: Richard Fielder

Adds Admin Control to Linda McGarth's Header Tag Controller contribution.

 

That's what you're seeking... if I understand your post correctly. Yes sir... I searched and searched just as you did. :roll:

 

-shaun

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