Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Addon} Modular SEO Header Tags


kymation

Recommended Posts

I need help, please. I'm a newbie at all this so please be patient with me.

 

I installed osCommerce version v2.3.1 2 days ago and just installed Modular SEO Header Tags 1.4.2. I went to login and this came up.

 

// Start Modular SEO header Tags define( 'MODULE_HEADER_TAGS_PRODUCT_TITLE_INSERT_TITLE', 'Products Head Title:' ); define( 'MODULE_HEADER_TAGS_PRODUCT_DESCRIPTION_INSERT_TITLE', 'Products Meta Description:' ); define( 'MODULE_HEADER_TAGS_EDIT_CATEGORIES_TITLE', 'Category Head Title:' ); define( 'MODULE_HEADER_TAGS_EDIT_CATEGORIES_DESCRIPTION', 'Category Meta Description:' ); // End Modular SEO header Tags ?>

Warning: Cannot modify header information - headers already sent by (output started at /home/pttam/public_html/admin/includes/languages/english.php:304) in /home/pttam/public_html/admin/includes/functions/general.php on line 34

 

What do I do to fix it?

 

I have added the YMM 2.3.1 Module too before the SEO Header Tags Module. I even compared the files and there is no difference between the new installation general.php and my current general.php.

 

Any ideas?

Link to comment
Share on other sites

You have two separate errors there. The first error is a language file named ht_product_title_insert.php. It belongs in includes/languages/english/modules/header_tags/ (that's on the catalog side.) It appears that you put that file somewhere other than the place it's supposed to be. That needs to be moved to the correct location or deleted and a new one uploaded.

 

The second error is complaining about admin/includes/languages/english.php on line 304. The normal file ends at line 299, so this would be something that you added. This Addon doesn't add anything to that file, so it some other Addon causing the problem. It's possible that it is your editor causing this problem by inserting characters after the ?> at the end of that file. Try deleting anything after the last ?> and see if that helps.

 

You may need to use a different editor to make this work. These files must be edited with a true text editor such as Notepad++. Don't try to use a word processor or an online editor.

 

Regards

Jim

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

Link to comment
Share on other sites

Hi,

 

i have a problem with "Category Meta Description - Insert " or " Category Title - Insert New " in admin

 

I put my data in box category meta description, it's ok but if i want edit after, the box is empty.

 

i have check database, and data is ok.

 

i have a problem only when i want edit.

 

it's a bug ?

 

any ideas ?

Link to comment
Share on other sites

Bug fix: In admin/includes/modules/header_tags/categories_insert.php, find $category_id and replace with $cInfo->categories_id (two places.)

 

Regards

Jim

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

Link to comment
Share on other sites

  • 4 weeks later...

Bug fix: In admin/includes/modules/header_tags/categories_insert.php, find $category_id and replace with $cInfo->categories_id (two places.)

 

Regards

Jim

 

 

THANK YOU !! I was looking for this fix, I read through the whole topic before posting and there it is!

 

Can you provide a screen shot of your header tags setup?, I want to make sure I clean mine up :)

Link to comment
Share on other sites

  • 4 weeks later...

Hi I have the Product Title-Insert New and Product Meta Description modules enabled. But when i input the title and look for the description on my view source i get nothing and the title isn't showing. I did edit the title previously in my template_top.php file where there was this:

 

<title><?= tep_output_string_protected($oscTemplate->getTitle()); ?></title>, and the changes did show up.

 

Would i need to edit this code in order for my title to appear?

Link to comment
Share on other sites

The code in template_top.php needs to be the stock osCommerce code for this to work. Yours has been modified, so you need to replace it with the stock code. You also need to add titles and descriptions in your Admin in order to have something show up.

 

Regards

Jim

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

Link to comment
Share on other sites

nice, thanks jim, i downloaded it. but i'm having the hardest time finding it anywhere--have looked in header, application-top, index.php..would you happen to know where it is? sorry, i'm a bit of a newbie to OS. Thanks!

Link to comment
Share on other sites

catalog/includes/application_top.php. Compare the stock copy to yours, or just replace yours with the stock copy.

 

Regards

Jim

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

Link to comment
Share on other sites

Look at that product in the products_description table of your database. Does that text appear in the head_title field?

 

Regards

Jim

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

Link to comment
Share on other sites

yep head_title and head_description are there. here's my template_top code..does this help?

