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 downloaded the version that was uploaded yesterday...

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

pleasee help!

Ahh, I see. The problem is mine. The database entries have been moved but I didn't change one part of the code that still uses the old entries. I will upload a new version shortly to fix this. But you can fix it by finding the following in includes/header_tags.php

    $the_category_query = tep_db_query("select cd.categories_name, c.category_head_title_tag, c.category_head_desc_tag, c.category_head_keywords_tag from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");

and changing it to

    $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 . "'");

And then replace each occurrence of category_head with categories_htc.

 

Jack

Support Links:

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

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • Replies 4.6k
  • Created
  • Last Reply

Top Posters In This Topic

Ahh, I see. The problem is mine. The database entries have been moved but I didn't change one part of the code that still uses the old entries. I will upload a new version shortly to fix this.  But you can fix it by finding the following in includes/header_tags.php

    $the_category_query = tep_db_query("select cd.categories_name, c.category_head_title_tag, c.category_head_desc_tag, c.category_head_keywords_tag from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");

and changing it to

    $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 . "'");

And then replace each occurrence of category_head with categories_htc.

 

Jack

 

 

it didnt work.....

 

i changed alll references as stated in the header_tags file but no difference

 

i now get

 

the error

 

1054 - Unknown column 'c.categories_htc_title_tag' in 'field list'

 

select cd.categories_name, c.categories_htc_title_tag, c.categories_htc_desc_tag, c.categories_htc_keywords_tag from categories c, categories_description cd where c.categories_id = '0' and cd.categories_id = '0' and cd.language_id = '1'

 

indicaz

Edited by indicaz
Link to comment
Share on other sites

Then you need to search your installation for reference to that code. I've checked mine and that is the only place it is used that I can see.

 

Jack

Support Links:

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

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

ok that problem is fixed.....

 

 

but now i get a new error when i go to my categories pages

 

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /customers/adweb322361/ftp/www.mrdeliveryman.com/public_html/catalog/includes/functions/database.php on line 99

 

 

why all these bugs???

 

thanks

erick

Link to comment
Share on other sites

When you edited the header_tags file you may have made a mistake that is causing it I suppose. You may want to download the new version and compare the changes in that file with yours.

 

Jack

Support Links:

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

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

i used winmerge to compare both header files and checked the differences..

 

 

i then uploaded the new header_tag file ....

 

 

i also re installed the contribution from scratch...

 

before i did all this i reverted to a backed up version of my site with no errors....

 

once the contrib was re installed I re encounter the same MYSQL fetch error on line 99

 

something with the contrib is obviously interfering with the shop.....

 

 

i guess i have to remove it and revert to my backup of my site until this issue is fixed.

 

 

i hope we can work this out

 

thanks

erick

Link to comment
Share on other sites

Here's what I'm getting when trying to view /admin/categories.php

 

1054 - Unknown column 'c.category_head_title_tag' in 'field list'

 

select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified, c.categories_status, c.category_head_title_tag, c.category_head_desc_tag, c.category_head_keywords_tag, c.category_head_description from categories c, categories_description cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id = '1' order by c.sort_order, cd.categories_name

 

I have a bunch of mods installed that change the file, but it worked perfectly fine with 2.5.2

Link to comment
Share on other sites

Here's what I'm getting when trying to view /admin/categories.php

 

1054 - Unknown column 'c.category_head_title_tag' in 'field list'

 

select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified, c.categories_status, c.category_head_title_tag, c.category_head_desc_tag, c.category_head_keywords_tag, c.category_head_description from categories c, categories_description cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id = '1' order by c.sort_order, cd.categories_name

 

I have a bunch of mods installed that change the file, but it worked perfectly fine with 2.5.2

Search your files for c.category_head. That is no longer a valid reference and if you find it anywhere it needs to be replaced. I've explained how in a previous posting.

 

Jack

Support Links:

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

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

i have installed this but for some reason my keywords are coming without any commas which file do i need to look at and replace?

 

thanks

The file to edit is english/header_tags.php. Depending on your version, you may be able to edit this in admin->Header Tags.

 

Jack

Support Links:

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

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I had one of the first versions installed of this contributions, and it seemed to work ok, but when the buyer made a choice, let's say, a shirt size, it didn't show on my administration side. All I'd see was ":_ " under the item, where the size was supposed to be.

 

So I got my husband to look at it and install the newer version instead. Well, it still doesn't work (same thing happening), and now when I click on "Contents" from the Admininstration it gives me this:

 

 

Parse error: parse error, unexpected T_CASE in /home/airuma/public_html/admin/categories.php on line 324

 

 

