Closed (fixed)
Project:
Commerce Core
Version:
8.x-2.x-dev
Component:
Promotions
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Oct 2018 at 12:28 UTC
Updated:
26 Apr 2020 at 11:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
istavros commentedComment #3
bojanz commentedThe expectation is that promotion don't run on orders without order items. We need to find out why that's not the case here.
Otherwise we'll need to fix more than just this plugin.
Comment #4
istavros commentedThen we should probably check this in the PromotionOrderProcessor::process() method.
Comment #5
istavros commentedComment #6
a.dmitriiev commented@istavros, maybe you have a custom order processor, that runs before promotion order processor, that removes order items? Because it was in my case, maybe just move your processor to work after promotions.
But also the patch is solving the issue and I think shop should not process the orders without order items.
Reviewed and tested.
Comment #7
a.dmitriiev commentedComment #8
a.dmitriiev commentedre-rolled the patch from #5, so it applies to version 2.17
Comment #9
jsacksick commentedI think we should add this check in OrderRefresh directly, inside the processors loop:
Comment #10
jsacksick commentedThe attached patch should address the issue differently (I check if the order has items after invoking each processor and break the loop if the order doesn't have items anymore.
Comment #11
jsacksick commentedActually, a return statement makes more sense since the loop on order items performed after the loop on processors doesn't even need to be evaluated.
Comment #13
jsacksick commentedCommitted the patch from #11.
Comment #14
jsacksick commented