Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

Hi

 

Just installed on a clean install and I'm getting these errors when a category is selected -

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/idealmc/public_html/shop/includes/classes/seo.class.php on line 115

 

Warning: Cannot modify header information - headers already sent by (output started at /home/idealmc/public_html/shop/includes/classes/seo.class.php:115) in /home/idealmc/public_html/shop/includes/classes/seo.class.php on line 1992

 

Warning: Cannot modify header information - headers already sent by (output started at /home/idealmc/public_html/shop/includes/classes/seo.class.php:115) in /home/idealmc/public_html/shop/includes/classes/seo.class.php on line 1993

 

but its fine when on the "home" page.

I've been through the install twice now but can't spot my mistake - any clues?

 

thanks

See the link for that problem in my signature.

 

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

Sorry I dont completley understand your answer. Are you basically saying that these two contributions can't both be installed?
They can both be installed but, in the case of Header Tags, not fully work. The Categories Description contribution serves one purpose: to add text under the category page heading. Header Tags does that plus many other things. But for that one function, only one can work since they use the same code. If you have Categories Description installed and working, then you can install Header Tags but when it comes to making the changes to the index.php file, skip those changes (except for the change to the <head> section). It will be more work for you since you will need to turn off Categories Description in admin in order to edit the categories header tags but it will work fine that way. You will basically be using two contributions to do the job of one but the only way around that is to remove the Categories Description contribution.

 

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

No 'product name' field in admin.

 

I have just installed this contribution and when I go to 'add new product' there is no empty field for product name.

When trying to edit existing products there is no 'product name' as well and then when i click 'update' the product name that was named before installing this contribution dissapears.

What is the problem?

Regards

Artur

Link to comment
Share on other sites

No 'product name' field in admin.

 

I have just installed this contribution and when I go to 'add new product' there is no empty field for product name.

When trying to edit existing products there is no 'product name' as well and then when i click 'update' the product name that was named before installing this contribution dissapears.

What is the problem?

Regards

Artur

 

 

Made changes to admin/categories.php but the problem remains.

Link to comment
Share on other sites

Made changes to admin/categories.php but the problem remains.
The problem has to be in the admin/categories.php file since that is where all of that code is at. Try using the file included with the contribution to verify it works and then compare the two files.

 

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

Well I uninstalled the category descriptions contribution and then added the category description through the new admin>catalog feature that comes with the Header Tags contribution. This worked although the description was now displaying with spaces in the middle of words and then cutting off the end of the description. When I would go to edit the description (take out the spaces that had been made) and re-save it I was getting all sorts of bizare code suddenly displaying where the description should be. Each time I tried to remove the description and start from scratch more and more code was being added to the description and displaying. i have no idea why this was happening. Because there was now no way to remove the description I had to create a new category folder>move all the products to the new folder then just delete the old one. Do you think this is maybe happening because I also have the TinyMCE Editor 1.0 contribution installed?

 

So now I decided to keep the category description contribution and not touch the category descriptions through admin as they are causing some strange behaviours. What I have done is remove this piece of code from the index.php:

 

<td><h1><?php echo $category['categories_htc_title_tag']; ?></h1></td>

 

So I dont have the doubling up of the category title (as this was my initial problem). My question now is will doing this take away from the value of having the Header Tags contribution installed? The title of the file is still displaying correctly in the explorer window so Im presuming it is still serving. Also will the category descriptions that I have displaying still be readable by search engines and be beneficial? They are just html on the page so Im presuming they are just doing the same thing as if they were being generated from the admin instead of a seperate php file as they are now?

 

Cheers.

Link to comment
Share on other sites

I've been searching for a solution to this to no avail. I installed Header Tags and, after a few bumps, it was working fine. I am trying to install Ultimate SEO and now I have a problem with categories.php that I believe is related to Header Tags. Please note that I was using WinMerge to build the categories file and went over it multiple times.

 

I am getting this error:

 

Parse error: syntax error, unexpected '}' in /home/xx/osc/admin/categories.php on line 699.

 

I have looked over the code, compared the brackets to other code and cannot find the error. Here is the section:

 

<!-- HTC BOC //-->

<?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_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'];

$products_seo_url = $HTTP_POST_VARS['products_seo_url'];

} else {

$product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_seo_url, 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);

// HTC EOC

 

$pInfo = new objectInfo($product);

$products_image_name = $pInfo->products_image;

}

 

Please help...

 

Marcia

Link to comment
Share on other sites

So I dont have the doubling up of the category title (as this was my initial problem). My question now is will doing this take away from the value of having the Header Tags contribution installed? The title of the file is still displaying correctly in the explorer window so Im presuming it is still serving. Also will the category descriptions that I have displaying still be readable by search engines and be beneficial? They are just html on the page so Im presuming they are just doing the same thing as if they were being generated from the admin instead of a seperate php file as they are now?

 

