1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* This file is part of the Spryker Commerce OS. |
5
|
|
|
* For full license information, please view the LICENSE file that was distributed with this source code. |
6
|
|
|
*/ |
7
|
|
|
|
8
|
|
|
declare(strict_types = 1); |
9
|
|
|
|
10
|
|
|
namespace Pyz\Zed\Sales; |
11
|
|
|
|
12
|
|
|
use Spryker\Zed\Sales\SalesConfig as SprykerSalesConfig; |
13
|
|
|
|
14
|
|
|
class SalesConfig extends SprykerSalesConfig |
15
|
|
|
{ |
16
|
|
|
/** |
17
|
|
|
* This method provides list of urls to render blocks inside order detail page. |
18
|
|
|
* URL defines path to external bundle controller. For example: /discount/sales/list would call discount bundle, sales controller, list action. |
19
|
|
|
* Action should return return array or redirect response. |
20
|
|
|
* |
21
|
|
|
* example: |
22
|
|
|
* [ |
23
|
|
|
* 'discount' => '/discount/sales/index', |
24
|
|
|
* ] |
25
|
|
|
* |
26
|
|
|
* @return array<string> |
27
|
|
|
*/ |
28
|
|
|
public function getSalesDetailExternalBlocksUrls(): array |
29
|
|
|
{ |
30
|
|
|
$projectExternalBlocks = [ |
31
|
|
|
'cart_note' => '/cart-note/sales/list', #CartNoteFeature |
32
|
|
|
'return' => '/sales-return-gui/sales/list', |
33
|
|
|
'cart_note_bundle_items' => '/cart-note-product-bundle-connector/sales/list', #CartNoteFeature |
34
|
|
|
'payments' => '/sales-payment-gui/sales/list', |
35
|
|
|
'sales_payment_details' => '/sales-payment-detail/sales/list', |
36
|
|
|
'giftCards' => '/gift-card/sales/list', |
37
|
|
|
'discount' => '/discount/sales/list', |
38
|
|
|
'refund' => '/refund/sales/list', |
39
|
|
|
]; |
40
|
|
|
|
41
|
|
|
$externalBlocks = parent::getSalesDetailExternalBlocksUrls(); |
42
|
|
|
|
43
|
|
|
return array_merge($externalBlocks, $projectExternalBlocks); |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @api |
48
|
|
|
* |
49
|
|
|
* @return bool |
50
|
|
|
*/ |
51
|
|
|
public function isHydrateOrderHistoryToItems(): bool |
52
|
|
|
{ |
53
|
|
|
return false; |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* @return bool |
58
|
|
|
*/ |
59
|
|
|
public function isOldDeterminationForOrderItemProcessEnabled(): bool |
60
|
|
|
{ |
61
|
|
|
return false; |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* @return bool |
66
|
|
|
*/ |
67
|
|
|
public function shouldPersistModifiedOrderItemProperties(): bool |
68
|
|
|
{ |
69
|
|
|
return true; |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* @return bool |
74
|
|
|
*/ |
75
|
|
|
public function useUniqueRandomIdOrderReferenceGenerator(): bool |
76
|
|
|
{ |
77
|
|
|
return true; |
78
|
|
|
} |
79
|
|
|
} |
80
|
|
|
|