Jump to content

How to remove id_product_attribute from product links?


Kerm

Recommended Posts

Hello, as i see in new version all product combinations have self page, like:

 

/en/blouses/2-7-blouse.html

/en/blouses/2-8-blouse.html

 

This is very, very bad for seo, this leads to content duplication...one product can have multiple links with same description.

  • Like 3
Link to comment
Share on other sites

Yes i have noticed that it in PrestaShop 1.7 but That is not big deal. You can configure your URL from Configure -> Shop Parameters -> Tarffic

0803ca29a7ad4879ad418559ad20d093.png

 

I have not tested your solution, but isn't removing this going to fail as the Id_product_attribute is a required keyword, indicated by the asterisk?

  • Like 2
Link to comment
Share on other sites

I just thought about this a bit more, and can't we rewrite this into,

{category:/}{id}-{rewrite}{-:ean13}.html{#:id_product_attribute}

In that case, the product attribute would use an anchor tag, which Google interprets as being on the same page (same canonical URL) - this'd solve the duplicate content problem, and is indeed also the way PrestaShop used to do attributes pre-1.7.

 

Now, I've not tested this, but could any of your guys give it a go? :)

Edited by Apium (see edit history)
Link to comment
Share on other sites

I just thought about this a bit more, and can't we rewrite this into,

{category:/}{id}-{rewrite}{-:ean13}.html{#:id_product_attribute}

In that case, the product attribute would use an anchor tag, which Google interprets as being on the same page (same canonical URL) - this'd solve the duplicate content problem, and is indeed also the way PrestaShop used to do attributes pre-1.7.

 

Now, I've not tested this, but could any of your guys give it a go? :)

 

We have already attribute parameters after hash tag in link:

 

/en/blouses/2-7-blouse.html#/1-size-s/11-color-black

 

Dunno how it will work with this.

 

Btw: The route {category:/}{id}-{rewrite}{-:ean13}.html{#:id_product_attribute} is not valid

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

I think it is good thing to have attribute in url, because it selects right product image. For example if I import combinations with each different image, then when I first load product page it shows all the images (duplicated images from all combination). But now with attribute in url it shows only for example red dress and not all the colors. I was missing this in PS 1.6

Link to comment
Share on other sites

I think it is good thing to have attribute in url, because it selects right product image. For example if I import combinations with each different image, then when I first load product page it shows all the images (duplicated images from all combination). But now with attribute in url it shows only for example red dress and not all the colors. I was missing this in PS 1.6

 

Mate this feature was from 1.5 version and for this no need to put attribute id in url, we can use hash tag for it.

Link to comment
Share on other sites

  • 4 months later...

I have the same problem, I am using PS 1.7.0.2 and I want to use my old name "{id}-{rewrite}.html", because the URLs of products are indexed in Google and it is no possible make a redirection of more than 1000 products in htaccess.

This problem continues in the new version PS 1.7.0.5?

Any suggest?

Any module to fix?

Thanks

Link to comment
Share on other sites

  • 4 weeks later...

That is a really bad news.
 
That pushes me reconsidering whether using PrestaShop or not.
 
No any client of me is going to accept bad SEO, hundreds of URLs ...
 
Any help is appreciated to fix this.
 
 

We won't work on that specific point on the core of Prestashop, but this is something that can be improved with this module : 
https://addons.prestashop.com/fr/seo-referencement-naturel/25758-seo-performance-url-cleaner.html
Thanks for your report


http://forge.prestashop.com/browse/BOOM-2737

Edited by Malemi (see edit history)
Link to comment
Share on other sites

Just opened a new bug report on Forge:

 

http://forge.prestashop.com/browse/BOOM-2804

 

 

Hello,

Please, hover on any product link, e.g. PS 1.7. website homepage or any category page, you may see as products URLs links show "default combination" in product URLs, please look at pic attached.

On the contrary PS 1.6 does show clear URL: please look at pic attached > each combination is being added using a hash tag following the URL and not any combination is being showed in page links.

This is bad for SEO not only because of multiple product URLs but also because we might switch among product default combinations depending on stock or sales.. etc. this resulting in a different product URL for SEO positioning once we set a new default combination for the same product.

I would say URLs should be unique, does not matter default combination or extra combinations for each products.

Might you please explain which reasons lead you to set this behaviour for products combinations links and URLs?

Thank you

 

Link to comment
Share on other sites

Anyone interested, just posted a reply on Forge:

 

Please, give your point of view.

 

Thank you

 

 

Thank you Vincent, Marcos for following this up.

URLs positioning is so worrying, that makes this issue so urgent in my opinion.

As Marcos wrote: "The urls must be immutable even if we change characteristics of the product"

I have a client requiring me to switch to another ecommerce because of SEO reasons affecting PS 1.7, others client staying on PS 1.6 watching out.

Vincent, this seems a big problem, please be aware ot it!

Not only because of SEO, I also think about URLs sharing links on social network: what about me switching between default product combinations > URL is being changed and not redirected > big drop in web trafic because of link changes.

Also think about sitemap, lots of product duplication.

URl should probably keep immutable, product attributes should go following the URL "hash tag":

eg:

/en/blouses/2-blouse.html#1-size-s/11-color-black

instead of:

/en/blouses/2-7-blouse.html#1-size-s/11-color-black

What is exactly "7" number in the URL? It is not the id of product attribute. It is the combination id, isn't it?

Detailed explanations at forum PS thread https://www.prestashop.com/forums/topic/554789-how-to-remove-id-product-attribute-from-product-links/

Thank you!

PS: this issue is closely related with http://forge.prestashop.com/browse/BOOM-2737

 

Link to comment
Share on other sites

The problem is not solved yet!!! I can't believe it that presta team is taking it as it's a kiddy game!!! This is a seo matter!!!i can't launch my store with this problem..I took a look at the bug report and it's closed like it doesn't matter!!!

I don't want to buy a module to solve this issue cauz it's gonna be a big bullshit..all other platforms have a good friendly urls except presta 1.7.x!!

Edited by zebios (see edit history)
Link to comment
Share on other sites

prestashop product pages requires this param to properly identify the product's attributes change.

without the id of attribute in the url it is not possible to identify the selected combination, so in effect the combination selector will not work properly. this is how the prestashop is developed and how it works, its not an issue

 

The only one way to remove the id of product / id of attribute or both of them is a module that removes id numbers from urls. But before you will decide to order this kind of addon  you have to be sure that module supports prestashop 1.7 well, like mine pretty clean urls.

 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

Hello vekia,

 

Issue is not exactly id_product_attribute

 

Please have a look at URLs, we are talking about "7" number

 

We do not know what exactly is "7" number in URLs, I guess it is the combination_id

 

/en/blouses/2-7-blouse.html

/en/blouses/2-7-blouse.html#1-size-s/11-color-black

 

Green part is not a problem, as it works like on PS 1.6

Red is our issue

 

At the beginning of this thread we all believe issue is because of id_product_attribute.

 

Not exactly!

 

What is 7 number in combination URL ?

 

I guess is id of product combination.

 

combination_id, that is probably our issue!

 

Cannot believe nobody here is able to deeply look at something like this  :(  and give us a definitve answer.

 

Thank you

  • Like 1
Link to comment
Share on other sites

To better clear up this issue:

 

"7" number.. "8" number etc.

 

What exactly are they ?

 

 

 

/en/blouses/2-7-blouse.html
/en/blouses/2-8-blouse.html
 
This is very, very bad for seo, this leads to content duplication...one product can have multiple links with same description.

 

  • Like 1
Link to comment
Share on other sites

Hello vekia,

 

You had the opportunity to work out PS 1.7 in order to build up your addon, might you please tell us what exactly those red numbers are ?

 

They are not product ID, nor attribute ID, what are they?

 

Product ID is "2" number, blue colored in the following example.

Attribute ID are green number.

What exactly is red number on those URLs?

 

/en/blouses/2-7-blouse.html
/en/blouses/2-8-blouse.html
/en/blouses/2-8-blouse.html#/1-size-s/11-color-negro

 

 

prestashop product pages requires this param to properly identify the product's attributes change.

 

The only one way to remove the id of product / id of attribute or both of them is a module that removes id numbers from urls. 

Link to comment
Share on other sites

Hello vekia,

Issue is not exactly id_product_attribute

I think like Malemi, the problem is clear. Yes it is a issue that should be corrected or prestashop 1.7 will have very little success for anyone who knows a little SEO.

We repeat! Urls must be immutable

 

As i already mentioned this is id of selected combination so-called id-product-attribute (technical nomenclature). Product pages will not work properly without this id.

 

From 1.7 each avaialble combination of product has own separated url. Please go to product page, switch the color or other attribute, you will be redirected to other url with different id of combination.

if you will remove this param (id product combination) - prestashop will not work properly because you will not be able to switch the combinations on product page.

 

this is not an issue This is a part of core features, this is how prestashop 1.7 is developed and this will not be changed in upcoming releases of new PS versions (I just don't believe that this will be changed).

 

 

so at the moment you can alter this workflow with module like "pretty clean urls" to remove ID from urls. But be aware, not each module allows to remove all IDs like mine, so before you will decide to use some addon - ask developer if addon removes ID of combination too.

Link to comment
Share on other sites

Hi vekia,

Thank you for clear this up: confirmed, those red numbers are IDs of combination.
 

As i already mentioned this is id of selected combination so-called id-product-attribute (technical nomenclature). Product pages will not work properly without this id.



Question 1 is: why does PrestaShop 1.6 not use IDs of combination?
Question 2: is PrestaShop team aware of URLs duplication due to this issue ?

 

this is not an issue This is a part of core features, this is how prestashop 1.7 is developed

 

vekia: do you really think this is not a SEO issue ?

I mean, we are not talking this being a PrestaShop issue, obviously it is not a bug.

It is a SEO deep, very deep problem because of URLs duplication.

vekia: might you please give your point of view as far as this SEO problem ?

Thank you

Edited by Malemi (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Hello, 

 

Please, follow this link to check-out a Magento 2 demo and look how product combinations works:

 

http://magento2-demo.nexcess.net/hero-hoodie.html

 

Not any URL change as a client switches among product combinations.

 

That is far better for SEO !!

 

Why does PrestaShop 1.7 modify URLs as a client switches among combinations ?

 

Might someone give us a logical explanation ?

 

Thank you

 

Best regards

Link to comment
Share on other sites

Hello, 

 

Please, follow this link to check-out a Magento 2 demo and look how product combinations works:

 

http://magento2-demo.nexcess.net/hero-hoodie.html

 

Not any URL change as a client switches among product combinations.

 

That is far better for SEO !!

 

Why does PrestaShop 1.7 modify URLs as a client switches among combinations ?

 

Might someone give us a logical explanation ?

 

Thank you

 

Best regards

Don't even think to use 1.7.x this is a shitty version I'm telling you as a seo specialist..you'll harm your whole business..just use 1.6 or switch to another platform..the only explanation is that prestashop became greedy and it's all about selling the maximum of their shitty plugins..i'M using woocommerce right now and i'm totally satisfied

  • Like 1
Link to comment
Share on other sites

Don't even think to use 1.7.x this is a shitty version I'm telling you as a seo specialist..you'll harm your whole business..

 

I am starting feeling the same as you !

 

I had great expectations focused on PS 1.7  :(

 

Cannot believe PrestaShop not being able to fix this issue, cannot believe !

 

Thank for your feed-back zebios

Link to comment
Share on other sites

 

 

vekia: do you really think this is not a SEO issue ?

 

 

In my opinion this is not an issue, This is how prestashop is developed and to change the way of how it works it will be required to rebuild very large part of core, at the moment - in my opinion - it is not possible. And in my opinion it is not necessary. Read about canonical urls, prestashop uses this kind of feature to avoid DC.

Link to comment
Share on other sites

And in my opinion it is not necessary. Read about canonical urls, prestashop uses this kind of feature to avoid DC.

 

Thank you vekia.

 

Canonical is fine, we all know about it.

 

Canonical is for search engines (not all) not for web users! What about social links, web page links, etc ?

 

We need a unique URL for the same product because web users interacts with it, they are used to sharing as well as websites sharing, links, pingbacks, etc.

 

What do you think about a product variant being sold out? Any link to is going to be lost > big drop in web trafic because of link changes > bad SEO because of traffic and reputation lost.

 

What about switching among default combinations? URL is being changed and not redirected > big drop in web trafic because of link changes  > bad SEO because of traffic and reputation lost.

 

What about Default combination being showed in internal links? Please have a look at those pics http://forge.prestashop.com/browse/BOOM-2804

 

Canonical is just a way to talk with search engines.

 

vekia: you know, efficient SEO is not just about "canonicalization" and put "canonical" tag in head, SEO is much more nowadays.

 

Users is our real world, they are "our clients", our best SEO !

 

Why does WooCommerce, Magento and Shopify, why do they not change base-URLs behaviour?

 

Why does PrestaShop 1.6 behaves correctly?

 

For those reasons we need URLs to keep immutable even if we change product attributes.

  • Like 4
Link to comment
Share on other sites

Please, let me share with you how Shopify works product variants:

 

https://www.allbirds.com/products/mens-wool-runners

 

/products/mens-wool-runners

 

/products/mens-wool-runners?variant=40210878599

 

/products/mens-wool-runners?variant=22238446727

 

Base URL is not being changed because of product variants, they just add "?" followed by IDs

 

That is how PS 1.6 works: attributes following a "#".

 

Please have a look at attached pics: Shopify does use "canonical" tag BUT internal links are clean, those inetrnal links to product do not show any combinations (as per PS 1.7)

 

Please, go on this page and hover on menu internal links to any products: URLs are clean https://www.allbirds.com/

 

Do the same on PS 1.7, inernal links to products depend on default combination ( look at pics attached in this bug report http://forge.prestashop.com/browse/BOOM-2804 ) This is another big issue on PrestaShop 1.7 !

 

I think internal links to products should be to the canonical URL, not to default combination one ( please, look at attached pic showing PS 1.7 internal links to products).

 

Thank you

Greetings

post-915280-0-72976000-1494319704_thumb.jpg

post-915280-0-27426400-1494319705_thumb.jpg

post-915280-0-36762000-1494319713_thumb.jpg

Edited by Malemi (see edit history)
Link to comment
Share on other sites

Hello,

 

It is possible to do like spotify but with Prestashop : http://examplemyshop.com/category/[id-product]-rewrite.html?variant=[id_product_attribute]

(a rule like that : {category:/}{id}-{rewrite}{-:ean13}.html?variant={id_product_attribute} )

 

The thing is, is it really better ? The question mark is also part of url.

 

To have this behaviour : one change in database, two lines of codes and one rewriting rule if you want "variant=" not "id_product_attribute=" in your url.

 

Please, let me share with you how Shopify works product variants:

 

https://www.allbirds.com/products/mens-wool-runners

 

/products/mens-wool-runners

 

/products/mens-wool-runners?variant=40210878599

 

/products/mens-wool-runners?variant=22238446727

 

Base URL is not being changed because of product variants, they just add "?" followed by IDs

 

That is how PS 1.6 works: attributes following a "#".

 

Please have a look at attached pics: Shopify does use "canonical" tag BUT internal links are clean, those inetrnal links to product do not show any combinations (as per PS 1.7)

 

Please, go on this page and hover on menu internal links to any products: URLs are clean https://www.allbirds.com/

 

Do the same on PS 1.7, inernal links to products depend on default combination ( look at pics attached in this bug report http://forge.prestashop.com/browse/BOOM-2804 ) This is another big issue on PrestaShop 1.7 !

 

I think internal links to products should be to the canonical URL, not to default combination one ( please, look at attached pic showing PS 1.7 internal links to products).

 

Thank you

Greetings

Link to comment
Share on other sites

Hello,

 

It is possible to do like spotify but with Prestashop : http://examplemyshop.com/category/[id-product]-rewrite.html?variant=[id_product_attribute]

(a rule like that : {category:/}{id}-{rewrite}{-:ean13}.html?variant={id_product_attribute} )

 

 

Thank you _tech 

 

 

have been trying yours out:

 

{category:/}{id}-{rewrite}{-:ean13}.html?variant={id_product_attribute} 

 

Getting the following error:

 

:(

 

The route {category:/}{id}-{rewrite}{-:ean13}.html?variant={id_product_attribute} is not valid

 

Same as using "#" instead "of" ? (as on PS .6):

 

The route {category:/}{id}-{rewrite}{-:ean13}.html#{id_product_attribute} is not valid

 

:(

Edited by Malemi (see edit history)
Link to comment
Share on other sites

You'll have to change it manually in database : ps_configuration : "PS_ROUTE_product_rule".

Then go to category page, your links are now with ?variant=...

But if you look at the product page and select a combination, it doesn't work (product refresh).

Some work (in controllers) have to be done to get it working.

The # part is useless in ps 1.7 because Prestashop get the id_product_attribute in url before # part.

This was not the case in ps 1.6, some javascript read it and refresh product.

 

Thank you _tech 

 

 

have been trying yours out:

 

{category:/}{id}-{rewrite}{-:ean13}.html?variant={id_product_attribute} 

 

Getting the following error:

 

:(

 

The route {category:/}{id}-{rewrite}{-:ean13}.html?variant={id_product_attribute} is not valid

 

Same as using "#" instead "of" ? (as on PS .6):

 

The route {category:/}{id}-{rewrite}{-:ean13}.html#{id_product_attribute} is not valid

 

:(

Link to comment
Share on other sites

You'll have to change it manually in database : ps_configuration : "PS_ROUTE_product_rule".

Then go to category page, your links are now with ?variant=...

But if you look at the product page and select a combination, it doesn't work (product refresh).

Some work (in controllers) have to be done to get it working.

The # part is useless in ps 1.7 because Prestashop get the id_product_attribute in url before # part.

This was not the case in ps 1.6, some javascript read it and refresh product.

 

 

Hi _tech

 

Thanks for helping us!

 

Me, I am not able to get this working, do not know how to modify controllers and BD.

 

Any help is appreciated

 

Anyway a big thanks to you, _tech !

 

Let me please stress our requirements to PrestaShop team in order to fix product URLs for PS 1.7 as soon as possible.

 

Guys, please go deep in this, uniques URLs is a must, users play with URLs, sharing, linking, talking around there, etc.

 

The more URLs are clean, the better are getting around !

 

Thank you

Edited by Malemi (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...
On 5/20/2017 at 2:34 AM, coworkingcaf3 said:

We have found a solution with this mod.

Maybe it may be useful.

LINK TO PIRATED ADDON REMOVED

 

 

Hello this is realy work ? ai already buy one module from addons.prestashop.com and isn`t working...

 

prestashop 1.6 i can say is worst (nothing works from first time and need support for everthing) but 1.7.X is more worst, in my opinion is a superficial work, with greedy intenstions...

 

X.co/women/dresses/casual-dresses/rochie-imprimata?id_product_attribute=13#/1-marime-s/13-culoare-portocaliu 

 

this is how it look the url after the clean url plugn instal... :) if that it`s ok with SEO, with user can`t be more bad ;)

 

ps. mobile ad to cart is not working for me...

ps.2 It`s a fresh copy of 1.7.1.2 prestashop

Link to comment
Share on other sites

Hi, for us the mods work fine. On the developer site, you can try a demo for ps 1.6 and one for ps 1.7.1.1. And if you have problems you have 30 days of free support. Be refunded if you prove to have serious problems not due to conflicts with other modules.

Link to comment
Share on other sites

  • 2 months later...
Hello everyone, i was building my new store on 1.7 but as i saw this UGLY urls in categories... The only thing I thought in that moment was "WTF IS THIS"?

 

I really cannot believe and understand that the developers of the prestashop team are so dumb, aren't they?

 

This topic is here for months, devs just said -> it is ok ... and it is done... Are they really think that ppl are stupid? There are other and many things i don´t like in PS 17. ,yes there are also thing which i like, but.. This SEO problem is really strange and i cannot accept it.

 

What do you think guys? Is there any news about this problem? Do you think if i will stay with 1.6 is it a good idea? (I already have 2 shops on 1.6 version)

 

My opinion is that if the developers do not fix this problem, Prestashop is burying itself

 

Thanks :)

Edited by Kaper (see edit history)
  • Like 1
Link to comment
Share on other sites

this is not a prestashop's issue and this is not a seo problem. there is canonical url markup for products - from technical and from seo point of view it is developed correctly. There is nothing to "solve" in this matter.

 

I am not from prestashop team, i'm independent developer

  • Like 1
  • Haha 1
Link to comment
Share on other sites

  • 3 weeks later...

this is not a prestashop's issue and this is not a seo problem. there is canonical url markup for products - from technical and from seo point of view it is developed correctly. There is nothing to "solve" in this matter.

 

I am not from prestashop team, i'm independent developer

There IS a BIG SEO issue, because canonical url points on address, that redirects to default combination page.

Google DOES NOT show pages with redirect in search results page, so that rel canonical is pointless.

If you use PS1.7 as is, your product pages will disappear from search results, causing more frequent search queries (which are intended to categories) to loose their rankings.

Go ahead to SEO thread, there are a lot of posts about sites loosing their rankings after upgrade to PS1.7

Edited by fortuner (see edit history)
Link to comment
Share on other sites

 

but it does show pages where prestashop redirects, am i right? (i am not seo guy but developer)

 

Google wants to show the only one page, which is canonical.

Prestashop 1.7 redirects from product's canonical page to default combination page.

The default combination page has the canonical tag, that points to the previous page.

So what we get here is a soft redirect loop, useless canonical tag on product page and ranking loss.

Here:

http://forge.prestashop.com/browse/BOOM-3762

 

P.s. I'm SEO guy

Edited by fortuner (see edit history)
Link to comment
Share on other sites

Hello,
 
I am in the process of finalizing my shop in 1.7 and I meet a major issue.
 
I managed to put my declensions with attributes for my products (and in one language because impossible in both FR and EN, one crushes each other each time) but the URLs are still problematic.
 
Indeed, when I am on a product page and I change my language (on top of website), it returns an ERROR of type 404 => the page does not exist.
 
I think the error is related to the declensions and construction of the url.
 
Example: https://fiesta-masco...teur_fan-non_no
 

 

Have you ever encountered this error?
 
Any help is welcome.
 

 

Thank you
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 3 weeks later...
  • 4 weeks later...
On 12/26/2017 at 1:24 AM, coworkingcaf3 said:

this is a solution: LINK TO PIRATED ADDON REMOVED

 

This solution works, unless you list also the combinations on your listings (for example colours, like we all do). In that case, a user clicks on a colour and goes to the default combination, no matter which color they click on. If you check on your demo store you'll see. 

 

LINK TO PIRATED ADDON REMOVED

 

click on the color blue of the first product, you'll see.

Link to comment
Share on other sites

  • 4 weeks later...

The module works just great thank you..Guys, avoid at any cost to use the default shitty urls of PS 1.7 even you use this module or you switch to 1.6...It's just a disaster..I'm a SEO specialist and this disaster is from newbies developers..If you use this version just check with google search bar, just put any full url product for example http://fo.demo.prestashop.com/en/casual-dresses/3-13-printed-dress.html you will see two duplicated pages with no canonical :

http://fo.demo.prestashop.com/en/casual-dresses/3-13-printed-dress.html

And

http://fo.demo.prestashop.com/en/casual-dresses/3-printed-dress.html

Both are accessible and both indexed..Of course the PS team have no-indexed their demo so you can't check with it..This is a shitty bullshit..

 

My message to PS Team : Shame on you, you make a billion dollars with this software and you can't even hire a SEO expert to give you recommandations..SEO is the heart of every e-commerce i don't give a shit on how you beautifully design the store or the features you integrate, you have to study SEO before developping anything or, beleive me, you will loose all those who are already using PS 1.7 when they will have a slap in the ass from Google..I'm warning you

  • Like 1
Link to comment
Share on other sites

On 5/3/2017 at 7:04 PM, Malemi said:

Hi,

 

Here it is how WooCommerce works:

 

Product variations (i.e. combinations) DO NOT cause any change on URLs, neither on URLs internal links

 

Not any URL duplication, much better for SEO.

 

Please, try yourself:

 

http://demo.woothemes.com/storefront/product/blue-checked-shirt/

 

 

Because things like this im migrating to Woocommerce.

 

Bad for Prestashop that going to turn 100% cashable!

Link to comment
Share on other sites

Hi guys,

 

I see their is no satisfying answer to this post. Quite alarming !

I'm not sure i've got the same issue as detailed by Kerm.

 

Presta 1.7 does add the attribute id to my url :

www.site.com/product_id-attribute_id-product_name.html

But,

it only creates one url for all declinations.

I'm selling products with different sizes. For example, if the 1st size is 1.2m, the URL would be as follow : 

www.site.com/product_id-attribute_id-product_name.html#/143-size-12m

And,

if i choose a different size in the dropdown list, let's say the 1.5m, i still have the same URL...

(For instance, on PS1.4, it would have changed the end of the URL to : #/size-15m)

 

1) I'm considering buying an URL cleaner module, but would i be able to recreate my URLs exactly the way they are today ? :

www.site.com/product_id-product_name.html (without removing product ID ?) 

 

2) Is the new patch 1.7.3.0 gonna help in anything ?

 

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

Hi everybody,

Excuse me in advance, from my bad practice of English ... :)
I think I have a solution, for me it works.

1/ You must override the class Dispatcher.php (override/classes/Dispatcher.php) for removing id_product_attribute from the default route table

2/ Then you can edit the PS_ROUTE_product_rule parameter directly in database or from the form (/admin/index.php?controller=AdminMeta)

SELECT * FROM `ps_configuration` where name like '%PS_ROUTE_%'

sql.thumb.png.dc8f25ec41897e5677ef8afadee7c476.png

3/ it is also necessary to override ProductAssembler.php Prestashop class. Some modules rely on this class to present articles. (override/classes/ProductAssembler.php)

4/ And finally, override Link.php (override/classes/Link.php) for remove from getProductLink method the anchor

 

Here is an example of an url:

http://exemple.com/1-hummingbird-printed-t-shirt.html

proof.thumb.png.32c21e2e21f4ab5a1408aed8fc12014e.png

 

Thank you,
iradorn

Edited by iradorn
add img (see edit history)
  • Like 4
Link to comment
Share on other sites

On 29/4/2018 at 12:40 PM, iradorn said:

Hi everybody,

Excuse me in advance, from my bad practice of English ... :)
I think I have a solution, for me it works.

1/ You must override the class Dispatcher.php (override/classes/Dispatcher.php) for removing id_product_attribute from the default route table

2/ Then you can edit the PS_ROUTE_product_rule parameter directly in database or from the form (/admin/index.php?controller=AdminMeta)


SELECT * FROM `ps_configuration` where name like '%PS_ROUTE_%'

sql.thumb.png.dc8f25ec41897e5677ef8afadee7c476.png

3/ it is also necessary to override ProductAssembler.php Prestashop class. Some modules rely on this class to present articles. (override/classes/ProductAssembler.php)

4/ And finally, override Link.php (override/classes/Link.php) for remove from getProductLink method the anchor

 


Hey that would be cool to test, can you give an small tutorial?

I'm totally lost about what files must be edited.

Link to comment
Share on other sites

  • 4 weeks later...
On 03/05/2018 at 11:50 PM, Mike said:


Hey that would be cool to test, can you give an small tutorial?

I'm totally lost about what files must be edited.

 

I created a module to remove the id_product_attribute from urls. It works and is in the testing phase.
Contact me directly by private message if you want more information about it, or if you want to get this module.

Thank you,
iradorn

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

We're now at 1.7.4.1 version. How it is possible that attributes id it's still mandatory in product url?

To the prestashop developers... Also if you think that the attribute ids should be used into the urls, why don't you add the possibility to chose if using it or not?

You have not to remove it, in this way the user can decide their preferred setting.

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

Hi Guys,

 

I'm struggling with the same problem, I think it's ok to remove canonicals from head.tpl and product.tpl because you remove from google index duplicates with robots.txt.

I search my website with screaming frog and went from 30.000links to 5800 links. Now I found that these other ones are from the language switcher that is not pointing to the right direction and I wanna to ask If anyone went in this direction and how to solve it?

 

Thanks

Link to comment
Share on other sites

  • 2 weeks later...

Hi everyone,

I follow this topic with interest as I have the same problem on my shop and I've lost some traffic since I changed from 1.6 to 1.7. However, I don't understand something on this problem : if these moving URL are so bad for SEO, will a plugin like SEO FRIENDLY URLS (https://addons.prestashop.com/en/url-redirects/31273-seo-friendly-urls.html) which was presented just above resolve this problem? With this plugin, URL seams to be always the same.

 

Link to comment
Share on other sites

1.7 not only has a lot of "usability bugs", its SEO is a total mess as well. Attribute IDs are the least of your problems. 1.7 causes a lot of duplicate content problems by not providing proper canonical URLs, hreflangs, meta titles, etc etc

It is a total shame they hired the worst developers in the world. You should have a serious look at other software if you want to focus on effective SEO. It simply can't be done with newer prestashops.

 

Signed,

An exhausted ecomm manager.

Link to comment
Share on other sites

On 8/23/2018 at 12:35 AM, simon_lb said:

Hi everyone,

I follow this topic with interest as I have the same problem on my shop and I've lost some traffic since I changed from 1.6 to 1.7. However, I don't understand something on this problem : if these moving URL are so bad for SEO, will a plugin like SEO FRIENDLY URLS (https://addons.prestashop.com/en/url-redirects/31273-seo-friendly-urls.html) which was presented just above resolve this problem? With this plugin, URL seams to be always the same.

 

 

plugin you shared is a crap,
try to switch attribute on product page, you will see how "awesome" it is
i did not check the rest of things, but i guarantee that the devil is in the details as you can see with 'attribtues'.

Link to comment
Share on other sites

On 3/13/2018 at 9:17 AM, coworkingcaf3 said:

look at the comments ....X

Quote

Has anyone tried that?? -> PIRATED

This guy says that this module is capable of removing  id, and attribute_id also.

Don't know if it's true!

On 12/26/2017 at 1:24 AM, coworkingcaf3 said:

this is a solution: X

 

 

they stole the code, it is a pirated addon and i've got proofs.
from time to time users that use this addon receives a DMCA copyright notices.

 

our:
IMWziAU.png

 

"psit"

RMw1Gy5.png

 
  • Like 1
Link to comment
Share on other sites

12 minutes ago, PrestaRalph said:

Have you informed Prestashop?

 

They are useless in such cases, unfortuantely.They can't help, it is a case between my comapny and this thief from italy.
our lawyer sends dmca to shop owners that uses this plugin. I can't say more due to the pending proceedings.

Simply saying, they purchased mypresta.eu addon and then started o sell it.

these folks  are really fools, they only changed trademarks. LOL

our:
IMWziAU.png

 

"psit"

RMw1Gy5.png

  • Like 1
Link to comment
Share on other sites

Did anyone ever mesure the benefit of not having product ID in url? Even Amazon does it! If it was so bad, they will never have the chance to lead the online retail business along side of Ebay... or any other big never. If I were you, I would focus on crafting unique content for my product pages rather than hacking Prestashop native feature with the hope to rank higher!!!

Link to comment
Share on other sites

On 26/8/2018 at 9:59 PM, vekia said:

 

They are useless in such cases, unfortuantely.They can't help, it is a case between my comapny and this thief from italy.
our lawyer sends dmca to shop owners that uses this plugin. I can't say more due to the pending proceedings.

Simply saying, they purchased mypresta.eu addon and then started o sell it.

these folks  are really fools, they only changed trademarks. LOL

our:
IMWziAU.png

 

"psit"

RMw1Gy5.png

 

hello vekia. first I used your plugin found already installed on the site of one of my client. then I replaced your plugin with the psitsolution plugin. This plugin works perfectly and I've been using it on my clients' websites for over a year. bought once I can use it on all the sites I want. now I saw your posts. I checked and compared every file in the plugin but I can not find a match between yours and theirs. the code is different. what do you suggest me. thank you.

 

Link to comment
Share on other sites

2 hours ago, juan said:

 

hello vekia. first I used your plugin found already installed on the site of one of my client. then I replaced your plugin with the psitsolution plugin. This plugin works perfectly and I've been using it on my clients' websites for over a year. bought once I can use it on all the sites I want. now I saw your posts. I checked and compared every file in the plugin but I can not find a match between yours and theirs. the code is different. what do you suggest me. thank you.

 

 

They changed the code once I started to inform everywhere that they sell the addon I developed. They even inform about it on their page that someone copied they addon (LOL!) and because of this they changed the code. I do not know how the code looks like today, i just inform what this guy did previously.

Link to comment
Share on other sites

17 hours ago, vekia said:

 

They changed the code once I started to inform everywhere that they sell the addon I developed. They even inform about it on their page that someone copied they addon (LOL!) and because of this they changed the code. I do not know how the code looks like today, i just inform what this guy did previously.

OK thanks. my customers will be happy to know it. besides, I feel really good with that mod. thanks again for your kindness and availability.

Link to comment
Share on other sites

  • 1 month later...

Override file with the following should work? 

 

<?php
/**
 * 2007-2018 PrestaShop
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to [email protected] so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 * @author    PrestaShop SA <[email protected]>
 * @copyright 2007-2018 PrestaShop SA
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 * International Registered Trademark & Property of PrestaShop SA
 */

/**
 * @since 1.5.0
 */
class Dispatcher extends DispatcherCore
{

    /**
     * @var array List of default routes
     */
    public $default_routes = array(
        ...
		...
		...
        'product_rule' => array(
            'controller' => 'product',
            'rule' => '{category:/}{id}{-:id_product_attribute}-{rewrite}{-:ean13}.html',
            'keywords' => array(
                'id' => array('regexp' => '[0-9]+', 'param' => 'id_product'),
                'id_product_attribute' => array('regexp' => '[0-9\pL]*'),
                'rewrite' => array('regexp' => '[_a-zA-Z0-9\pL\pS-]*', 'param' => 'rewrite'),
                'ean13' => array('regexp' => '[0-9\pL]*'),
                'category' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
                'categories' => array('regexp' => '[/_a-zA-Z0-9-\pL]*'),
                'reference' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
                'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
                'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
                'manufacturer' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
                'supplier' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
                'price' => array('regexp' => '[0-9\.,]*'),
                'tags' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
            ),
        ),
        ...
		...

    );

}

 

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

Hi all,

Prestashop 1.7.5.0 still has this id_product_attribute mandatory in the URL. What is the reason? Why mandatory?

Did somebody has a solution to remove this is from URL?

I liked Prestashop at the beginning, but there are many things which came after as difficult behaviors or not explicable, like this one. What is the reason to implement such things? Why the PS team doesn't listen to the users requests?

Tks...

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 months later...
On 10/16/2018 at 6:35 PM, mathanganesh said:

Override file with the following should work? 

 


<?php
/**
 * 2007-2018 PrestaShop
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to [email protected] so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 * @author    PrestaShop SA <[email protected]>
 * @copyright 2007-2018 PrestaShop SA
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 * International Registered Trademark & Property of PrestaShop SA
 */

/**
 * @since 1.5.0
 */
class Dispatcher extends DispatcherCore
{

    /**
     * @var array List of default routes
     */
    public $default_routes = array(
        ...
		...
		...
        'product_rule' => array(
            'controller' => 'product',
            'rule' => '{category:/}{id}{-:id_product_attribute}-{rewrite}{-:ean13}.html',
            'keywords' => array(
                'id' => array('regexp' => '[0-9]+', 'param' => 'id_product'),
                'id_product_attribute' => array('regexp' => '[0-9\pL]*'),
                'rewrite' => array('regexp' => '[_a-zA-Z0-9\pL\pS-]*', 'param' => 'rewrite'),
                'ean13' => array('regexp' => '[0-9\pL]*'),
                'category' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
                'categories' => array('regexp' => '[/_a-zA-Z0-9-\pL]*'),
                'reference' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
                'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
                'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
                'manufacturer' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
                'supplier' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
                'price' => array('regexp' => '[0-9\.,]*'),
                'tags' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
            ),
        ),
        ...
		...

    );

}

 

 

Does it work for anyone?

 

Link to comment
Share on other sites

Hi folks

 

i've just installed last 1.7.6 Beta to check if they fixed this mess in Urls...but no way, problem is still there; we have multiple urls for same content and still those combinations id's in url....this is a SEO mess, imho.

i cannot have this url for same product.

/en/women/2-brown-bear-printed-sweater.html

/en/women/2-10-brown-bear-printed-sweater.html#/2-size-m

/en/women/2-11-brown-bear-printed-sweater.html#/3-size-l

and imagine what happen when you decide to delete a combination and that link is a backlink...you get a 404...

I hope that PS developers check this with max priority...why don't you adopt the url structure as ps 1.6?? 

I continue to stick with "old" ps 1.6 for sure!! or maybe the solution for ps 1.7 is to adopt a module to get rid of these id's....argh

sy

 

 

Link to comment
Share on other sites

Hello,

Actually everything is ok because PS17 generates canonical url in the head part. So Google knows that /en/women/2-10-brown-bear-printed-sweater.html#/2-size-m is just another page of /en/women/2-brown-bear-printed-sweater.html

You can see more infos here: https://support.google.com/webmasters/answer/139066?hl=en

The bad thing is that canonical url (/en/women/2-brown-bear-printed-sweater.html) is redirected with 301 or 302 code to default attribute product page. This is very bad because you say two differents informations to Google.

The PS1.7.6 will correct this point (https://github.com/PrestaShop/PrestaShop/pull/13009)

In controllers/front/ProductController.php replace line 55 with:

 public function canonicalRedirection($canonical_url = '')
    {
        if (Validate::isLoadedObject($this->product)) {
            if (!$this->product->hasCombinations() ||
                !$this->isValidCombination(Tools::getValue('id_product_attribute'), $this->product->id)) {
                //Invalid combination we redirect to the canonical url (with attribute id)
                unset($_GET['id_product_attribute']);
            } else {
                //Only redirect to canonical (parent product without combination) when the requested combination is not valid
                //In this case we are in a valid combination url and we must display it with redirection for SEO purpose
                return;
            }
            //Note: we NEED these 6 arguments to have $ipa=null or else a parameter will be added
            //id_product_attribute=0 and force the redirection
            parent::canonicalRedirection($this->context->link->getProductLink(
                $this->product,
                null,
                null,
                null,
                null,
                null,
                null
            ));
        }
    }

I think now the situation is ok.

You can test here: https://www.anakiss.fr/chaussons-en-laine-pour-bebe/11-chaussons-hauts.html

Olivier

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...

This issue really makes me want to change the platform.

Somebody says that it's not an issue and isn't bad for SEO, but somehow Google search does not show my products that have attributes (even when I enter whole link in google search). Also SEO Spider app shows all those products as "non-indexable".

Products without attributes are shown in search and are "indexable". 

And I checked a lot of different products. Couldn't find any of them on google which has attributes.

So this is a BIG problem and MUST be solved ASAP!

I wish I would have found this thread earlier. Now my e-shop is all set and I bought a theme and lots of modules!!! 

Edited by GreddyMR2 (see edit history)
Link to comment
Share on other sites

On 5/30/2019 at 5:55 PM, GreddyMR2 said:

This issue really makes me want to change the platform.

Somebody says that it's not an issue and isn't bad for SEO, but somehow Google search does not show my products that have attributes (even when I enter whole link in google search). Also SEO Spider app shows all those products as "non-indexable".

Products without attributes are shown in search and are "indexable". 

And I checked a lot of different products. Couldn't find any of them on google which has attributes.

So this is a BIG problem and MUST be solved ASAP!

I wish I would have found this thread earlier. Now my e-shop is all set and I bought a theme and lots of modules!!! 

Hello,

Yes product attributes are not indexable because of canonical url. But the main url is indexable if you add the code above to remove the 301 redirection.

Try to search on Google "site:anakiss.fr" you will see main product is indexed and attributes URLs are not. This is the good way to avoid duplicates content.

Olivier

Link to comment
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
×
×
  • Create New...