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..
Is it somehow possible to move only the whole order in the OMS if a condition is met? Imagine havin
Is it somehow possible to move only the whole order in the OMS if a condition is met?
Imagine having an order with multiple items and an OMS transition from new
to paid
with the condition IsPaid
. The oms:check-condition
starts to check the condition for the first item, but it's false
at this moment. The process picks the next item. In the meantime, the notification arrived and suddenly all remaining items from that order are in the paid
state, but the first one is still in new
. Any ideas on how to solve this?
I already tried to couple that condition with an empty command that implements CommandByOrderInterface
, but this does not work as expected.
Comments
-
Hi, yes it is possible. You can create a command which implements
CommandByOrderInterface
or you can also create an external event processor.0 -
Thanks for your answer, are you talking about this package: https://packagist.org/packages/fond-of-spryker/oms-external-processor ? Is there any kind of documentation except the Readme?
0 -
This package is our implementation and only a wrapper for execution our plugins like https://packagist.org/packages/fond-of-spryker/oms-external-processor-payone
0 -
I can try to answer your questions if you got some
0 -
I'm not sure if we really want to use that, it has no release yet, there is no CI configured and the last commit is more than a year old. I'll try this out anyway and see if that can solve our problem.
0 -
As far as I see, the module
fond-of-spryker/oms-external-processor-payone
is not really restricted to payone, but could also be used as a general module for all kinds of use-cases, is that right? I did not found anything that is specific for payone in the code at least.As far as I understand this it's only possible to use that for one
source
andtarget
combination or did I miss something?So maybe we will build our own module on top af the wrapper, that handles our use-case, but wouldn't it make much more sense to be able to have some sort of
ConditionByOrderInterface
that checks a condition not by order-item, but only by the whole order?0 -
It has no release, since we started to move our packages to new namespace (fond-of-oryx).
We had the problem that sometimes the order export was splitted since the payone response was also splitted.
For this we did the external processor and the payone plugin.
if i remember correctly, you can use it for other cases too, just configure the oms state and event name. By default it use the payone default for our oms configuration
0 -
I think my first try was with
CommandByOrderInterface
but without success since it did not work as expected0 -
Hi Alfred.
One can work around the issue of per-item conditions by exploiting Propelβs feature of virtual columns. All items in an OMS execution belonging to the same order also share a reference to the same
SpySalesOrder
object. This means that you can perform the actual condition check when called for the first item of the respective order, store the checkβs result in the associatedSpySalesOrder
object as a virtual column and then return this stored / cached result for all the other items of the same order.Note, however, that this virtual column may then also affect subsequent transitions and condition checks of that order, until the containing
SpySalesOrder
object is garbage collected.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