Jump to content
kymation

[Addon} Modular SEO Header Tags

Recommended Posts

I did find that file and have a read of it and its saying this is the line of coding that is causing the error in the includes/modules/header_tags/ht_all_pages_title_string.php on line 13, below is line 13

 

class ht_all_pages_title_string {

 

Still not sure how to fix it to be honest

Edited by ianhaney

Share this post


Link to post
Share on other sites

That line exists only in that file, and only once in that file. The error message you are getting says that osCommerce found that line twice, which means you have uploaded that file to two different places. Find the second one and remove it.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

I can't find it though, I have just done it again, I removed all the files from the update off the web server and uploaded them again in the right folders, would you be able to connect to my computer and have a look please

Share this post


Link to post
Share on other sites

I have just double checked and all files are in the right places, I got a different file now saying the same error

 

Fatal error: Cannot redeclare class ht_category_title_insert in /customers/d/a/8/worldofcosmetics.co.uk/httpd.www/includes/modules/header_tags/ht_category_title_insert.php on line 13

Edited by ianhaney

Share this post


Link to post
Share on other sites

Sorry last tiny problem, I just noticed the following

 

<title>Contact UsMODULE_HEADER_TAGS_OTHER_PAGES_TITLE_STRING_SEPERATORWorld of Cosmetics</title

 

Any ideas why the MODULE_HEADER_TAGS_OTHER_PAGES_TITLE_STRING_SEPERATOR appears

Edited by ianhaney

Share this post


Link to post
Share on other sites

That constant is used in includes/modules/header_tags/ht_other_pages_title_string.php. Remove the file if you are not using that module. If you are using it, go into your Admin and uninstall and reinstall it.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hi Jim

 

Worked perfect when I removed the module and installed it again

 

Sorry last one, I noticed if I go the password_forgotten.php page or advanced_search.php page it don't come up with the page name, it just comes up with the store name World of Cosmetics, do you know how I would get the page name to display for them pages for example Password Forgotten - World of Cosmetics

 

Sorry to be a pain

 

Ian

Share this post


Link to post
Share on other sites

Those pages don't have the Title defined for the module to use. There's a note in the instructions about fixing that.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

What page in the instructions is the note about fixing it as could not see anything in the trouble shooting section

Share this post


Link to post
Share on other sites

I looked through this support forum as well for the fix but couldn't see anything, could you let me know how to fix it please Jim

Share this post


Link to post
Share on other sites

The module depends on either NAVBAR_TITLE or $title being defined. For pages that do not have either one defined, the easiest way is to add a define for NAVBAR_TITLE to your language file. Like this:

 

define( 'NAVBAR_TITLE', 'Title goes here' );

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Thank you so much for the answer so I need to add define( 'NAVBAR_TITLE', 'Title goes here' ); to the english.php file in the languages folder, that right?

 

Sorry just confirming

Edited by ianhaney

Share this post


Link to post
Share on other sites

If you want that title to appear on every single page of your site, then yes. Otherwise I would suggest the language page for whatever page you want the title to show on.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hello,

thanks fo the add, it work perfectly.

But now I'd like to add MANUFACTURER META DESCRIPTION - INSERT which file i need to try to modify to create this?

I think to start to create a new file beginning from CATEGORY DESCRIPTION INSERT , I need to modify only this or other files?

 

Thanks

Marco

Share this post


Link to post
Share on other sites

That would be a good start, but you have more work to do. You need to add a field to the manufacturers_info database table to hold the information. You need to add code to the admin manufacturer's page to add the description text. Then of course you need to modify your new module to retrieve this information.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hello Jim,

I add a field HEAD_TITLE in TABLE_MANUFACTURERS_INFO, I create manufacturers_process.php and manufacturers_insert.php I can insert new manufacturer with title and display in my ecommerce, All works well except for case "Edit" I can't display and change the field head_title, I think the problem is in manufacturers_insert.php

This is the code where i think there's the problem, can you help me? For you is correct or there's something wrong??

 

Thanks in advance for your help

 

switch ($action) {

case 'edit':

 

if( $head_title_field == true ) {

$head_title = array();

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

$languages_id = ( int )$languages[$i]['id'];

$manufacturers_title_query_raw = "

select

head_title

from

" . TABLE_MANUFACTURERS_INFO . "

where

manufacturers_id = '" . ( int )$cInfo->manufacturers_id . "'

and languages_id = '" . $languages_id . "'

";

// print 'manufacturers Title Query: ' . $manufacturers_title_query_raw;

$manufacturers_title_query = tep_db_query( $manufacturers_title_query_raw );

$manufacturers_title = tep_db_fetch_array( $manufacturers_title_query );

 

$head_title[$languages_id] = $manufacturers_title['head_title'];

}

}

Share this post


Link to post
Share on other sites

I don't see anything wrong there. Some things to check:

 

1. Where is $head_title_field set? Is it being set to true?

 

2. Does the $cInfo array contain the manufacturers_id? What is it being set to?

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hello, this is the code of my manufaturers_process.php. I can save the information in NEW manufacturers but I Can't save the information of Head_title in Database, when in Edit manufacturers

Can you help me?? My php is not too good

 

Thanks in advance

 

// Input titles and meta descriptions from the MANUFACTURERS sidebar

switch( $action ) {

case 'insert' :

case 'save' :

if ($manufacturers_field_exists == true) {

if (isset ($_POST['manufacturers_id']))

$manufacturers_id = tep_db_prepare_input($_POST['manufacturers_id']);

 

if (isset ($_POST['head_title']) || isset ($_POST['head_description']) || isset ($_POST['head_keywords'])) {

if ($action == 'insert') {

$sql_data_array = array (

'manufacturers_id' => $manufacturers_id,

'date_added' => 'now()'

// 'languages_id' => $language_id

 

);

 

tep_db_perform(TABLE_MANUFACTURERS, $sql_data_array);

$manufacturers_id = tep_db_insert_id();

}

 

$languages = tep_get_languages();

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

$language_id = ( int ) $languages[$i]['id'];

 

$sql_data_array = array ();

if (isset ($_POST['head_title'])) {

$sql_data_array['head_title'] = tep_db_prepare_input($_POST['head_title'][$language_id]);

}

 

if (isset ($_POST['head_description'])) {

$sql_data_array['head_description'] = tep_db_prepare_input($_POST['head_description'][$language_id]);

}

 

if (isset ($_POST['head_keywords'])) {

$sql_data_array['head_keywords'] = tep_db_prepare_input($_POST['head_keywords'][$language_id]);

}

 

if ($action == 'insert') {

$insert_sql_data = array (

'manufacturers_id' => $manufacturers_id,

'languages_id' => $language_id

);

 

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

 

tep_db_perform(TABLE_MANUFACTURERS_INFO, $sql_data_array);

 

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

tep_db_perform(TABLE_MANUFACTURERS_INFO, $sql_data_array, 'update', "manufacturers_id = '" . (int) $manufacturers_id . "' and languages_id = '" . $language_id . "'"); //mprocess

 

 

}

} // for ($i=0

 

$action = 'save';

} // if( isset( $_POST

} // if ($manufacturers_field_exists

break;

 

case 'move' :

// Nothing to do; the code just renumbers the row

break;

 

case 'delete' :

// Nothing to do; the row is deleted.

break;

 

} // switch( $action )

