|
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
|
|
|
namespace Pyz\Zed\Sales; |
|
9
|
|
|
|
|
10
|
|
|
use Spryker\Zed\Sales\SalesConfig as SprykerSalesConfig; |
|
11
|
|
|
|
|
12
|
|
|
class SalesConfig extends SprykerSalesConfig |
|
13
|
|
|
{ |
|
14
|
|
|
/** |
|
15
|
|
|
* This method provides list of urls to render blocks inside order detail page. |
|
16
|
|
|
* URL defines path to external bundle controller. For example: /discount/sales/list would call discount bundle, sales controller, list action. |
|
17
|
|
|
* Action should return return array or redirect response. |
|
18
|
|
|
* |
|
19
|
|
|
* example: |
|
20
|
|
|
* [ |
|
21
|
|
|
* 'discount' => '/discount/sales/index', |
|
22
|
|
|
* ] |
|
23
|
|
|
* |
|
24
|
|
|
* @return array<string> |
|
25
|
|
|
*/ |
|
26
|
|
|
public function getSalesDetailExternalBlocksUrls(): array |
|
27
|
|
|
{ |
|
28
|
|
|
$projectExternalBlocks = [ |
|
29
|
|
|
'cart_note' => '/cart-note/sales/list', #CartNoteFeature |
|
30
|
|
|
'return' => '/sales-return-gui/sales/list', |
|
31
|
|
|
'comment' => '/comment-sales-connector/sales/list', |
|
32
|
|
|
'cart_note_bundle_items' => '/cart-note-product-bundle-connector/sales/list', #CartNoteFeature |
|
33
|
|
|
'payments' => '/payment/sales/list', |
|
34
|
|
|
'discount' => '/discount/sales/list', |
|
35
|
|
|
'refund' => '/refund/sales/list', |
|
36
|
|
|
]; |
|
37
|
|
|
|
|
38
|
|
|
$externalBlocks = parent::getSalesDetailExternalBlocksUrls(); |
|
39
|
|
|
|
|
40
|
|
|
return array_merge($externalBlocks, $projectExternalBlocks); |
|
41
|
|
|
} |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* @api |
|
45
|
|
|
* |
|
46
|
|
|
* @return bool |
|
47
|
|
|
*/ |
|
48
|
|
|
public function isHydrateOrderHistoryToItems(): bool |
|
49
|
|
|
{ |
|
50
|
|
|
return false; |
|
51
|
|
|
} |
|
52
|
|
|
|
|
53
|
|
|
/** |
|
54
|
|
|
* @return bool |
|
55
|
|
|
*/ |
|
56
|
|
|
public function isOldDeterminationForOrderItemProcessEnabled(): bool |
|
57
|
|
|
{ |
|
58
|
|
|
return false; |
|
59
|
|
|
} |
|
60
|
|
|
|
|
61
|
|
|
/** |
|
62
|
|
|
* @return bool |
|
63
|
|
|
*/ |
|
64
|
|
|
public function shouldPersistModifiedOrderItemProperties(): bool |
|
65
|
|
|
{ |
|
66
|
|
|
return true; |
|
67
|
|
|
} |
|
68
|
|
|
} |
|
69
|
|
|
|