Jump to content
FWR Media

KissMT Dynamic SEO Meta & Canonical Header Tags

Recommended Posts

Rob,

I have managed to get all working, I am just having one little problem and if you can guide me in the right direction that will be much appreciated. The meta tage are working great for my home page/products/categories, etc.

 

The only issue I seem to be having is with re. peripheral pages, such as specials, contact_us. When you select these pages, the title being displayed is AFRICANDECORGIFTSARTFROMAFRICA. I have no idea where this is coming from?

Whatever I seem to edit in kissmnt.php does not seem to be impacted, and the above title seems to appear for all these pages.

At this moment I have this in kissmnt.php for my specials page:

define( 'KISSMT_SPECIALS_TITLE_TEXT', 'test1');

define( 'KISSMT_SPECIALS_DESCRIPTION_TEXT', 'test2');

yet it still displays "AFRICANDECORGIFTSARTFROMAFRICA".

Any ideas you have will be much appreciated, Gary. All else is working great. Thks, Gary

My website is www.nontando.com

Edited by bksbeat

Share this post


Link to post
Share on other sites

Hello Everyone

 

Thanks for taking time to read this,

 

I have been using this add on for while however over last couple of days I have been having major issues trying to install and get the realex payment add on to work, now I am no programmer, but having tried so many different things I was wondering if the issue I am having could be due to me using this add on. if it is then is there anyway of adding an exception to make a call back url work properly the issue is:

 

I am having alot of issues trying to install the realex redirect add on. Currently in TEST MODE

 

I downloaded the module from the site,

 

 

Follwoed the instructions,

The before_process.php file should be uploaded to the merchants shop (in the same directory as checkout_process.php)

 

Which is same as index.php so this is where I put that file.

 

I am using version

Type: OsCommerce 2.2 RC2a

 

 

instructions ask to choose and then rename file to realex.php

 

Install realexmsoscms3 if you are running OSCommerce 2.2 MileStone 3.

Install realexmsoscms2 if you are running OSCommerce 2.2 MileStone 2.

 

So in the download I renamed the file called

Install realexmsoscms3 if you are running OSCommerce 2.2 MileStone 3

 

 

Ok, I edited this file with merchant id and shared secret, when into admin for oscommerce enable the module and added the merchant id and shared secret

 

I have the module setup as far as I can see. With the files uploaded according to the locations in the download folder.

 

1. As far as I am awre the return url to provide realex with it http://www.mydomain....ore_process.php

 

is this correct?

 

 

2. Now I am able to go through checkout using test card numbers but get message after card has been accepted and processed

Your transaction has been successful but there was a problem connecting back to the merchant's web site. Please contact the merchant and advise them that you received this error message. Thank you.!

 

 

3.If I try and open the before_process.php file using full url in the browser

 

 

I see this error on screen.

 

Realex error

Hashes dont match - response not authenticated

 

4. Realex provided me with a log

 

here is parts of it

 

 

''_protocol'' => ''HTTP/1.1'',

''_content'' => ''<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<html><head>

<title>406 Not Acceptable</title>

</head><body>

<h1>Not Acceptable</h1>

<p>An appropriate representation of the requested resource /before_process.php could not be found on this server.</p>

<p>Additionally, a 404 Not Found

error was encountered while trying to use an ErrorDocument to handle the request.</p>

 

 

Realex say that their servers can not connect to your response URL, can you please ensure that this is set up correctly.

 

Please can someone explain where things are going wrong as this is the second whole day been stuck with this.

 

If anyone is using ocomemerce and realex redirect add on please get in touch.

 

Kind Regards

Share this post


Link to post
Share on other sites

Hello Everyone

 

Thanks for taking time to read this,

 

This is a duplicate post which is annoying but also you are seeking support for an entirely different contribution.

Share this post


Link to post
Share on other sites

Hello Robert,

 

thank you for your KissMT contribution. It is great as all your code and works fine for me.

Just wanted to let you know that the produced keywords can sometimes look strange in multi language stores that use utf-8 character set:

 

i.e. czech word oblečení looks like oble�en�

 

 

For me it helped to replace the strtolower() php-function in kiss_modules.php in private function stripStopWords() at line 286 like this:

 

$word = strtolower( trim( $word ) );

 

replace with

 

$word = mb_strtolower( trim( $word ), CHARSET );

 

 

Thank you for reading!

Manfred

Share this post


Link to post
Share on other sites

How would one go about drawing out the canonical url of a page.

Similar to -

<?php echo HTTP_SERVER . $_SERVER['REQUEST_URI']; ?>

 

But for the canonical url.

Thanks in advanced

Share this post


