Latest News: (loading..)
kymation

[Addon} Modular SEO Header Tags

473 posts in this topic

Im having a weird issue with this contib.

 

If i Install, lets say module "Front Page - Description" it wont load the checkout process ?

Share this post


Link to post
Share on other sites

Not enough information. Exactly what happens when you check out, and on what page? What errors do you get?

 

Regards

Jim

Share this post


Link to post
Share on other sites

Sorry.

 

On the Checkout_shipping.php. and i dont get an error message. it just doesnt load the page (other than the background, and the store logo)

Share this post


Link to post
Share on other sites

The front page modules are all coded to execute on the front page only, so it's hard to see how they might interfere with another page.

 

Failure to load the page is probably due to an error. I need to know what the error is to figure this out. In application_top.php, change your error reporting to

 

// set the level of error reporting
 error_reporting(E_ALL);

and see what errors are displayed. You may need to look at the page source, as your browser may be hiding the error message.

 

Regards

Jim

Share this post


Link to post
Share on other sites

this is what i get when i say "show source"

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="LTR" lang="en">
<head>
<link rel="icon"
  type="image/jpg"
  href="http://fatima.dk/images/icon.jpg">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Fatima</title>
<base href="http://fatima.dk/shopp/catalog/" />
<link rel="stylesheet" type="text/css" href="ext/jquery/ui/redmond/jquery-ui-1.8.6.css" />
<script type="text/javascript" src="ext/jquery/jquery-1.4.2.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/bxGallery/jquery.bxGallery.1.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="ext/jquery/fancybox/jquery.fancybox-1.3.4.css" />
<script type="text/javascript" src="ext/jquery/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<link rel="stylesheet" type="text/css" href="ext/960gs/960_24_col.css" />

<link rel="stylesheet" type="text/css" href="stylesheet.css" />

<script type="text/javascript">
 var _gaq = _gaq || [];
 _gaq.push(['_setAccount', 'UA-23015164-1']);
 _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>
</head>
<body>
<link rel="stylesheet" media="only screen and (max-device-width: 1024px)" href="ipad.css" type="text/css" />
<div id="bodyWrapper" class="container_24">
<div class="fixcenter">
<div id="header" class="grid_24">
 <div id="storeLogo"><a href="http://fatima.dk/shopp/catalog/index.php"><img src="images/store_logo.png" alt="Fatima" title=" Fatima " width="960" height="137" /></a></div>
<div id="headerShortcuts">
<td>

 

no error .__.

Share this post


Link to post
Share on other sites

The error is in the includes/header.php, right where you display the header shortcut buttons. You have some non-standard code in there, so that's where I would start.

 

I doubt that the header tag modules are the root cause of this, as they would be inserted before the </head> tag. This could be some interaction between the header tags and your custom heading code, whatever that is.

 

Regards

Jim

Share this post


Link to post
Share on other sites

You are correct sir, it loads with the original Header.php

 

thank you, let the modification begin! :)

Share this post


Link to post
Share on other sites

hmmm, back again.

 

Its becouse of this code:

 

<div id="headerShortcuts">
<td>
<?php
 if (!is_object($lng)) {
   include(DIR_WS_CLASSES . 'language.php');
   $lng = new language;
 }
 if (getenv('HTTPS') == 'on') $connection = 'SSL';
 else $connection = 'NONSSL';
 $languages_string = '';
 reset($lng->catalog_languages);
 while (list($key, $value) = each($lng->catalog_languages)) {
   $languages_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $connection) . '">' . tep_image(DIR_WS_LANGUAGES .  $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a>;';
 }
echo $languages_string;
?>
</td>
</div>

 

not sure what part. (the code is my work around, to get the language boxes up in the header shortcuts)

Share this post


Link to post
Share on other sites

I would start by getting rid of the <td> and </td>, so you at least have valid HTML. Then you need to debug the language code.

 

Or you could just use the Header Footer Content Modules Addon, as that already contains a working languages module.

 

Regards

Jim

