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 all, I have another question about splitting items when an order is created, Just to make it more
Hi all, I have another question about splitting items when an order is created, Just to make it more interesting this time it is about bundle products. π
In our shop the products 'inside' a bundle product could be normal products that are buyable in the shop or products that only exist in that bundle (or other bundles) and are not buyable on their own. These last products have no prices so we had to adapt pub/sync to make those products available in Yves, but there will also be issues with add to cart and creating orders - when the order is split we will have products without prices in our order. Or we won't, because things will break before then π
We could extend all of the cart/order operations to make this work but it feels like there should be an easier way. Is there a way to avoid splitting the bundle in the order, for example?
Comments
-
Hi Rick π
The order item splitting logic comes from here: \Spryker\Zed\Sales\Business\SalesFacadeInterface::expandSalesOrder().
and the transformation itself happens here: \Spryker\Zed\Sales\Business\Model\Order\OrderExpander::applyItemTransformStrategyPlugin(). According to that, you would need to introduce your custom ItemTransformerStrategyPluginInterface which will (based on the product type bundle) skip the splitting and return item as-is, bypassing the standard qty-based splitting.0 -
but there will also be issues with add to cart and creating orders
here Iβm not sure.. if you have an item in your cart (bundle), that doesnβt have price - how do you calculate totals?
0 -
Hey Andrily, thanks we looked at the
ItemTransformerStrategyPluginInterface
for another feature but got some strange behaviour. I will try it again for the bundles.0 -
For bundle prices we want to only use the price on the bundle itself - the prices of the products inside are not relevant.
0 -
okay, got it! Makes sense. Not sure I can predict issues in this case, but if you have some - just let us know, we will find out something! Good luck π€
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random