Link to post
Share on other sites

Good work FWR on SEO URLs.

 

I attemp to install now this contribution in a shop that has two languages - english and polish.

 

Do I well recognize that to apply additional not supported language I will need to:

1) Duplicate kissmt.php from /includes/languages/english directory into /includes/languages/polish added directory

2) Create /includes/modules/kiss_meta_tags/smallwords/polish.php with polish small words in

3) Create /includes/modules/kiss_meta_tags/stopwords/polish_stopwords.ini with polish stop words in

 

Do I understand the scheme, or there is something that I miss?

Share this post


Link to post
Share on other sites

Do I understand the scheme, or there is something that I miss?

 

That looks about right at a glance.

 

Just bear in mind that special language characters really should not be saved to a file .. it is bad practise due to encoding issues.

 

However .. because with osCommerce there is no unified UTF-8 database ( different users choose different database encoding ) I had no choice but to put the language text in files.

 

Make sure that whatever files you save with language text in you save as the correct character set for your site.

Share this post


Link to post
Share on other sites

That looks about right at a glance.

 

Just bear in mind that special language characters really should not be saved to a file .. it is bad practise due to encoding issues.

 

However .. because with osCommerce there is no unified UTF-8 database ( different users choose different database encoding ) I had no choice but to put the language text in files.

 

Make sure that whatever files you save with language text in you save as the correct character set for your site.

 

Thanks Robert.

 

The database I use is utf8_unicode_ci. I just worked out this due to issues with Ultimate SEO URLs and products in the shop added with strange characters in the name field (“” instead of ""). The pages are generated with utf8 too.

 

I'm kind of a noob in all of this stuff, just on the side of my stable and boring business I'm planning to open a shop. Quite an advantage when I never worked on websites, but it seems to be just running ;P

 

I know that encoding issue exist, but can you precise how risky it is? The thing is that here in Poland we have quite many local characters (ĄĆĘŁŃÓŚŹŻ)and quite often they exist in short words. Also on stop words seems 1/5 existence. I know that it's a stupid question, but where I can face the problem if I would apply them? If something will be wrong with encoding I will see it when I will check the source of the page generated in the browser?

Share this post


Link to post
Share on other sites

I have noticed that the category descriptions text is not working for me on all categories. For example, it only seems to display the text on categories that have sub categoires. Also it does not seem to show the text on subcategories or categories without products.

 

I wanted to use the text as a place holder on some categories or to give extra information on sub categories.

Share this post


Link to post
Share on other sites

Hi Robert!

 

Thank you for the great contrib!

But my problem same as below

RMD27 worte:

 

That may be the case but the issue with that is you can enter your full quota of keywords because 1 character é is represented by 8 character é

 

Same issue applies for title and description

 

I downloaded your modified file "kiss_modules.php" but unfortunately still same problem.

I use UTF8_general_ci character set.

 

Can you help me?

 

regards

Tom

Share this post


Link to post
Share on other sites

Hi Robert!

 

Thank you for the great contrib!

But my problem same as below

RMD27 worte:

 

 

 

I downloaded your modified file "kiss_modules.php" but unfortunately still same problem.

I use UTF8_general_ci character set.

 

Can you help me?

 

regards

Tom

 

Personally I didn't try the add on because my host sorted it for me

 

Maybe your Host can do you a favour?

Share this post


Link to post
Share on other sites

most hosts don't touch scripts.

 

Okay, from my experience UTF-8 is the one to go for. The other derivatives don't work for me, in Greek letters anyway

Share this post


Link to post
Share on other sites

hi,

i got a problem: i resetted the KissMT Cache 2 weeks ago, after 1day my site became invisible to google... all my pages have been deleted from search engines... what can i do now? i have waited 2 weeks but nothing happen...

i got also ultimate seo url 5 , i Resetted the USU5 Cache too ... but nothing happen on google , any suggestion? what can i do?

 

thanks@all

Share this post


Link to post
Share on other sites

I have noticed that the category descriptions text is not working for me on all categories. For example, it only seems to display the text on categories that have sub categoires. Also it does not seem to show the text on subcategories or categories without products.

 

I wanted to use the text as a place holder on some categories or to give extra information on sub categories.

 

Can you answer my question? See my quote ^^

Share this post


Link to post
Share on other sites

Is it possible to turn this contribution off? If not, how do you uninstall it? I've tried removing the contribution but it's still rewriting the URLS. I'm using osc v2.3.1


Ah, the world wide web. What a wonderful place.

Share this post


Link to post
Share on other sites

Is it possible to turn this contribution off? If not, how do you uninstall it? I've tried removing the contribution but it's still rewriting the URLS. I'm using osc v2.3.1

 

