File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
app/code/Magento/SalesRule/Observer Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change 9
9
10
10
use Magento \Framework \Event \Observer ;
11
11
use Magento \Framework \Event \ObserverInterface ;
12
- use Magento \Multicoupon \Model \Config \Config ;
13
12
14
13
/**
15
14
* Class for process order for resetting shipping flag.
16
15
*/
17
16
class ProcessOrderCreationDataObserver implements ObserverInterface
18
17
{
19
- /**
20
- * @param Config $multiCouponConfig
21
- */
22
- public function __construct (private Config $ multiCouponConfig )
23
- {
24
- }
25
-
26
18
/**
27
19
* Checking shipping method and resetting it if needed.
28
20
*
@@ -38,8 +30,7 @@ public function execute(Observer $observer)
38
30
$ isVirtualQuote = $ quote ->isVirtual ();
39
31
$ quoteShippingMethod = $ observer ->getEvent ()->getShippingMethod ();
40
32
$ checkIfCouponExists = array_key_exists ('coupon ' , $ request ['order ' ]);
41
- $ noOfCouponsAvailable = $ this ->multiCouponConfig ->getMaximumNumberOfCoupons ();
42
- if (!$ isVirtualQuote && !empty ($ quoteShippingMethod ) && $ checkIfCouponExists && $ noOfCouponsAvailable <= 1 ) {
33
+ if (!$ isVirtualQuote && !empty ($ quoteShippingMethod ) && $ checkIfCouponExists ) {
43
34
$ shippingAddress = $ quote ->getShippingAddress ();
44
35
$ shippingAddress ->setShippingMethod ($ quoteShippingMethod );
45
36
}
You can’t perform that action at this time.
0 commit comments