Share this post


Link to post
Share on other sites

I've uploaded a new version that fixes some bugs. There was a bug in the canonical tag that prevented it from working properly on some pages. Also, I've made another attempt at fixing the language bug.

 

If you already have an older version installed, upgrade only if you are having problems. There are upgrade instructions in the user's manual.

 

Until the official Addon gets approved, you can download it from my site.

 

Regards

Jim

Share this post


Link to post
Share on other sites

Hi Jim,

 

I just installed the 1.4.3

And found a problem with the Canonical Tag

 

I'm getting Canonical tags like this:

Home Page:

<link rel="canonical" href="http://www.rubberstore.com/http://www.rubberstore.com/231test/?cPath=">

Need ROOT/ROOT/ to just ROOT/ and if on home remove ?cPath=

 

Category Page:

<link rel="canonical" href="http://www.rubberstore.com/http://www.rubberstore.com/231test/orings-c-33.html">

Need ROOT gone rest is perfect

 

Products Page:

<link rel="canonical" href="http://www.rubberstore.com/http://www.rubberstore.com/231test/product_info.php?cPath=&amp;products_id=">

Need first ROOT gone, product info switched to SEO URL, cPath included &amp; products Id included

 

I'll work on it myself but if you have a solution that would be great. I have FWRMedia Ultimate SEO URL's Installed as well.

Edited by NodsDorf

Share this post


Link to post
Share on other sites