I think you'll find it is not.

 

KissMT has nothing whatsoever to do with URLs.

Share this post


Link to post
Share on other sites

I think you'll find it is not.

 

KissMT has nothing whatsoever to do with URLs.

 

Apollogies, I meant the header tags not URLS.


Ah, the world wide web. What a wonderful place.

Share this post


Link to post
Share on other sites

Is there any possible reason why the keywords tag doesn't show on the products page but shows on other pages? Also is there a way to not have the page desciption follow the page title on 'index.php'? Sorry for the amount of questions but I need to get the store up and running.

Edited by freakystreak

Ah, the world wide web. What a wonderful place.

Share this post


Link to post
Share on other sites

hi,

i got a problem: i resetted the KissMT Cache 2 weeks ago, after 1day my site became invisible to google... all my pages have been deleted from search engines... what can i do now? i have waited 2 weeks but nothing happen...

i got also ultimate seo url 5 , i Resetted the USU5 Cache too ... but nothing happen on google , any suggestion? what can i do?

 

thanks@all

 

I very much doubt KissMT has got anything to do with your site not being indexed by Google

Share this post


Link to post
Share on other sites

Can you answer my question? See my quote ^^

 

If I can chime in.

 

I use RC2.2

 

KissMT shows text on categories that don't have sub categories.

 

About categories without products, I wouldn't know but I imagine it does.

Share this post


Link to post
Share on other sites

Hi Robert, I have upgrade my RC2a site to include "(AC) (NEW) Introduce Template Layout and Modular Header Tags"

 

If I choose to include like so:

 

include_once DIR_WS_MODULES . 'kiss_meta_tags/kiss_meta_tags.php';
require(DIR_WS_INCLUDES . 'template_top.php'); 

Then I will get two title tags since template_top have:

 

<title><?php echo tep_output_string_protected($oscTemplate->getTitle()); ?></title>

 

So, I am thinking of having a conditional statement for the title tag.

 

Also, the upgrade's osc_template.php differs from the v2.3.1 (sorry for posting this chunk):

 

<?php
/*
 $Id$

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

 Copyright (c) 2010 osCommerce

 Released under the GNU General Public License
*/

 class oscTemplate {
   var $_title;
   var $_header_tags = array();

   function oscTemplate() {
     $this->_title = TITLE;
   }

   function setTitle($title) {
     $this->_title = $title;
   }

   function getTitle() {
     return $this->_title;
   }

   function addHeaderTag($tag) {
     $this->_header_tags[] = $tag;
   }

   function getHeaderTags() {
     if (!empty($this->_header_tags)) {
       return implode("\n", $this->_header_tags);
     }
   }

   function buildHeaderTags() {
     global $language;

     if ( defined('MODULE_HEADER_TAGS_INSTALLED') && tep_not_null(MODULE_HEADER_TAGS_INSTALLED) ) {
       $htm_array = explode(';', MODULE_HEADER_TAGS_INSTALLED);

       foreach ( $htm_array as $htm ) {
         $class = substr($htm, 0, strrpos($htm, '.'));

         if ( !class_exists($class) ) {
           include(DIR_WS_LANGUAGES . $language . '/modules/header_tags/' . $htm);
           include(DIR_WS_MODULES . 'header_tags/' . $class . '.php');
         }

         $ht = new $class();

         if ( $ht->isEnabled() ) {
           $ht->execute();
         }
       }
     }
   }
//Begin: This is from V2.3.1 Under test only <---------------------Please Note it's commented
/*
   function addBlock($block, $group) {
     $this->_blocks[$group][] = $block;
   }

   function hasBlocks($group) {
     return (isset($this->_blocks[$group]) && !empty($this->_blocks[$group]));
   }

   function getBlocks($group) {
     if ($this->hasBlocks($group)) {
       return implode("\n", $this->_blocks[$group]);
     }
   }

   function buildBlocks() {
     global $language;

     if ( defined('TEMPLATE_BLOCK_GROUPS') && tep_not_null(TEMPLATE_BLOCK_GROUPS) ) {
       $tbgroups_array = explode(';', TEMPLATE_BLOCK_GROUPS);

       foreach ($tbgroups_array as $group) {
         $module_key = 'MODULE_' . strtoupper($group) . '_INSTALLED';

         if ( defined($module_key) && tep_not_null(constant($module_key)) ) {
           $modules_array = explode(';', constant($module_key));

           foreach ( $modules_array as $module ) {
             $class = substr($module, 0, strrpos($module, '.'));

             if ( !class_exists($class) ) {
               include(DIR_WS_LANGUAGES . $language . '/modules/' . $group . '/' . $module);
               include(DIR_WS_MODULES . $group . '/' . $class . '.php');
             }

             $mb = new $class();

             if ( $mb->isEnabled() ) {
               $mb->execute();
             }
           }
         }
       }
     }
   }
//End: This is from V2.3.1 Under test only
*/
 }
