Jump to content
Sign in to follow this  
Farrukh

[Contribution] Header Tags Controller for Admin MS 2.2

Recommended Posts

There is nothing on line 332 of the English.php. It only goes to line 331.

 

Line 29 of the general.php is in red.

 

 

////

// Redirect to another page or site

  function tep_redirect($url) {

    if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page

      if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url

        $url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL

      }

    }

 

    header('Location: ' . $url);

    tep_exit();

  }

 

Thanks so much for the help.


Confused worm farmer looking for assistance.

Share this post


Link to post
Share on other sites

check the end of application_top.php for the correct spelling of the header tags

 

it should be

 

// BOF: WebMakers.com Added: Header Tags Controller v1.0

require(DIR_WS_FUNCTIONS . 'header_tags.php');

// Clean out HTML comments from ALT tags etc.

require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

// Also used by: WebMakers.com Added: FREE-CALL FOR PRICE

// EOF: WebMakers.com Added: Header Tags Controller v1.0


Signs of desperation wishing, hoping, praying, crossing fingers, toes, arms, legs, crossing eye?s, now tied in knots and can?t see if it did work. Is there a chiropractor available.

Share this post


Link to post
Share on other sites

That appears to be right. I found my glitch to be in allprods so that is cured.

 

Now on to my next problem. When you try acquire product info from my site you receive the following error.

 

1054 - Unknown column 'pd.products_head_keywords_tag' in 'field list'

 

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 products p, products_description pd where p.products_id = '97' and pd.products_id = '97' and pd.language_id ='1'

 

[TEP STOP]

 

Any thoughts?


Confused worm farmer looking for assistance.

Share this post


Link to post
Share on other sites

ok I tried the using the two contribs dated just as you said. I am still having trouble. This is my fifth go. I can restore my backups, but then no body would be able to see the problem to help me, This is a live shop please nobody place an order unless you actually intend to purchase. My web site is at http://www.exumus.com

 

If you click on a product to view its detailed description you can see the error I am getting, I would be soooo greatful for any help offered.

 

Thank you so much

 

Jake Gaisser

Share this post


Link to post
Share on other sites

did you add the new fields to the database


Signs of desperation wishing, hoping, praying, crossing fingers, toes, arms, legs, crossing eye?s, now tied in knots and can?t see if it did work. Is there a chiropractor available.

Share this post


Link to post
Share on other sites

nope, and the contribs i have are : allprods, centershop, infobox header images, triangles.

 

I just cant seem to get this one to work, i'll leave my web site broken for a week, that should be plenty of time for others to ask my questions on the problem and possibly get it fixed for me and maybe some others, If its not fixed by then I will just have to wait untill the next release of this contribution whenever that might be.

Share this post


Link to post
Share on other sites

oh!! wait i read that wrong, so there are supposed to be changes to the database??

score, I can do that, im not sure what to do though, i have phpadmin on my server.

I noticed in the zip contrib there was a file: "headersql.sql"

 

also in the top of the readme file there was:

 

TABLE CHANGES:

Add the following new fields to products_description table. NOTE: The lengths can be anything you perfer to use.

products_head_title_tag varchar 80

products_head_desc_tag longtext 300

products_head_keywords_tag longtext 300

 

im not sure where this goes.

Share this post


Link to post
Share on other sites

I think this is the part many dont understand, I have done all the file changes on my web server but not the database changes, in my webservers control panel i have "phpMyAdmin 2.5.2" could anyone give me short instructions on how to do this

 

Jake Gaisser

Share this post


Link to post
Share on other sites
I think this is the part many dont understand, I have done all the file changes on my web server but not the database changes, in my webservers control panel i have "phpMyAdmin 2.5.2" could anyone give me short instructions on how to do this

 

Jake Gaisser

from phpmyadmin you see a tab SQL click on it and then you will see a text area to enter the sql queries copy and paste the following into the text area

 

ALTER TABLE products_description ADD products_head_title_tag VARCHAR(80) NULL;
ALTER TABLE products_description ADD products_head_desc_tag LONGTEXT NULL;
ALTER TABLE products_description ADD products_head_keywords_tag LONGTEXT NULL;


