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

Manage nice url for products displayed in virtual categories when the… #227

Closed

Conversation

romainruaud
Copy link
Collaborator

… category path should be applied to URLs

Implements #66

@afoucret
Copy link
Contributor

afoucret commented Dec 1, 2016

@romainruaud : Build have failed. Can you check please.

@romainruaud romainruaud force-pushed the feature_virtual-categories-urls branch from eef809f to c3304c8 Compare December 1, 2016 11:14
@romainruaud
Copy link
Collaborator Author

My bad.

I refactored this one and build is now OK.

Let me know

@afoucret
Copy link
Contributor

afoucret commented Dec 1, 2016

Thx, I will review this one carefully before merging.

@romainruaud
Copy link
Collaborator Author

For me it's impossible to use the Product\Url model to retrieve the Url of product instead of using the getUrlKey() :

  • The product Url model will try to load from url_rewrite with the product/category couple and will fail
  • The product Url model returns a "full Url" and not a raw "request path"

However, I have added a method to prevent the case where the product does not have any url_key (or when the attribute is not used in the listing) to fallback to the standard catalog/product/view/id pattern.

Regards

@romainruaud romainruaud force-pushed the feature_virtual-categories-urls branch from 2593db8 to 0d2a0e3 Compare December 5, 2016 09:25
@afoucret
Copy link
Contributor

afoucret commented Dec 5, 2016

Hi @romainruaud,

I have tested this development and there seems that there is an important test case you did not manage. The following example should be enough to understand it.

I have a virtual category (v1) inside another category and a product matching the rule.
So the product URL will be http://mysite/c1/v1/product.html.
But as every category is anchor in ElasticSuite, the product URL may be http://mysite/c1/product.html. This case seems to be missing especially if c1 is not a virtual category.

@afoucret
Copy link
Contributor

afoucret commented Dec 5, 2016

Aditionnaly you will have to rebase the branch since there is a conflict with the #231 patch in the frontend/di.xml file

@romainruaud romainruaud force-pushed the feature_virtual-categories-urls branch from 0d2a0e3 to 58a692d Compare December 5, 2016 10:08
@afoucret afoucret modified the milestones: 2.3, 2.4 Jan 4, 2017
@afoucret
Copy link
Contributor

This PR is outdated now.
Closed.

@afoucret afoucret closed this Jan 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants