@@ -42,6 +42,7 @@ public partial class OrderController : PublicControllerBase
42
42
private readonly IPaymentService _paymentService ;
43
43
private readonly IShippingService _shippingService ;
44
44
private readonly ICountryService _countryService ;
45
+ private readonly OrderSettings _orderSettings ;
45
46
46
47
#endregion
47
48
@@ -57,7 +58,8 @@ public OrderController(
57
58
IOrderProcessingService orderProcessingService ,
58
59
IPaymentService paymentService ,
59
60
IShippingService shippingService ,
60
- ICountryService countryService )
61
+ ICountryService countryService ,
62
+ OrderSettings orderSettings )
61
63
{
62
64
_dateTimeHelper = dateTimeHelper ;
63
65
_pdfConverter = pdfConverter ;
@@ -69,6 +71,7 @@ public OrderController(
69
71
_paymentService = paymentService ;
70
72
_shippingService = shippingService ;
71
73
_countryService = countryService ;
74
+ _orderSettings = orderSettings ;
72
75
}
73
76
74
77
#endregion
@@ -366,6 +369,11 @@ private bool IsNonExistentOrder(Order order)
366
369
if ( ! Services . Permissions . Authorize ( Permissions . Order . Read ) )
367
370
{
368
371
result = result || ( order . StoreId != 0 && order . StoreId != Services . StoreContext . CurrentStore . Id ) ;
372
+
373
+ if ( _orderSettings . DisplayOrdersOfAllStores )
374
+ {
375
+ result = false ;
376
+ }
369
377
}
370
378
371
379
return result ;
0 commit comments