What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hi everyone, Currently in the b2b-demo-app, is there a way to get price as a filter option? I see we

U025NDD2QNA
U025NDD2QNA Posts: 42 πŸ§‘πŸ»β€πŸš€ - Cadet

Hi everyone,
Currently in the b2b-demo-app, is there a way to get price as a filter option? I see we get labels, brands and other attributes which are set as super attribute on category filter. However I was wondering how would we get a price range filter through catalog-search glue api.

Any pointers would be highly appreciated.

Comments

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    I'm not sure if it's correct but seems to work somehow. πŸ˜„
    https://glue.de.b2c.demo-spryker.com/catalog-search?q=&price%5Bmin%5D=902&price%5Bmax%5D=1864

    "rangeFacets": [
    {
    "name": "price-DEFAULT-EUR-GROSS_MODE",
    "localizedName": "Preis",
    "min": 0,
    "max": 345699,
    "activeMin": 90200,
    "activeMax": 186400,
    "docCount": null,
    "config": {
    "parameterName": "price",
    "isMultiValued": false
    }
    },
    
  • U025NDD2QNA
    U025NDD2QNA Posts: 42 πŸ§‘πŸ»β€πŸš€ - Cadet

    thanks Valerii. I’m referring to the b2b-demo-app

  • U025NDD2QNA
    U025NDD2QNA Posts: 42 πŸ§‘πŸ»β€πŸš€ - Cadet

    i think that’s where I dont see it 😞

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    Confirm, some plugin is missing then.

  • U025NDD2QNA
    U025NDD2QNA Posts: 42 πŸ§‘πŸ»β€πŸš€ - Cadet

    yea I think it’s just a missing plugin. could you point me in the right direction? thanks

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice
    edited July 2021

    Ah, I think I know the reason. Prices are hidden for not logged in customers. Have you tried to run same request with authorization token?

  • U025NDD2QNA
    U025NDD2QNA Posts: 42 πŸ§‘πŸ»β€πŸš€ - Cadet

    I just tried it but still get rating in rangeFacets

    "rangeFacets": [
                        {
                            "name": "rating",
                            "localizedName": "Product Ratings",
                            "min": 4,
                            "max": 4,
                            "activeMin": 4,
                            "activeMax": 4,
                            "docCount": null,
                            "config": {
                                "parameterName": "rating",
                                "isMultiValued": false
                            }
                        }
                    ]
    
  • U025NDD2QNA
    U025NDD2QNA Posts: 42 πŸ§‘πŸ»β€πŸš€ - Cadet
  • U025NDD2QNA
    U025NDD2QNA Posts: 42 πŸ§‘πŸ»β€πŸš€ - Cadet

    But I think youre right. I see that in the b2c app I see price filters:
    https://www.de.b2c.demo-spryker.com/en/computers
    But in b2b theyr’e not added by default.
    https://www.de.b2b.demo-spryker.com/en/stationery

    Where can I find more information to enable price filters?

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    Sorry, was wrong. Price filter is absent in b2b demo shop even for logged in users. Checking if this something that could be added in Zed then.

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    Nope. So will ask internally. πŸ™‚

  • U025NDD2QNA
    U025NDD2QNA Posts: 42 πŸ§‘πŸ»β€πŸš€ - Cadet

    thanks Valerii πŸ™‚

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    Ok, got internal feedback that price range filters are not supported in b2b at all, only in b2c.

  • U025NDD2QNA
    U025NDD2QNA Posts: 42 πŸ§‘πŸ»β€πŸš€ - Cadet

    That’s a shame Valerii. So what do we do if we need to pull in price range filters in the b2b app?

  • UKHD8KTMF
    UKHD8KTMF Posts: 393 πŸ§‘πŸ»β€πŸš€ - Cadet

    With b2b you have individual prices per customer and you actually load them when you get results from ES. In this scenario you can't have prices in ES and therefore you can't filter. At least not out of the box.

  • U025NDD2QNA
    U025NDD2QNA Posts: 42 πŸ§‘πŸ»β€πŸš€ - Cadet

    Thanks @UKHD8KTMF. But then we cannot have filters as we will only be fetching prices for a specific number of results