?>

 

The osc_template for header tags have these options, via admin:

 

ht_category_title

 

ht_manufacturer_title

 

ht_product_title

 

ht_google_analytics

 

ht_opensearch

 

If I choose to use KissMT as given above: include_once DIR_WS_MODULES . 'kiss_meta_tags/kiss_meta_tags.php';

 

Will that compromise the osc_template options? If so, how do I make them coexist?

I know that I could disallow these options, but I'd rather have an exclusive condition, that is

if KissMT is set to be used via admin, then the then the title tag should come from KissMT and

any other osc_template offending header tag options should be auto set to false.

 

Possible, yes, but I am no coder... Would be nice with your advice :)

 

Sara

Share this post


Link to post
Share on other sites

Just to share a little trick to send the canonical link also from the server headers

 

in catalog/includes/modules/kiss_meta_tags/classes/kiss_meta_tags_class.php

 

find:

 

 private function canonical() {
     if ( ( KISSMT_CANONICAL_ON == 'true' ) && ( false !== $this->canonical ) ) {
       if ( $this->canonical == 'noindex' ) {
         echo '<meta name="robots" content="noindex, follow"' . $this->html_end . PHP_EOL;;
       } else {

               echo '<link rel="canonical" href="' . $this->canonical . '"' . $this->html_end . PHP_EOL;;


       }
     }

 

change to:

 

 private function canonical() {
     if ( ( KISSMT_CANONICAL_ON == 'true' ) && ( false !== $this->canonical ) ) {
       if ( $this->canonical == 'noindex' ) {
         echo '<meta name="robots" content="noindex, follow"' . $this->html_end . PHP_EOL;;
       } else {

           header("Link: <$this->canonical>; rel=\"canonical\"");
         echo '<link rel="canonical" href="' . $this->canonical . '"' . $this->html_end . PHP_EOL;;


       }
     }

 

The server will send the canonical linnk in the HTTP header: Link: <http://www.example.com/downloads/white-paper.pdf>; rel="canonical"

Edited by acidvertigo

Share this post


Link to post
Share on other sites

Hi Robert,

 

i really like your contribution and am using it for a long time. last week i ran the report that showed what i can do to improve my site and it flagged my tittles as being too long. Is there a way i can make them shorter - 65 characters. It also showed that i have a lot of duplicate title tags as follows:

* /diaper-cakes-baby-girl-c-3_22.html

* /diaper-cakes-baby-girl-c-3_22.html?page=1&sort=2a

* /diaper-cakes-baby-girl-c-3_22.html?page=1&sort=2d

* /diaper-cakes-baby-girl-c-3_22.html?page=1&sort=3a

* /diaper-cakes-baby-girl-c-3_22.html?page=1&sort=3d

* /diaper-cakes-baby-girl-c-3_22.html?page=2&sort=2a

* /diaper-cakes-baby-girl-c-3_22.html?page=2&sort=2d

* /diaper-cakes-baby-girl-c-3_22.html?page=2&sort=3a

* /diaper-cakes-baby-girl-c-3_22.html?page=2&sort=3d

* /diaper-cakes-baby-girl-c-3_22.html?sort=2a&page=1

 

It is all the same page, so can i get rid of the duplicates? it looks like all the duplicates are because of the sort.

 

Thank you very much for your help.

 

Lary

Share this post


Link to post
Share on other sites

Hi,

 

Great contribution, but I have stumbled upon a problem which I have not yet been able to resolve. I installed Seo Urls 5 which worked fine on a modded 2.3.1 OsCommerce shop, but after installing the Dynamic Meta Tags contribution it went all a bit wrong. If I have Seo Urls turned on then I am unable to view any products/manufacturers or go into any category. Clicking on any in Firefox just gives me an error which says "The page isn't redirecting properly. Firefox has detected that the server is redirecting the request for this address in a way that will never complete". However, if I turn off Seo Urls 5 then I can browse properly.

 

With Seo Urls 5 turned on I get the following URL "www.mydomain.com/catalog/product_info.php/mop-p-167" When it is turned off I get the following URL which works "www.mydomain.com/catalog/product_info.php?products_id=167 ...Just to note both URL I used as an example refer to the same product.

 

Can anyone tell me how I could get the URL's to direct properly and have both contributions work together? I don't really understand what could have caused this.

 

Many thanks!

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

×