As long as both contributions are working correctly, it will work fine that way. The benefit of having the extra text on the categories page is in having the text there. It doesn't matter which contribution adds it.

 

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

Great. Thanks. Just out of curiosity can you think of any reason as to why the category description feature through the Header Tags contribution doesnt seem to work correctly for me?

Link to comment
Share on other sites

My guess is that the Categories Description contribution was not compeletly removed. That option in Header Tags is pretty standard so there isn't any reason why it won't work, espeicially since the other one was working.

 

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

The problem has to be in the admin/categories.php file since that is where all of that code is at. Try using the file included with the contribution to verify it works and then compare the two files.

 

Jack

It is done now. Compared two files and could not see where the difference is. Realized that I did not change anything in that file installing other contributions so swaped the file with this from download files and working now.

Thanks for help.

 

Cheers

Artur

Link to comment
Share on other sites

I'm still having this problem, can anyone please help?

 

I've been searching for a solution to this to no avail. I installed Header Tags and, after a few bumps, it was working fine. I am trying to install Ultimate SEO and now I have a problem with categories.php that I believe is related to Header Tags. Please note that I was using WinMerge to build the categories file and went over it multiple times.

 

I am getting this error:

 

Parse error: syntax error, unexpected '}' in /home/xx/osc/admin/categories.php on line 699.

 

I have looked over the code, compared the brackets to other code and cannot find the error. Here is the section:

 

<!-- HTC BOC //-->

<?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_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'];

$products_seo_url = $HTTP_POST_VARS['products_seo_url'];

} else {

$product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_seo_url, 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);

// HTC EOC

 

$pInfo = new objectInfo($product);

$products_image_name = $pInfo->products_image;

}

 

Please help...

 

Marcia

Link to comment
Share on other sites

The line number for an error like that may not be correct. If you search the forums, or maybe it's in the Ultimate SEO thread, someone posted a categories file Header Tags and Ultimate SEO already installed. If you can't find that, then you need to go back through the installation since the problem is there. I suggest starting with the categories file included with Header Tags so that most of the work is done for you. You will need to add the Ultimate SEO code as well as any other changes you may have made for other contributions.

 

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

If anyone could help me with this I would appreciate it. I have everything working, but this is the only part that I am having trouble with and can't figure out how to combine this.

 

I have the Multi-Shops contribution running and it changes the manufactures page in the admin.

 

This is for this part of the install: admin/manufacturers.php

 

This is the code I have now:

$manufacturers_query_raw = "select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, m.date_added, m.last_modified from " . TABLE_MANUFACTURERS . " m " . ($admin_allowed_stores[0] == '*' ? " " : " LEFT JOIN " . TABLE_MANUFACTURERS_TO_STORES . " m2s ON m.manufacturers_id = m2s.manufacturers_id where m2s.stores_id in(" . implode(',' , $admin_allowed_stores) . ") ") . " order by m.manufacturers_name";

 

I have integrated the code for this contrib without problems until this part. I am not sure how to integrate this part into the above code:

$manufacturers_query_raw = "select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, m.date_added, m.last_modified, mi.manufacturers_htc_title_tag from " . TABLE_MANUFACTURERS . " m LEFT JOIN " .  TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id where mi.languages_id = '".$languages_id ."' order by m.manufacturers_name";

 

Thanks for any help.

Link to comment
Share on other sites

Hi Jack,

 

I'm in the process of rebuilding my site. I've installed HTC. I'm working on the All Products contrib.

 

Does the latest version of HTC 2.63 already have the code for All Prods or do I still need to add the code next to all other pages not defined as in step 6 of the All Prods install?

 

Thanks for your help.

Link to comment
Share on other sites

If anyone could help me with this I would appreciate it. I have everything working, but this is the only part that I am having trouble with and can't figure out how to combine this.

 

I have the Multi-Shops contribution running and it changes the manufactures page in the admin.

 

This is for this part of the install: admin/manufacturers.php

 

This is the code I have now:

$manufacturers_query_raw = "select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, m.date_added, m.last_modified from " . TABLE_MANUFACTURERS . " m " . ($admin_allowed_stores[0] == '*' ? " " : " LEFT JOIN " . TABLE_MANUFACTURERS_TO_STORES . " m2s ON m.manufacturers_id = m2s.manufacturers_id where m2s.stores_id in(" . implode(',' , $admin_allowed_stores) . ") ") . " order by m.manufacturers_name";

 

I have integrated the code for this contrib without problems until this part. I am not sure how to integrate this part into the above code:

