Jump to content

Duplicate meta descriptions presta 1.4.5.1 - cart


Recommended Posts

I just swap old version of presta with new presta 1.4.5.1. But now I got problem with duplicate meta desription, short meta desription and duplicate title tags. At webmaster tools i have all this issues.

At duplicate meta desription i got links like this:

 

 

 

url_icon.png/avto-nalepke/498-dynamic.html

 

url_icon.png/cart?add&id_product=498&token=7e98304825b3665dae4e6230598624ce

 

And almost all product have two links, one for product and one for cart. And if I go to link cart I get to cart in shop. I try to solve this with no susses. In BO at SEO & URLs I translate cart to my language and Friendly URL and Automatically redirect to Canonical url are turn ON.

 

Short meta desription. How can i solve this? I have no idea.

 

Duplicate title tags I got links similar llike duplicate meta desription:

 

 

url_icon.png/cart?add&id_product=216&token=7e98304825b3665dae4e6230598624ce

 

url_icon.png/narava/216-roza-3.html

 

url_icon.png/narava/406-roza-3.html

 

First goes to cart, like I add this product to cart

Second link goes to product, which is god

Third link goes to product which was there in old shop. At old shop this product ID vas 406-roza-3.html, now this ID is for another product.

 

So please help me with this. What can I do to corect this?

post-140755-0-65845900-1331993216_thumb.png

Link to comment
Share on other sites

I remove translation for cart.php at BO at SEO & URLs now link does not exist but it is still at duplicate meta desription(webmaster tools). Come on someone have to know how can I solve this.

 

Now I try to add code from this topic: http://www.prestasho..._80#entry781158

 

Code is:

 

public static function getHomeMetaTags($id_lang, $page_name)

{

global $cookie;

 

/* Metas-tags */

$metas = Meta::getMetaByPage($page_name, $id_lang);

$ret['meta_title'] = (isset($metas['title']) AND $metas['title']) ? $metas['title'].' - '.Configuration::get('PS_SHOP_NAME') : Configuration::get('PS_SHOP_NAME');

$ret['meta_description'] = (isset($metas['description']) AND $metas['description']) ? $metas['description'] : '';

$ret['meta_keywords'] = (isset($metas['keywords']) AND $metas['keywords']) ? $metas['keywords'] : '';

$no_duplication = "";

if (self::getValue('orderby'))

$no_duplication .= self::getValue('orderby')." ".self::getValue('orderway');

if (self::getValue('p'))

$no_duplication .= ($no_duplication != ""?" #":"#").self::getValue('p');

if (self::getValue('n'))

$no_duplication .= ($no_duplication != ""?" ":"").self::getValue('n');

if ($no_duplication != "")

{

$ret['meta_title'] .= " (".$no_duplication.")";

$ret['meta_description'] .= " (".$no_duplication.")";

}

return $ret;

}

 

 

 

 

 

and

 

static public function completeMetaTags($metaTags, $defaultValue)

{

global $cookie;

$no_duplication = "";

if (self::getValue('orderby'))

$no_duplication .= self::getValue('orderby')." ".self::getValue('orderway');

if (self::getValue('p'))

$no_duplication .= ($no_duplication != ""?" #":"#").self::getValue('p');

if (self::getValue('n'))

$no_duplication .= ($no_duplication != ""?" ":"").self::getValue('n');

if ($no_duplication != "")

$no_duplication = " (".$no_duplication.")";

if ($metaTags['meta_title'] == NULL)

$metaTags['meta_title'] = Configuration::get('PS_SHOP_NAME').' - '.$defaultValue;

$metaTags['meta_title'] .= $no_duplication;

if ($metaTags['meta_description'] == NULL)

$metaTags['meta_description'] = (Configuration::get('PS_META_DESCRIPTION', intval($cookie->id_lang)) ? Configuration::get('PS_META_DESCRIPTION', intval($cookie->id_lang)) : '');

$metaTags['meta_description'] .= $no_duplication;

if ($metaTags['meta_keywords'] == NULL)

$metaTags['meta_keywords'] = Configuration::get('PS_META_KEYWORDS', intval($cookie->id_lang)) ? Configuration::get('PS_META_KEYWORDS', intval($cookie->id_lang)) : '';

return $metaTags;

}

Link to comment
Share on other sites

  • 1 month later...

I am on Prestashop 1.4.3 and also for my page Google Webmaster tools reports duplicate meta desription, short meta desription and duplicate title tags.

 

I installed tomerg duplicate url fix and the code Andrej1981 posted from previous discussions. What is your feedback? Are these changes successful or do I need to do anything else?

Link to comment
Share on other sites

For now changes are successful. But it is possibility that google need some time to replace old urls with new one. Because I was remove all old shop and uploaded new one. And I notice that some duplicate URLs was one URL from old shop and one from new shop. It took about one and half month that google remove old urls.

At the end I don't know if this code was help to me or not.

Link to comment
Share on other sites

The code would probably not help as google takes an small amount of links per time.

 

For example: If you have about 120 link it will take about 4 or 5 days to got them all scanned.

Now it does not only need to read but to delete aswell.

 

You have to be patient for all to come in right place.

Cheers Helldog!

Link to comment
Share on other sites

×
×
  • Create New...