Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Disable Automatic Filling of Meta Description Tag Rate Topic   * * * * * 1 votes

 
  • nedd
  • Senior Member
  • Members
  • Join Date: 13-Jan 08
  • 125 posts

Posted 26 December 2009 - 10:59 AM #1

Just found that the cart automatically grabs content of the products pages and puts it in Meta Description tag. How to disable it and leave it blank?

Also, by default, there are no words containing 3 or less characters in meta description content. It looks especially ridiculous if the product is e.g. U2 CD or DVD.

I tried to edit meta.tpl file and changed:

<meta name="description" content="{$meta_description|default:$lang.home_meta_description}" />

to:

<meta name="description" content="" />

or

<meta name="description" content="{$meta_description}" />

but there is no change. Any advice?!

 
  • dvsgr
  • Senior Member
  • Authorized Reseller
  • Join Date: 14-Apr 09
  • 1448 posts

Posted 18 March 2012 - 09:56 AM #2

Hi guys,

this is still on. I checked it on 2.2.4 and it still cuts out words under 3 letters.

I found something on core/fn.common.php about line 3030 or 3124 (depending your version)

it goes like

function fn_generate_meta_description($html, $max_words = 60)

Under that there's an if with this inside

if (fn_strlen($v) > 3) {
$meta[] = $v;
}

This indicates what should happen with words under 3 letters, took it away but still getting the same results.

Any Ideas how to fix that?
Fotis Kourmadas
Cs-Cart Development - Cs-Cart Authorized Reseller 

 
  • solesurvivor
  • Senior Member
  • Members
  • Join Date: 05-Aug 11
  • 745 posts

Posted 18 March 2012 - 12:20 PM #3

Did you make sure to clear cache?

 
  • dvsgr
  • Senior Member
  • Authorized Reseller
  • Join Date: 14-Apr 09
  • 1448 posts

Posted 18 March 2012 - 01:22 PM #4

yes i did, maybe it saves those values in the db.

I will check this out .

-----------------------------------------------------------------------

Well its not in the db but I changed the value 3 to 0 instead of removing the whole "if" and it worked Fine!!!

I have now automated meta descriptions the right way.

Please Cs-Cart support fix that in the new version. If there should be a limit for words smaller than 3 words, it should be in the meta keywords, which they are not automated in cs-cart anyway...

Meta Description is a major Seo factor, and when people forget to put meta descriptions they get horrible meta descsriptions from the system

Fotis

Edited by dvsgr, 18 March 2012 - 01:36 PM.

Fotis Kourmadas
Cs-Cart Development - Cs-Cart Authorized Reseller 

 
  • dotell
  • Junior Member
  • Trial users
  • Join Date: 21-Oct 09
  • 216 posts

Posted 24 March 2012 - 11:49 PM #5

yes i did, maybe it saves those values in the db.

I will check this out .

-----------------------------------------------------------------------

Well its not in the db but I changed the value 3 to 0 instead of removing the whole "if" and it worked Fine!!!

I have now automated meta descriptions the right way.

Please Cs-Cart support fix that in the new version. If there should be a limit for words smaller than 3 words, it should be in the meta keywords, which they are not automated in cs-cart anyway...

Meta Description is a major Seo factor, and when people forget to put meta descriptions they get horrible meta descsriptions from the system

Fotis


Thanks for this! Awesome!

 
  • dvsgr
  • Senior Member
  • Authorized Reseller
  • Join Date: 14-Apr 09
  • 1448 posts

Posted 25 March 2012 - 04:03 PM #6

Hi ,
I also post that in Bug Tracker.

It is under review.
Fotis Kourmadas
Cs-Cart Development - Cs-Cart Authorized Reseller 

 
  • freebull
  • Junior Member
  • Members
  • Join Date: 25-Nov 09
  • 29 posts

Posted 16 September 2012 - 04:46 PM #7

I don't think they take this issue seriously because the problem was still there even after upgrading to 2.2.5. It is actually a annoying issue for me. The automaticly generated meta descriptions make lots of duplicated descriptions which can be shown on Google Webmaster tools. It's simply because some of the items are very similar except only several characters differences. For example: Seagate 2TB internal hard drive vs. Seagate 3TB internal hard drive. The CS-Cart cut off 2TB and 3TB for both items which make google think the meta descriptions are the same. Google may simply discard these items.

The second issue for automatic meta descriptions are the double quote """. Google will cut off the meta descriptions if it found double quote characters inside the description. Indeed, it's easy to overcome the issue. Replace '"' with '&quot;' will get the problem fixed.

Lastly, I personally deem that we should keep the characters '.' and ','.

CS-Cart Engineers, please fix them in the future releases if possible. Thanks!

 
  • dsdewitt
  • Member
  • Members
  • Join Date: 19-Mar 09
  • 291 posts

Posted 24 September 2012 - 02:29 PM #8

Why not use the Meta Description and Meta keyword fields of the product. Nobody can automate this to fit everybody's desire. Either hand enter, very time consuming, or pump everything into excel and write up a little calulation customize the text in each of these fields.
David DeWitt
retail site ver. 2.1.1

 
  • FernE97
  • Newbie
  • Members
  • Join Date: 08-Sep 11
  • 9 posts

Posted 19 December 2013 - 10:26 PM #9

I had to update 2 core files to make it so the meta tags wouldn't get auto-generated if they weren't filled out. Not the best way since they are core files but didn't see any other way to do it.

/core/fn.common.php ~ line 2340
/controllers/customer/products.php ~ line 84

In fn.common.php I had to modify this function "fn_generate_meta_description" to have it return false instead of generating a description based of the product description.

function fn_generate_meta_description($html, $max_words = 60)
{
// Disable this function to auto-generate the meta_description
return false;
}

In products.php I disabled a fallback else statement that would generate the description and keywords based off the products category if the product had empty values for meta description or keywords.

if (!empty($product['meta_description']) || !empty($product['meta_keywords'])) {
  $view->assign('meta_description', $product['meta_description']);
  $view->assign('meta_keywords', $product['meta_keywords']);
}
// Disable auto-fill meta tags
// else {
//  $meta_tags = db_get_row("SELECT meta_description, meta_keywords FROM ?:category_descriptions WHERE category_id = ?i AND lang_code = ?s", $_SESSION['current_category_id'], CART_LANGUAGE);
//  if (!empty($meta_tags)) {
//   $view->assign('meta_description', $meta_tags['meta_description']);
//   $view->assign('meta_keywords', $meta_tags['meta_keywords']);
//  }
// }

Also modified the meta.tpl file.
/skins/basic/customer/meta.tpl

<meta http-equiv="Content-Type" content="text/html; charset={$smarty.const.CHARSET}" />
<meta http-equiv="Content-Language" content="{$smarty.const.CART_LANGUAGE|lower}" />
{if $controller == "index"}
	<meta name="description" content="{$meta_description|default:$lang.home_meta_description}" />
	<meta name="keywords" content="{$meta_keywords|default:$lang.home_meta_keywords}" />
{else}
	{if $meta_description != ""}
		<meta name="description" content="{$meta_description}" />
	{/if}
	{if $meta_keywords != ""}
		<meta name="keywords" content="{$meta_keywords}" />
	{/if}
{/if}

This was on the old 2.0.12 version of the cart but just thought I'd share what I had to do to make it not auto-generate the meta tags.