Signs of desperation wishing, hoping, praying, crossing fingers, toes, arms, legs, crossing eye?s, now tied in knots and can?t see if it did work. Is there a chiropractor available.

Share this post


Link to post
Share on other sites

I'm having a little trouble with the code for the Header Tag Admin. I may have a different version as I cannot not find much of the code mentioned in the read me file. My Admin/categories.php has a copyright year of 2002, but was installed in February of 2003.

 

Find the following (approx line 457)

 

 

 

    if (isset($HTTP_GET_VARS['pID']) && empty($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 = '" . (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);

 

 

Replace with the following

 

 

  if (isset ($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 = '" . (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);

 

The closest thing I can come up with is.

 

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

 

Is this what I need to alter?

 

Next

 

<?php

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

    if (tep_not_null($HTTP_POST_VARS)) {

      $pInfo = new 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'];

  } else {

      $product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id  from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . $HTTP_GET_VARS['pID'] . "'");

      $product = tep_db_fetch_array($product_query);

    }

 

What I find is

 

<?php
 } elseif ($HTTP_GET_VARS['action'] == 'new_product_preview') {
   if ($HTTP_POST_VARS) {
     $pInfo = new 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'];

 

 

Wihout the

} else {
     $product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id  from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . $HTTP_GET_VARS['pID'] . "'");
     $product = tep_db_fetch_array($product_query);
   }

 

What should I do? As usual all help is greatly appreciated!


Confused worm farmer looking for assistance.

Share this post


Link to post
Share on other sites

Ok I've muttled my way through a little farther. I've installed everything, but when I go to edit my product categories in admin I get the following erro.

 

Parse error: parse error in /home/jenkinsc/public_html/admin/categories.php on line 534

 

 

Line 534 is in red.

 

  
<?php
 [COLOR=red]} elseif ($HTTP_GET_VARS['action'] == 'new_product_preview') {[/COLOR]    if (tep_not_null($HTTP_POST_VARS)) {
     $pInfo = new objectInfo($HTTP_POST_VARS);
     $products_name = $HTTP_POST_VARS['products_name'];
     $products_description = $HTTP_POST_VARS['products_description'];
     $products_head_title_tag = $HTTP_POST_VARS['products_head_title_tag'];
     $products_head_desc_tag = $HTTP_POST_VARS['products_head_desc_tag'];
     $products_head_keywords_tag = $HTTP_POST_VARS['products_head_keywords_tag'];
     $products_url = $HTTP_POST_VARS['products_url'];
   } else {
     $product_query = tep_db_query("select p.products_id, pd.language_id, 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_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id  from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");
     $product = tep_db_fetch_array($product_query);

 

Any thoughts?


Confused worm farmer looking for assistance.

Share this post


Link to post
Share on other sites
I'm having a little trouble with the code for the Header Tag Admin. I may have a different version as I cannot not find much of the code mentioned in the read me file. My Admin/categories.php has a copyright year of 2002, but was installed in February of 2003.

the problem your haveing is your oscommerce version is 2.2 MS1 and the one your trying to install is for 2.2 MS2


Signs of desperation wishing, hoping, praying, crossing fingers, toes, arms, legs, crossing eye?s, now tied in knots and can?t see if it did work. Is there a chiropractor available.

Share this post


Link to post
Share on other sites

I have a question about how to search for the pages that need to be changed.

 

The instructions say to search on this string :

 

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

 

and find approx. 35 files that will need to be changed. I copied all of the php files from my /catalog directory onto my harddrive into a special folder and then went to the start button, find and chose find with text including and pasted the above into it and it came back finding no files. Can the built in find feature of windows do this or do I need to download a program (or search by hand).

 

Thanking you for your time in advance,

 

Melinda

Share this post


Link to post
Share on other sites
the problem your haveing is your oscommerce version is 2.2 MS1 and the one your trying to install is for 2.2 MS2

I must be trying to do the same thing. Is there an admin for 2.2 ms1? I've looked through the list of older contributions on the header tags contribution page but didn't see anything.

 

Thank you,

 

Melinda

Share this post


Link to post
Share on other sites

Hi again,

 

I still haven't completely got this running but it does appear to be changing the titles of the pages but I have a problem.

 

The title of all of my category pages now read The Webmakers Corner and then my category name. How do I get it to read the name of my site instead of The Webmakers Corner?

 

Thank you all again,

 

Melinda

Share this post


Link to post
Share on other sites

never mind, I found her instructions for changing the headerstag.php. sorry guys for the duh questions!

 

I still don't quite understand the response above, does that mean if you have ms1 you can't use the header tag admin? and if ms1 can't use the header tag admin, is the only thing I'll need to do after adding products is use phpmyadmin to set the title to the product name?

 

Thanks again and I will try searching some more on the forums to find an answer but I just don't seem to have any luck lately finding relavent searches. Even putting header tag controller in quotes didn't help me that much to get relavent responses!

 

Melinda

Share this post


Link to post
Share on other sites
never mind, I found her instructions for changing the headerstag.php. sorry guys for the duh questions!

 

I still don't quite understand the response above, does that mean if you have ms1 you can't use the header tag admin? and if ms1 can't use the header tag admin, is the only thing I'll need to do after adding products is use phpmyadmin to set the title to the product name?

 

Thanks again and I will try searching some more on the forums to find an answer but I just don't seem to have any luck lately finding relavent searches. Even putting header tag controller in quotes didn't help me that much to get relavent responses!

 

Melinda

if your using MS1 download the ones in the contribs for MS1 they are located here

 

http://www.oscommerce.com/community/contributions,207

 

which are further down the page

 

07/11/2002 - Header Tags Controller v1.0--------------->for catalog

then install the patch 07/14/2002 - Header Tags Controller v1.0 Patch 1-------------->for catalog

 

07/14/2002 - Header Tags Controller Admin v0.01

 

 

these are for only Ms1


Signs of desperation wishing, hoping, praying, crossing fingers, toes, arms, legs, crossing eye?s, now tied in knots and can?t see if it did work. Is there a chiropractor available.

Share this post


Link to post
Share on other sites

thank you asia!

 

But, this is the controller I installed:

 

09/05/2003 - Header Tags Controller v2.1

 

but everything appears to be working ok now that I have the right admin file (thanks again!). Should I redo and just install the other older one? I was about to install this:

 

09/25/2003 - Add Metta Tags to Product Pages

 

But now am unsure what I should do! If everything is working ok, should I just leave it?

 

Thanks so much for your time,

 

Melinda

Share this post


Link to post
Share on other sites

I also wanted to thank everyone who contributed and worked on this contribution. It was pretty easy to install (once I opened my eyes!) and I'm really excited and hoping it will help my search engine ranking. I really appreciate the time that went into this and the willingness to share it,

 

Mel-

Share this post


Link to post
Share on other sites

Hello all,

 

I am installing Header Tag Controler v2.1 into a MS2 release and wanted to know which of the files for this add on do I need to download to work in my configuration. Any help would be greatly appreciated.

 

Thank you,

Kevin :P


Kevin Rosenthal

Share this post


Link to post
Share on other sites

Hi I am new to this contribution and would like to try it out. I downloaded the following and not sure how to begin.

1. 09/25/2003 - Add Metta Tags to Product Pages

2. 09/25/2003 - Header Tags Admin MS 2.2

3. 09/05/2003 - Header Tags Controller v2.1

 

Do I need to install all the above contributions. Did I miss anything? What is the difference between Header tags admin and Header tags controller?

 

I am confused here. Can I anyone care to elaborate? Thanks. :D

Share this post


Link to post
Share on other sites

I believe these two are all you need:

 

09/25/2003 - Header Tags Admin MS 2.2

09/05/2003 - Header Tags Controller v2.1

 

THe Header Tags Controller 2.1 Tags are Iconsistant as noted in the description.

 

I recomend trying out the software below. I just used it to integrate my last mod and it worked great. (It definately helps if the tags are inconsistant)

 

MergeandCompare

 

Good Luck,

 

Adam

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

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

Create an account

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

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×