$manufacturers_query_raw = "select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, m.date_added, m.last_modified, mi.manufacturers_htc_title_tag from " . TABLE_MANUFACTURERS . " m LEFT JOIN " .  TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id where mi.languages_id = '".$languages_id ."' order by m.manufacturers_name";

 

Thanks for any help.

You just need to change this
m.last_modified

to this

m.last_modified, mi.manufacturers_htc_title_tag

 

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

Hi Jack,

 

I'm in the process of rebuilding my site. I've installed HTC. I'm working on the All Products contrib.

 

Does the latest version of HTC 2.63 already have the code for All Prods or do I still need to add the code next to all other pages not defined as in step 6 of the All Prods install?

 

Thanks for your help.

It has the code in it.

 

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

You just need to change this
m.last_modified

to this

m.last_modified, mi.manufacturers_htc_title_tag

 

Jack

 

Thanks for responding so quick Jack.

 

That is what I did before and I get this error when I do that:

1109 - Unknown table 'mi' in field list

select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, m.date_added, m.last_modified, mi.manufacturers_htc_title_tag from manufacturers m order by m.manufacturers_name limit 0, 20

[TEP STOP]

 

Any other ideas?

Link to comment
Share on other sites

Thanks for responding so quick Jack.

 

That is what I did before and I get this error when I do that:

1109 - Unknown table 'mi' in field list

select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, m.date_added, m.last_modified, mi.manufacturers_htc_title_tag from manufacturers m order by m.manufacturers_name limit 0, 20

[TEP STOP]

 

Any other ideas?

I'm sorry. I didn't look close enough. Try the following. I can't test it since I don't have that contribution installed but I think it is rihgt.
$manufacturers_query_raw = "select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, m.date_added, m.last_modified, mi.manufacturers_htc_title_tag from " . TABLE_MANUFACTURERS . " m " . ($admin_allowed_stores[0] == '*' ? " " : " LEFT JOIN " . TABLE_MANUFACTURERS_TO_STORES . " m2s ON m.manufacturers_id = m2s.manufacturers_id LEFT JOIN " .  TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id where mi.languages_id = '".$languages_id ."' and m2s.stores_id in(" . implode(',' , $admin_allowed_stores) . ") ") . " order by m.manufacturers_name";

 

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'm sorry. I didn't look close enough. Try the following. I can't test it since I don't have that contribution installed but I think it is rihgt.
$manufacturers_query_raw = "select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, m.date_added, m.last_modified, mi.manufacturers_htc_title_tag from " . TABLE_MANUFACTURERS . " m " . ($admin_allowed_stores[0] == '*' ? " " : " LEFT JOIN " . TABLE_MANUFACTURERS_TO_STORES . " m2s ON m.manufacturers_id = m2s.manufacturers_id LEFT JOIN " .  TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id where mi.languages_id = '".$languages_id ."' and m2s.stores_id in(" . implode(',' , $admin_allowed_stores) . ") ") . " order by m.manufacturers_name";

 

Jack

 

That still gives me this:

1109 - Unknown table 'mi' in field list

select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, m.date_added, m.last_modified, mi.manufacturers_htc_title_tag from manufacturers m order by m.manufacturers_name limit 0, 20

[TEP STOP]

 

I don't know why it is saying an unknown table because it does exist and the rest of the code works that I integrated in, just not this part.

Link to comment
Share on other sites

It looks like the code is confused since it sees mi as a table so the code I provided is not correct somehow, but I can't see it. I would have to play around with it to see where the problem is but that is beyond the scope of help here. You might want to ask in the support thread for that contribution. Someone may have already merged them.

 

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

That still gives me this:

1109 - Unknown table 'mi' in field list

select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, m.date_added, m.last_modified, mi.manufacturers_htc_title_tag from manufacturers m order by m.manufacturers_name limit 0, 20

[TEP STOP]

 

I don't know why it is saying an unknown table because it does exist and the rest of the code works that I integrated in, just not this part.

 

i got it working

 

thanks for the help

 

 

i have a new problem now

 

if i update the manufacturers info and hit save it saves everything, but if a picture existed it deletes it

Edited by rizzy
Link to comment
Share on other sites

i got it working

 

thanks for the help

i have a new problem now

 

if i update the manufacturers info and hit save it saves everything, but if a picture existed it deletes it

 

I am getting an Error and a Fatal Error on line 111 on the Application Top page when opening the Admin window.

 

I remember something about it saying someting about clean html not existing.

 

I quickly changed persissions and then that did not wok so I reset them all back and uploaded the original application_top page.

 

Wud I do?

Link to comment
Share on other sites

i got it working

 

thanks for the help

i have a new problem now

 

if i update the manufacturers info and hit save it saves everything, but if a picture existed it deletes it

Try to use the included file. If the problem goes away, there is a mistake in your file and you will need to compare the two.

 

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