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..

πŸ‘‹ bundles - should the _stock_ be updated for bundles? or do we use only `spy_availbailtiy` for

UKGT7RC7P
UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

πŸ‘‹ bundles - should the stock be updated for bundles? or do we use only spy_availbailtiy for this?

Β«1

Comments

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    reason being, that the checkout pre-condition for Availbility uses spy_stock - oms_reservation, not availability

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    so the Zed\Availability pre-condition doesn't use spy_availabilility πŸ€”

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited June 2020

    and in our setup the bundle stock is always 0 (because it's a meta product)

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    so we can't checkout bundles

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    looks like we changed the business logic, previously the bundles wouldn't be part of the order

  • Jeremy Fourna
    Jeremy Fourna Lead Product Manager Posts: 130 πŸ§‘πŸ»β€πŸš€ - Cadet

    A product bundle β€œAvailability” is the result of the availability of the product inside of it (if you use the Spryker way for the bundles)

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    yes, it's just that we modified the logic it seems

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    so we can probably write a new checkout pre-condition that checks availability directly

  • Jeremy Fourna
    Jeremy Fourna Lead Product Manager Posts: 130 πŸ§‘πŸ»β€πŸš€ - Cadet

    I guess yes

  • Jeremy Fourna
    Jeremy Fourna Lead Product Manager Posts: 130 πŸ§‘πŸ»β€πŸš€ - Cadet

    what is the difference between the previous and new logic?

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited June 2020

    previously the bundle gets converted / splt into it's components at checkout (i think)

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    so only components (bundled products) would have the pre-condition check

  • Jeremy Fourna
    Jeremy Fourna Lead Product Manager Posts: 130 πŸ§‘πŸ»β€πŸš€ - Cadet

    ok

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    now we want to checkout the bundle itself

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited June 2020

    which has stock = 0, and not split the order

  • Jeremy Fourna
    Jeremy Fourna Lead Product Manager Posts: 130 πŸ§‘πŸ»β€πŸš€ - Cadet

    so it means removing your old logic and let the OOTB Spryker logic take over

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    really?

  • Jeremy Fourna
    Jeremy Fourna Lead Product Manager Posts: 130 πŸ§‘πŸ»β€πŸš€ - Cadet

    From what you wrote, to me will normally work except if the checkout process has been changed on other steps on your side.
    You can check with a fresh install of b2c or b2b demo shop the behavior

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited June 2020
  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    (i'm jumping in on this quite late, so not sure what the original behavior may have been)

  • Jeremy Fourna
    Jeremy Fourna Lead Product Manager Posts: 130 πŸ§‘πŸ»β€πŸš€ - Cadet

    so what exactly is your pre-condition is doing currently? Just exploding the bundle into as many cart item as bundled products?

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited June 2020

    the pre condition is validating that the bundle is "available"

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    where as previously it would have only checked each of the bundled products

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    i think my question would be: should bundles have stock of 0?

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet
  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited June 2020

    (bundle availability is updated in our system, but not stock)

  • Jeremy Fourna
    Jeremy Fourna Lead Product Manager Posts: 130 πŸ§‘πŸ»β€πŸš€ - Cadet

    If you use Spryker Bundles, stock at the product concrete level is useless

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    yes indeed.

  • Jeremy Fourna
    Jeremy Fourna Lead Product Manager Posts: 130 πŸ§‘πŸ»β€πŸš€ - Cadet

    the stock is build dynamically by the bundled products, same as the availability

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    yep