Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve incompatibility between canonical redirections, attributes and product route not only containing rewrite #7775

Merged
merged 2 commits into from Mar 16, 2018

Conversation

@123monsite-regis
Copy link
Contributor

commented Apr 12, 2017

Questions Answers
Branch? 1.7.1.x
Description? resolve incompatibility between canonical redirections, attributes and product route not only containing rewrite (2 bugs related)
Type? bug fix
Category? FO
BC breaks? no
Deprecations? no
Fixed ticket? http://forge.prestashop.com/browse/BOOM-3000
How to test? see bellow please

How to test :

  • enable canonical redirection if not enebled,
  • use a custom road to product on seo configuration, or default one ({category:/}{id}{-:id_product_attribute}-{rewrite}{-:ean13}.html)
  • fill the field ean13 on one product having combinations,
  • go to this product on front office

Bugs :

  • first one, you can not select another combination than default one and buy it, "product refresh" after choosing another combination return always the default combination.
  • canonical redirection of non-default attribute redirect you to default attribute ( no way to reach the non default atttribute on FO product page)

Correction

  • try to apply this commit ;)

This change is Reviewable

@123monsite-regis

This comment has been minimized.

Copy link
Contributor Author

commented Apr 12, 2017

mmm, i does not know why travis check have failed, PHP: 5.4, no environment variables set

@xBorderie

This comment has been minimized.

Copy link
Contributor

commented Apr 28, 2017

Checks are passing now, somehow :)

@aleeks aleeks changed the base branch from 1.7.1.x to develop May 18, 2017

@eternoendless eternoendless added the Bug label Jun 22, 2017

@kpodemski

This comment has been minimized.

Copy link
Contributor

commented Mar 2, 2018

@eternoendless eternoendless changed the base branch from develop to 1.7.3.x Mar 2, 2018

123monsite-regis and others added 2 commits Apr 12, 2017
FO: resolve incompatibility between canonical redirections, attribute…
…s and product route not only containing rewrite

@eternoendless eternoendless force-pushed the 123monsite-regis:patch-14 branch from 3a28694 to 15e1a4c Mar 2, 2018

@eternoendless eternoendless added this to the 1.7.3.1 milestone Mar 2, 2018

@marionf

This comment has been minimized.

Copy link
Contributor

commented Mar 13, 2018

@marionf marionf added QA ✔️ and removed waiting for QA labels Mar 13, 2018

@eternoendless

This comment has been minimized.

Copy link
Member

commented Mar 16, 2018

Thank you @123monsite-regis

@eternoendless eternoendless merged commit 0c12adc into PrestaShop:1.7.3.x Mar 16, 2018

2 of 3 checks passed

code-review/reviewable 1 file left
Details
Codacy/PR Quality Review Good work! A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@matteolavaggi

This comment has been minimized.

Copy link

commented Apr 1, 2019

Hi, same problem in PS 1.7.2, but the FrontController.php is complete different, so i need to replace with this or why still same problem in 1.7.2?

Thanks

Take a look example here:
https://store.sixrace.it/it/protezioni-mani/71612-brake-guard-race-pramac-racing-limited-edition-protezione-leva-freno-anteriore.html

Same result using the default ProductController.php or the edited one. After selecting the attribute, product redirect to default one

@PierreRambaud

This comment has been minimized.

Copy link
Contributor

commented Apr 1, 2019

Hi @matteolavaggi

As you can see, this one has been fixed on 1.7.3.1, so the problem should be still on 1.7.2.
You need to use a recent version to get this fix for your shop.

Kind regards,

@matteolavaggi

This comment has been minimized.

Copy link

commented Apr 1, 2019

Hi dear, update PS is not possible, nor using 1 click upgrade , nor using manual upgrade, so there is not safe solution for version upgrade, there is no way to fix this problem without a complete ugprade (that does not work using 1 click upgrade or other tutorial) ..?!

If i disable apache multiview option i'll get this answer:
Keyword "{id_product_attribute}" required for route "product_rule" (rule: "{category:/}{id:-}{rewrite}.html")

@matteolavaggi

This comment has been minimized.

Copy link

commented Apr 1, 2019

Maybe i've found a solution.
Apply the productcontroller.php with the fix. Next go on SEO , you WILL NOT see any allert, hit save, you now get the red allert. Change the URL to include the :id_product_attribute somewhere (example {category:/}{id}{-:id_product_attribute}-{rewrite}). Hit save.

Try a product page with customization, now the url is updated when you change the default combinations.

@guigplt

This comment has been minimized.

Copy link

commented May 22, 2019

Hello,
I have the same problem on 1.7.5.1, but the commit is already done on this version.
And now the getIdProductAttribute() function is replaced by getIdProductAttributeByRequest().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.