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

Hello, on our b2b 2020.9 shop we use product bundles. The stock + availability depends on the stock

UPWG9AYH2
UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet
edited November 2020 in Help

Hello,
on our b2b 2020.9 shop we use product bundles. The stock + availability depends on the stock of each bundled product which makes absolutely sense to me.

But since we dont want the single bundled products to be seen on the shop, we set them searchable=false and price = 0 (since they also don’t have a price when they are not sellable) … but the price for the bundle can be defined on the bundle itself. So i would expect that we see the price configured in the bundle.
Instead on the PDP, we get a price of 0 shown.

So my first guess for this was that the bundled products single prices are used for calculation instead of the bundle price, so i changed one of the bundled items price from “0” to “123".
Now we get an exception when adding this product bundle: “Invalid price given, natural integer expected.” (ProductBundleCartExpander:283)
It seems that spryker is now iterating over each single item and each must have a price > 0. Since the other bundled products still have “0", the exception appears.
When i change every single item to a price > 1, than i get the expected bundle price on PDP/Cart …

Is this expected behaviour? Why do single item prices gets involved at all when we have a bundle price?

Best

Comments

  • Jeremy Fourna
    Jeremy Fourna Lead Product Manager Posts: 130 🧑🏻‍🚀 - Cadet

    Hello @UPWG9AYH2 we distribute the product bundle price on each bundled items when the order is placed, this might be why you need to have proper price defined on them as well. We use the difference in prices to distribute the right proportion there.

  • Jeremy Fourna
    Jeremy Fourna Lead Product Manager Posts: 130 🧑🏻‍🚀 - Cadet

    In you case, it will be better to define the product bundle as a regular price and do not create in Spryker the bundled items since you do not want to display them in the storefront. You will need in this case to calculate the stock properly before importing it in Spryker so a bit more work there.

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet

    We create that bundles with the spryker importer at the moment, but i dont understand why the prices are distributed over the single items again? So is it enough to just set them as 1 EUR each and spryker cares about the distribution for calculation? Or what should we insert for the prices of each bundled item?