Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

KissMT Dynamic SEO Meta & Canonical Header Tags


FWR Media

Recommended Posts

Yes . . KissMT will request a brand new seo url from the system for the canonical link using index.php?products_id=152 as long as seo urls produces a good link then the canonical link will be correct.

 

Are you using that Magic Seo Urls thing for your multi languages? because Ultimate Seo Urls 5 PRO will be released relatively soon and is looking for beta testers.

 

Not Magic Seo Urls but Ultimate SEO url (old version).

Link to comment
Share on other sites

Not Magic Seo Urls but Ultimate SEO url (old version).

 

Oh I see, so you are actually putting the french- etc bit in the name of the product or category .. Ugggh.

Link to comment
Share on other sites

Hi,

 

Great Contribution. I like it. I want to install it in my CRE LOADED shop, this is my first time to install oscommerce contrib in cre loaded.

 

Can someone please help me on how to convert/configure it for cre loaded?

 

Thanks

Link to comment
Share on other sites

Hi,

 

Great Contribution. I like it. I want to install it in my CRE LOADED shop, this is my first time to install oscommerce contrib in cre loaded.

 

Can someone please help me on how to convert/configure it for cre loaded?

 

Thanks

 

I have a really old version of CRE which I haven't looked at for ages.

 

I had a quick look and the <title></title> needs to be changed in templates/<my current template>/main_page.tpl.php

 

BUT there will be an issue with the breadcrumb at least as it is different code in CRE.

 

I may have a look tomorrow if I get a sec.

Link to comment
Share on other sites

I have a really old version of CRE which I haven't looked at for ages.

 

I had a quick look and the <title></title> needs to be changed in templates/<my current template>/main_page.tpl.php

 

BUT there will be an issue with the breadcrumb at least as it is different code in CRE.

 

I may have a look tomorrow if I get a sec.

 

Actually it seems to work fine with the little testing I have done so far. In the instructions ...

 

Instead of replacing <title></title> in all the catalog files you just change it in templates/<my current template>/main_page.tpl.php

Edited by FWR Media
Link to comment
Share on other sites

Hi,

I have just installed this add on at a dev site for testing and included the relevant tag into shipping, privacy etc., but when viewing these pages a box named KissMT Dynamic SEO Meta Tags appears in the footer which should not be there ...

http://affordable-website-design.me.uk/oscommerce/shipping.php

and

http://affordable-website-design.me.uk/oscommerce/hardware-c-1.html

I am not sure how to remove this, please advise.

Link to comment
Share on other sites

Hi,

I have just installed this add on at a dev site for testing and included the relevant tag into shipping, privacy etc., but when viewing these pages a box named KissMT Dynamic SEO Meta Tags appears in the footer which should not be there ...

http://affordable-website-design.me.uk/oscommerce/shipping.php

and

http://affordable-website-design.me.uk/oscommerce/hardware-c-1.html

I am not sure how to remove this, please advise.

 

Debug output, it is set to on when you install.

 

If you have extras you turn off in admin.

 

Otherwise . . open catalog/includes/modules/kiss_meta_tags/includes/init.php

 

 /**
 * Output the performance info - you'll see it at the bottom of the page.
 * string true / false
 */
 @define( 'KISSMT_PERFORMANCE_OUTPUT', 'false' );

Edited by FWR Media
Link to comment
Share on other sites

Debug output, it is set to on when you install.

 

If you have extras you turn off in admin.

 

Otherwise . . open catalog/includes/modules/kiss_meta_tags/includes/init.php

 

 /**
 * Output the performance info - you'll see it at the bottom of the page.
 * string true / false
 */
 @define( 'KISSMT_PERFORMANCE_OUTPUT', 'false' );

 

Thanks for the swift response and the very useful add-on - I have not added extras although intend to do so next and will leave debug on until after completed testing but as this is set to default on install, respectfully suggest that this is mentioned in the install file ;-)

 

Thanks again :-D

Link to comment
Share on other sites

I have same problem CHARSETs with ISO-8859-9 and windows-1254 which support Turkish

Can you please modify this great addon for those charsets?

Thanks in advance.

 

No new version needs to be uploaded this is just for your information.