<?php
/*
 $Id$

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com Insider

 Copyright (c) 2010 osCommerce

 Released under the GNU General Public License
*/

 $oscTemplate->buildBlocks();

 if (!$oscTemplate->hasBlocks('boxes_column_left')) {
   $oscTemplate->setGridContentWidth($oscTemplate->getGridContentWidth() + $oscTemplate->getGridColumnWidth());
 }

 if (!$oscTemplate->hasBlocks('boxes_column_right')) {
   $oscTemplate->setGridContentWidth($oscTemplate->getGridContentWidth() + $oscTemplate->getGridColumnWidth());
 }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?= HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" />


<title>Travel Deals in a Flash - <?php echo tep_output_string_protected($oscTemplate->getTitle()); ?></title>


<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>" />



<link rel="index" title="<?= (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER).DIR_WS_CATALOG; ?>" href="<?= (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER).DIR_WS_CATALOG; ?>" />
<link rel="shortcut icon" href="images/favicon.ico" />
<script type="text/javascript" src="ext/jquery/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="ext/jquery/ui/jquery-ui-1.8.6.min.js"></script>
<script type="text/javascript" src="ext/jquery/jquery.countdown.min.js"></script>
<? if ($request_type == 'NONSSL') { ?>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<? } ?>
<script type="text/javascript" src="ext/jquery/jquery.gomap-1.3.0.min.js"></script>
<script type="text/javascript" src="ext/jquery/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<script type="text/javascript" src="ext/jquery/fancybox/jquery.easing-1.3.pack.js"></script>
<script type="text/javascript" src="ext/jquery/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
<link rel="stylesheet" type="text/css" href="ext/jquery/fancybox/jquery.fancybox-1.3.4.css" />
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
<?= $oscTemplate->getBlocks('header_tags'); ?>
<?
if (!isset($lng) || (isset($lng) && !is_object($lng))) {include_once(DIR_WS_CLASSES . 'language.php');$lng = new language;}reset($lng->catalog_languages);while (list($key, $value) = each($lng->catalog_languages)) {
?>
<link rel="alternate" type="application/rss+xml" title="<?php echo STORE_NAME . ' - ' . BOX_INFORMATION_RSS; ?>" href="<?php echo FILENAME_RSS, '/language/'.$key.((isset($_GET['cPath']))?'/cPath/'.$_GET['cPath']:'').((isset($_GET['manufacturers_id']))?'/manufacturers_id/'.$_GET['manufacturers_id']:''); ?>">
<? } ?>
<script type="text/javascript">
 var _gaq = _gaq || [];
 _gaq.push(['_setAccount', 'UA-10171695-5']);
 _gaq.push(['_trackPageview']);
 (function() {
   var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
   ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
   var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
 })();
</script>
<meta name="google-site-verification" content="1xWryvOv88H2LQZYQ-t9WVyNeJ_0Na22yYNrw_HD6TU" />
</head>
<body>
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

Link to comment
Share on other sites

The module should show the title for any valid product. The text is in the database so it should show up. Do you have the Products Status: set to In Stock?

 

Regards

Jim

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

Link to comment
Share on other sites

I admit I'm puzzled. The module code is a fundamental part of osCommerce 2.3.1. It should just work. Sorry, I'm out of guesses.

 

Regards

Jim

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

Link to comment
Share on other sites

  • 3 weeks later...

Hi I installed your module and when I installed the "All Pages Title - String" mdoule I got the following error: Fatal error: Cannot redeclare class language in /home/content/26/7698926/html/catalog/includes/classes/language.php on line 16. If I set the status to false the error is not there. Any suggestions to fix this error?

Link to comment
Share on other sites

Read back through this thread. This has been reported by several people. I can't see the problem so I'm unable to come up with a permanent fix.

 

Regards

Jim

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

Link to comment
Share on other sites

Hi I was looking at the error which I got and noticed the following. Each module where you have to input some info gives the: "Fatal error: Cannot redeclare class language in /home/content/26/7698926/html/catalog/includes/classes/language.php on line 16" i.e. All Pages Title - String, Category Title, Front Page - Description, Front Page - Title, Front Page - Store Name in Title, Other Pages Title - String,Product Title - String modules. What I also noticed is that a particular module( I can't remember right now) had the following words in the description "Illyricum cunctamque Graeciam tueatur" which is latin. When I looked at my language.php file located in the classes directory I noticed It didn't have latin any where in the languages array. Could this be one of the problems which would cause the error because once the module installs it installs with the above description? I'm just throwing this out to see if this can lead to a solution.

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