MP state machine condition check
Hello Spryker Community,
I am working on adding a condition in the Merchant Portal state machine. I created a custom condition, and it is working. However, inside my check method, I am not getting the relevant data in the parameters related to the order. Specifically, I need the order_item_id
to retrieve order details and perform the required logic.
Upon debugging, I noticed that the condition is being called through:
$conditionPlugin->check($stateMachineItemTransfer);
The StateMachineItemTransfer
being passed does not contain any order-related data that I can use to fetch the necessary details.
Has anyone encountered this issue before or found a way to include additional order-related data in the StateMachineItemTransfer
? Any insights or solutions would be greatly appreciated.
Thanks in advance!
Answers
-
Good morning, @bhupendra.doniwal !
Take a look at this code:
Merchant state machine operates with Merchant Order Items, and you can see here an example of locating the real order item from the $stateMachineItemTransfer.
0 -
Thank you for your reply.
I have already checked this thing but I am working on the condition and that does not contain any order details.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
- 930 Developer Corner
- 788 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