Fixed the homepage (index.php) and the Category pages by changing this function in catalog/includes/modules/header_tags/ht_connonical.php

 

 if( basename( $PHP_SELF ) == FILENAME_DEFAULT ) {
	  $link = tep_href_link( FILENAME_DEFAULT, 'cPath=' . $cPath, 'NONSSL' );
	  $meta_tag = '<link rel="canonical" href="' . $domain . '/' . $link . '" />' . PHP_EOL;

 

To:

if( basename( $PHP_SELF ) == FILENAME_DEFAULT ) {
           if ($cPath=='') {
               $link = tep_href_link( FILENAME_DEFAULT, '', 'NONSSL' ); }
               else
	  $link = tep_href_link( FILENAME_DEFAULT, 'cPath=' . $cPath, 'NONSSL' );
	  $meta_tag = '<link rel="canonical" href="' . $link . '" />' . PHP_EOL;

While this gets the canonical tag to display correctly given the page I'm on, I'm not sure how its shown if you access the url from a different url since my shop will redirect 301 to the correct url which is great for me.

 

So a catagory page access like

http://www. somesite .com/catalog/index.php?cPath=1 may or may not display the correct canonical tag.. for me however that would fire a redirect to the correct page which has the correct canonical tag

 

As for the product_info.php pages.. I'm having trouble but working on it still..

Share this post


Link to post
Share on other sites

Just another follow up, I'll look into more but from what I can tell $product_id is not a global since it has no value

 

$cPath_new = tep_get_product_path( $products_id );
	  $link = tep_href_link( FILENAME_PRODUCT_INFO, 'cPath=' . $cPath_new . '&products_id=' . $products_id, 'NONSSL' );
	  $meta_tag = '<link rel="canonical" href="' . $link . '" />' . PHP_EOL;

$cPath_new = tep_get_product_path( $products_id ); returns empty

$link = tep_href_link( FILENAME_PRODUCT_INFO, 'cPath=' . $cPath_new . '&products_id=' . $products_id, 'NONSSL' ); returns no product_id

 

Either way in my case this is only half the problem, I also need FILENAME_PRODUCT_INFO to translate to the SEO URL we have setup.

 

I can't spend much more time on this issue right now, but since the product info page is somewhat absoulte, I can remove the tag from them for now.

Share this post


Link to post
Share on other sites

That's a good point about $cPath not being set on the front page. I'll add the code for that. Also, change $products_id to (int)$_GET['products_id']. Thanks for the bug reports.

 

You don't really need a canonical tag if all of your pages redirect to a single canonical page. That's more than enough of a hint for the search engines to figure it out.

 

Regards

Jim

Share this post


Link to post
Share on other sites

I've uploaded a new version with the above fixes to the canonical module. I also cleaned up the code a bit. As usual, ti's available from my server until the official upload gets approved.

 

Regards

Jim

Share this post


Link to post
Share on other sites

Hi Jim, I agree with you on the canonical tag thing, my issue is that SEOmoz.org likes those canonical tags when doing reports which I have to turn in. So, if I can put them there correctly I will for the heck of it. Either way thanks again.

 

Don

Share this post


Link to post
Share on other sites

Jim,

First off, Nice Contribution, Thanks

 

I don't know if I did anything wrong or not, I've installed this contribution to a new oscommerce install, following the directions, but I'm running into a problem with the product keywords, when I type the keywords in and click the save button it doesn't save them. I've tried to track the problem down but I'm unable to figure it out completely. (I've been using oscommerce for a while but haven't needed to code much for a couple of years) Take this next part with a grain of salt. I changed the admin/includes/modules/header_tags/categories_products_process.php to include lines for head_keywords (mirroring head_description) This seems to allow the keywords to save. But it doesn't save the spanish version separately but instead it brings back the english section into the spanish. This I know is beyond me tonight. Also more minor than anything, on the categories.php page for editing products the description title and the keywords title are the same.

 

I hope this helps, and I hope to continue to use your great contribution.

Robert

Share this post


Link to post
Share on other sites

Are you certain you're using the latest version I posted above? I thought all of those bugs were fixed. If you are, please check that you have all of the files in the right place and that they ar the right size.

 

Regards

Jim

Share this post


Link to post
Share on other sites

Thanks Jim, made the changes for the canonical tags you suggested.

 

I would like to point out that you may still have a duplicate problem with including the $domain in the meta_tag name.

$link = tep_href_link( FILENAME_PRODUCT_INFO, 'cPath=' . $cPath_new . '&products_id=' . $products_id, 'NONSSL' );
	    $meta_tag = '<link rel="canonical" href="' . $domain . '/' . $link . '" />' . PHP_EOL;
	    break;

 

Your varaiable $link seems to be getting the domain via the tep_href_link() so putting the domain in front of the link makes it http//:www.site.com/http://www.site.com least that is my case. I just removed the variable $domain from my files and it appears to be working great. Either way, thank you very much.

 

Don

Share this post


Link to post
Share on other sites

This seems to be working correctly on my test site. Interesting. I'll try to do some more testing. Thnaks for the bug report.

 

Regards

Jim

Share this post


Link to post
Share on other sites

URL rewriters do some very odd things. That's only one of the reasons I recommend they not be used.

 

It should be possible to rewrite the Canonical module to get rid of this problem. I'm in the middle of something else right now, but I'll take a look at this as soon as I'm done.

 

Regards

Jim

Share this post


Link to post
Share on other sites

Hi Jim

 

I've just installed v1.4.3 (Have now noticed v1.4.4 is available) without any obvious problems, so went to admin section and installed some of the category related modules, just to get a feel of what they do and again no problem.

 

I then installed module "Category Meta Keywords - Insert", which didn't work and uninstalling the module does not remove it from the editing/creating a category. It does not appear to stop the site from working as far as I know, so no great issue.

 

Could you confirm if this module is part of v1.4.3 as I'm unsure, I can see a file ht_category_keywords_insert.php in the download catalog/includes/modules/header_tags and in catalog/includes/languages/english/modules/header_tags folders but I don't know enough about php to understand how it might be affecting the admin

 

Regards

 

Ken

Share this post


Link to post
Share on other sites

I have no idea how to solve a problem when all I'm given is "didn't work". Try to give a better description of the problem.

 

Most of the problems with these modules are caused by failing to upload one or more files to the correct locations. The two files you mentioned are essential to the module you are having problems with. Also, there are changes to admin/categories.php that are essential. Check that you have made those changes correctly.

 

Regards

Jim

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