Share this post


Link to post
Share on other sites

This is wrong:

 

 } elseif ($action == 'save') {
tep_db_perform(TABLE_MANUFACTURERS_INFO, $sql_data_array, 'update', "manufacturers_id = '" . (int) $manufacturers_id . "' and languages_id = '" . $language_id . "'"); //mprocess
}

 

There's a block of code missing that defines $sql_data_array and steps through the languages, not to mention the whole section that updates TABLE_MANUFACTURERS.

 

You're going to have to debug this yourself. I can't do much by looking at the code here.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

@@kymation

 

Hi Jim,

 

as I visit server logs often find apple-touch-icon-precomposed.png and apple-touch-icon.png file not find. These header tags would be nice to get less robot stress for websites.

 

If somebody would like it could do a very basic header tag module for it.

 

<LINK REL="apple-touch-icon" HREF="/apple-touch-icon.png" />
<LINK REL="apple-touch-icon-precomposed" HREF="/apple-touch-icon.png" />

 

By this way our sites wont be apple compatible, but pressing a change. :)

 

http://blog.karlribas.com/2012/05/how-to-create-apple-touch-icon-for-your.html

 

 

Regards

Gergely

Edited by Gergely

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Share this post


Link to post
Share on other sites

Apple sure likes to do things different from everyone else. Yes, a module would be a good idea. A module would be welcome. Feel free to add one to the existing collection on Modular SEO Header Tags or upload your own separate addon.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

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

×