Changelog:

  • Wrapped the htmlentities and html_entity_decode functions to allow a bypass for ISO-8859-2 which is not supported by either htmlspecialchars or htmlentities.
  • Added Information Pages module.
  • Added full set of modules for Newsdesk.

 

If anyone needs the changes for ISO-8859-2 or the addon modules for Information Pages or Newsdesk just send me a PM and I'll send a download link.

Link to comment
Share on other sites

I have same problem CHARSETs with ISO-8859-9 and windows-1254 which support Turkish

Can you please modify this great addon for those charsets?

Thanks in advance.

 

Have sent you a download link to the latest revision.

 

you just need to "drop on top" the modules/kiss_meta_tags/ directory .. no need for other changes.

Edited by FWR Media
Link to comment
Share on other sites

Thank you for speedy response.

Now it works perfectly.

 

Have sent you a download link to the latest revision.

 

you just need to "drop on top" the modules/kiss_meta_tags/ directory .. no need for other changes.

Link to comment
Share on other sites

Hi,

 

Thanks for your great contrib! It work fine but it seems that I have a problem with Google.

On my website, all titles are rewrited, but when I do on Google: site:www.mywebsite.com the title are not rewrite.

 

Do you know why?

 

Excuse my english I am from France

 

Regards

Link to comment
Share on other sites

Hi,

 

Thanks for your great contrib! It work fine but it seems that I have a problem with Google.

On my website, all titles are rewrited, but when I do on Google: site:www.mywebsite.com the title are not rewrite.

 

Do you know why?

 

Excuse my english I am from France

 

Regards

 

Hi Tom

 

Your English is just fine.

 

How long have you had KissMT installed? Google and friends sometimes take a while to update their listings, there is little anyone can do to speed the process.

Link to comment
Share on other sites

Important Notice:

 

As standard KissMT currently sets the canonical link of the root page as www.mysite.com/index.php.

 

The reason for this is that there is internal linking to this ( breadcrumb etc. ) whereas there is no internal linking to the version without index.php.

 

It has been brought to my attention that users may wish their root page to be www.mysite.com/ ( without the index.php ) and further investigation following helpful information by squid ( a forum member ) suggests that the version without the index.php could be a better standard option.

 

This will be addressed in the new revision but for current users wishing to have this now .. the code change is below: -

 

open catalog/includes/modules/kiss_meta_tags/abstracts/kiss_modules.php

 

