Sylius: [RFC] (root) Taxon with children taxons behavior in listing

Created on 1 Nov 2016  ·  13Comments  ·  Source: Sylius/Sylius

⚠️ 🛣 This issue is a part of the Sylius Public Roadmap 🛣 ⚠️

Preconditions:

  • I have 3 taxons like this:

    • TShirts



      • Men


      • Women



  • I have 4 products where Men taxon is assigned
  • I have 8 products where Women taxon is assigned

Steps to reproduce:

What happens:

  • there is no product

What I think it should happen:

  • see all the 12 products assigned to the children taxons of T-Shirts

image

image


We have implemented such a behavior here, based on ElasticSearch:

Feature RFC Roadmap

Most helpful comment

I believe this was not fixed the right way. Any product listing of a parent taxon must automatically include products from all its children. It is counter-intuitive and error prone for the user to have to manually add products from child taxons directly to the parent taxon. And it's especially problematic when you have a more nested hierarchy.

All 13 comments

@pjedrzejewski isn't this supposed to be already available for testing on http://demo.sylius.org/ ? how often do you deploy?

The demo will be updated tomorrow to the 1.0.0-beta release 🎉 . After that we will deploy on each release.

I believe this was not fixed the right way. Any product listing of a parent taxon must automatically include products from all its children. It is counter-intuitive and error prone for the user to have to manually add products from child taxons directly to the parent taxon. And it's especially problematic when you have a more nested hierarchy.

And putting the / in the taxon slug is an ugly hack that is again very error prone. Imagine you have tens or hundreds of child taxons, and if you rename or change the slug of the parent taxon, you'll have to then make sure to update the slug for each child taxon?

I agree with @teohhanhui as the current behaviour has always been counterintuitive to me and AFAIK all Sylius' ElasticSearch plugins on the market solve this problem.

I'm reopening this issue and tagging it as a feature, because the current behaviour has existed for so long that fixing it to show nested products could be a BC break for some.

As for the second comment, could you make a separate issue for that?

To me, the two comments are about the same issue.

is it available for testing on demo.sylius.org?

Not yet, you should probably need to wait for the next release.

Would be great to have a demo preview of master branch though :)

I totally agree too, I just don't have a time for it right now :)

Brace yourself, @bartoszpietrzak1994 saved the day with a PR to our demo :D https://github.com/Sylius/SyliusDemo/pull/49

And it is done :)

Was this page helpful?
0 / 5 - 0 ratings