We checked the categories.php file around the area where line 324 against the original OSCommerce file, and it is the same. It didn't get modified by the contribution (at least not on that spot) so I am thinking the problem is really somewhere else.

 

Any idea what might be causing all these?

 

Thanks for the input!

Link to comment
Share on other sites

I had one of the first versions installed of this contributions, and it seemed to work ok, but when the buyer made a choice, let's say, a shirt size, it didn't show on my administration side. All I'd see was ":_ " under the item, where the size was supposed to be.

 

So I got my husband to look at it and install the newer version instead. Well, it still doesn't work (same thing happening), and now when I click on "Contents" from the Admininstration it gives me this:

Parse error: parse error, unexpected T_CASE in /home/airuma/public_html/admin/categories.php on line 324

We checked the categories.php file around the area where line 324 against the original OSCommerce file, and it is the same. It didn't get modified by the contribution (at least not on that spot) so I am thinking the problem is really somewhere else.

 

Any idea what might be causing all these?

 

Thanks for the input!

Your first problem doesn't sound related to Header Tags although I suppose something in the categories file was removed by mistake. The second problem may be caused by the english/categories.php file being included so you should look at that one. You could try replacing the categories.php file with the one from the contribution just to see if all of your problems go away.

 

Jack

Support Links:

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

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Ok first problem solved but I still can't get the second one.

That's an oversight in the code. You can fix it in three ways:

1 - In admin->Header Tags->Text Control, change the default title to begin with " - " (no quotes).

2 - Find this code in incldues/header_tags.php

     $tags_array['title']= clean_html_comments($the_product_info['products_head_title_tag']) . HEAD_TITLE_TAG_ALL;

and change to

     $tags_array['title']= clean_html_comments($the_product_info['products_head_title_tag']) . ' ' . HEAD_TITLE_TAG_ALL;

3 - Set the HTTA option in admin->Header Tags->Text Control for the product_info section to off. This is really the best option regardless since the title doesn't help with the SE's in most cases.

 

I'll add the changed code to the next version but not upload it until somethng more has changed.

 

Jack

Support Links:

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

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Neither, or maybe both.  All that indicates is that the problem is related to the admin section.  It could be because the files in the catalog section are not write enabled. Try setting the permissions to 777 and trying it again. If it still fails, it could be that your host won't allow such writing to files. Although I would think you would get a warning message if that were the case. Is your admin directory located in the same place as your includes directory? If not, the code in the admin/header_tags files has to be edited to account for the different location.

 

Jack

 

This is regarding an issue that has cropped up a couple of times regarding the 'osCommerce : What'''s New Here? - Hardware Software DVD Movies' not updating thru the Admin:

 

Do you think that is issue is related to the admin directory being password protected? I know that doesn't sound right b/c the files that are updated are in the catalog dir???

 

I am having the same issue. The files are 777 and there is no error. The REALLY weird thing...now that I think of it...is that the "Default Title" updated correctly BUT the "Default Descriptions" and "Default Keywords" did NOT update. Hope this helps!

 

Regards,

Siddall

Link to comment
Share on other sites

No, it shouldn't have anything to do with admin being protected. It works fine on my site. Do you have the latest version installed? There were some changes made in that area as I recall so maybe it has been fixed.

 

Jack

Support Links:

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

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I downloaded v2.5.2 and the instructions say to upload database_setup.php to the same directory as index.php then direct your browser there. Well, I would but there is no database_setup.php to copy over. I unzipped twice just to be sure. There is a folder named database_setup.php but it is empty.

 

Actually, as I look through the folders, there seems to be quite a few "files" that showed up as folders. Any idea what happened?

 

Lori

Link to comment
Share on other sites

No, it shouldn't have anything to do with admin being protected. It works fine on my site. Do you have the latest version installed? There were some changes made in that area as I recall so maybe it has been fixed.

 

Jack

 

I have v2.5.3 installed.

 

Not a big deal...just update it manually. It is just weird that the "Default Title" updated correctly BUT the "Default Descriptions" and "Default Keywords" (just below it) did NOT update. No big whoop!

 

Regards,

Siddall

Link to comment
Share on other sites

I downloaded v2.5.2 and the instructions say to upload database_setup.php to the same directory as index.php then direct your browser there.  Well, I would but there is no database_setup.php to copy over.  I unzipped twice just to be sure.  There is a folder named database_setup.php but it is empty.

 

Actually, as I look through the folders, there seems to be quite a few "files" that showed up as folders.  Any idea what happened?

 

Lori

Try downloading it again. I just did and everything is where it should be.

 

Jack

Support Links:

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

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

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