Find ..

 

 

    private function forceHttp( $the_current_canonical_link ) {

 

 

change to ..

 

 

    private function forceHttp( $the_current_canonical_link ) {
     // mod suggested by squid - thanks
     if ( substr( $the_current_canonical_link, -strlen( FILENAME_DEFAULT ), strlen( $the_current_canonical_link ) ) == FILENAME_DEFAULT ) {
       $the_current_canonical_link = substr( $the_current_canonical_link, 0, strlen( $the_current_canonical_link )-strlen( FILENAME_DEFAULT ) );
     }

 

Another point correctly brought to my attention by squid is that if you currently have code in place in .htaccess to redirect www.mysite.com/index.php to www.mysite.com/ this should now be removed as the canonical element will do the same job.

Link to comment
Share on other sites

Hi FWR Media

In local server it works perfectly but when I send this production server I receive following error. I

My php version is 5.2.11 on production server and in phpinfo() it shows SPL support enabled. I've tested a few more sample php code includes ArrayIterator with success but I cannot pass below error. Any thought?

 

PHP Fatal error: Class 'ArrayIterator' not found in ****/includes/modules/kiss_meta_tags/classes/kiss_meta_tags_class.php on line 123

 

 

SPL support enabled 

Interfaces Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject Classes AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, EmptyIterator, FilterIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RegexIterator, RuntimeException, SimpleXMLIterator, SplFileInfo, SplFileObject, SplObjectStorage, SplTempFileObject, UnderflowException, UnexpectedValueException 

Edited by snowbird
Link to comment
Share on other sites

Hi FWR Media

In local server it works perfectly but when I send this production server I receive following error. I

My php version is 5.2.11 on production server and in phpinfo() it shows SPL support enabled. I've tested a few more sample php code includes ArrayIterator with success but I cannot pass below error. Any thought?

 

PHP Fatal error: Class 'ArrayIterator' not found in ****/includes/modules/kiss_meta_tags/classes/kiss_meta_tags_class.php on line 123

 

 

SPL support enabled 

Interfaces Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject Classes AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, EmptyIterator, FilterIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RegexIterator, RuntimeException, SimpleXMLIterator, SplFileInfo, SplFileObject, SplObjectStorage, SplTempFileObject, UnderflowException, UnexpectedValueException 

 

If ArrayIterator is not available then the host has disabled SPL ( --disable-spl ) when compiling PHP which is ridiculous.

Link to comment
Share on other sites

If ArrayIterator is not available then the host has disabled SPL ( --disable-spl ) when compiling PHP which is ridiculous.

 

No, it is Enabled according to phpinfo()

Also there is no " --disable-spl" in configure command. Here is compile commands (installed from rpm)

Really weird situation.

 

 

Configure Command:

 

'./configure' '--host=i686-redhat-linux-gnu' '--build=i686-redhat-linux-gnu' '--target=i386-redhat-linux' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--without-mime-magic' '--without-sqlite' '--with-libxml-dir=/usr' '--enable-xml' '--with-system-tzdata' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter' '--disable-json' '--without-pspell'

Link to comment
Share on other sites

No, it is Enabled according to phpinfo()

Also there is no " --disable-spl" in configure command. Here is compile commands (installed from rpm)

Really weird situation.

 

 

Configure Command:

 

'./configure' '--host=i686-redhat-linux-gnu' '--build=i686-redhat-linux-gnu' '--target=i386-redhat-linux' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--without-mime-magic' '--without-sqlite' '--with-libxml-dir=/usr' '--enable-xml' '--with-system-tzdata' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter' '--disable-json' '--without-pspell'

 

PHP Fatal error: Class 'ArrayIterator' not found

 

The SPL class does not exist.

Link to comment
Share on other sites

No, it is anabled.

phpinfo() includes following as I mentioned earlier.

SPL support enabled 

Interfaces Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject Classes AppendIterator, 
ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, 
EmptyIterator, FilterIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, 
LogicException, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, 
RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, 
RecursiveRegexIterator, RegexIterator, RuntimeException, SimpleXMLIterator, SplFileInfo, SplFileObject, SplObjectStorage, SplTempFileObject, 
UnderflowException, UnexpectedValueException 

This is the part of kiss_meta_tags_class.php file that generates error "PHP Fatal error: Class 'ArrayIterator' not found in ****/includes/modules/kiss_meta_tags/classes/kiss_meta_tags_class.php on line 123"

 


private function setBaseName() {
	$base = new ArrayIterator( array( 'SCRIPT_NAME', 'PHP_SELF' ) );
	while ( $base->valid() ) {
	if ( array_key_exists( $base->current(), $_SERVER ) && !empty( $_SERVER[$base->current()] ) ) {
	if ( false !== strpos( $_SERVER[$base->current()], '.php' ) ) {
	preg_match( '@[a-z0-9_]+\.php@i', $_SERVER[$base->current()], $matches );
	if ( is_array( $matches ) && ( array_key_exists( 0, $matches ) )
	&& ( substr( $matches[0], -4, 4 ) == '.php' )
	&& ( is_readable( $matches[0] ) ) ) {
	return $matches[0];
	} 
	} 
	}
	$base->next();
	}
	// Some odd server set ups return / for SCRIPT_NAME and PHP_SELF when accessed as mysite.com (no index.php) where they usually return /index.php
	if ( ( $_SERVER['SCRIPT_NAME'] == '/' ) && ( $_SERVER['PHP_SELF'] == '/' ) ) {
	return 'index.php';
	} 
	trigger_error( 'KissMT could not find a valid base filename, please inform the developer.', E_USER_WARNING );
} // end method

 

However if I take those lines and produce below code it works and prints "OK". That means no issue with ArrayIterator class. I didn't see "PHP Fatal error: Class 'ArrayIterator' not found .... " error with this code. I will keep on investigating the problem..

 

<?php
	$base = new ArrayIterator( array( 'SCRIPT_NAME', 'PHP_SELF' ) );
	if ( $base->valid() ) echo 'OK';
	else echo 'not OK';
?>

Edited by snowbird
Link to comment
Share on other sites

No, it is anabled.

phpinfo() includes following as I mentioned earlier.

SPL support enabled 

Interfaces Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject Classes AppendIterator, 
ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, 
EmptyIterator, FilterIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, 
LogicException, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, 
RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, 
RecursiveRegexIterator, RegexIterator, RuntimeException, SimpleXMLIterator, SplFileInfo, SplFileObject, SplObjectStorage, SplTempFileObject, 
UnderflowException, UnexpectedValueException 

This is the part of kiss_meta_tags_class.php file that generates error "PHP Fatal error: Class 'ArrayIterator' not found in ****/includes/modules/kiss_meta_tags/classes/kiss_meta_tags_class.php on line 123"

 


private function setBaseName() {
	$base = new ArrayIterator( array( 'SCRIPT_NAME', 'PHP_SELF' ) );
	while ( $base->valid() ) {
	if ( array_key_exists( $base->current(), $_SERVER ) && !empty( $_SERVER[$base->current()] ) ) {
	if ( false !== strpos( $_SERVER[$base->current()], '.php' ) ) {
	preg_match( '@[a-z0-9_]+\.php@i', $_SERVER[$base->current()], $matches );
	if ( is_array( $matches ) && ( array_key_exists( 0, $matches ) )
	&& ( substr( $matches[0], -4, 4 ) == '.php' )
	&& ( is_readable( $matches[0] ) ) ) {
	return $matches[0];
	} 
	} 
	}
	$base->next();
	}
	// Some odd server set ups return / for SCRIPT_NAME and PHP_SELF when accessed as mysite.com (no index.php) where they usually return /index.php
	if ( ( $_SERVER['SCRIPT_NAME'] == '/' ) && ( $_SERVER['PHP_SELF'] == '/' ) ) {
	return 'index.php';
	} 
	trigger_error( 'KissMT could not find a valid base filename, please inform the developer.', E_USER_WARNING );
} // end method

 

However if I take those lines and produce below code it works and prints "OK". That means no issue with ArrayIterator class. I didn't see "PHP Fatal error: Class 'ArrayIterator' not found .... " error with this code. I will keep on investigating the problem..

 

<?php
	$base = new ArrayIterator( array( 'SCRIPT_NAME', 'PHP_SELF' ) );
	if ( $base->valid() ) echo 'OK';
	else echo 'not OK';
?>

 

Haven't got a clue what is going on your end.

 

Either SPL ArrayIterator exists or it doesn't.

Link to comment
Share on other sites

New Revision R72

 

Changelog:

 


  •  
  • Added Information Pages Module
  • Added Newsdesk Module
  • Added Additional Extra Google Breadcrumb
  • Added Support for Charsets that are not Supported by htmlentities
  • Improved root canonical link logic ( thanks squid )
  • Improved http/https canonical link logic ( thanks squid )
  • Improved root path logic ( thanks Jan Zonjee )

 

Modification Required:

 

  • Core osCommerce files to modify - None
  • Database Changes - None
  • Files to upload from uploads package - uploads/catalog/includes/modules/kiss_meta_tags/( all )
  • New Optional Extras to Add - Google Breadcrumb

 

Required action from user:

 


  •  
  • Reset cache

Link to comment
Share on other sites

New Revision R72

 

Changelog:

 


  •  
  • Added Information Pages Module
  • Added Newsdesk Module
  • Added Additional Extra Google Breadcrumb
  • Added Support for Charsets that are not Supported by htmlentities
  • Improved root canonical link logic ( thanks squid )
  • Improved http/https canonical link logic ( thanks squid )
  • Improved root path logic ( thanks Jan Zonjee )

 

Modification Required:

 

  • Core osCommerce files to modify - None
  • Database Changes - None
  • Files to upload from uploads package - uploads/catalog/includes/modules/kiss_meta_tags/( all )
  • New Optional Extras to Add - Google Breadcrumb

 

Required action from user:

 


  •  
  • Reset cache

 

Hi Robert

I install Google Breadcrumb everithing is working great but when I try to click in header on my account or checkout I got this error "Warning: Cannot modify header information - headers already sent by (output started at /home/domain_name/includes/classes/breadcrumb.php:45) in /home/domain_name/includes/functions/general.php on line 36"

can you help me with that?

thank you

Link to comment
Share on other sites

Is this script in any way cpu intensive?

 

Not particularly, why do you ask?

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