forked from extcode/cart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_localconf.php
111 lines (98 loc) · 3.35 KB
/
ext_localconf.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?php
defined('TYPO3') or die();
use Extcode\Cart\Controller\Cart\CartController;
use Extcode\Cart\Controller\Cart\CartPreviewController;
use Extcode\Cart\Controller\Cart\CountryController;
use Extcode\Cart\Controller\Cart\CouponController;
use Extcode\Cart\Controller\Cart\CurrencyController;
use Extcode\Cart\Controller\Cart\OrderController;
use Extcode\Cart\Controller\Cart\PaymentController;
use Extcode\Cart\Controller\Cart\ProductController;
use Extcode\Cart\Controller\Cart\ShippingController;
use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider;
use TYPO3\CMS\Core\Imaging\IconRegistry;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
// configure plugins
ExtensionUtility::configurePlugin(
'Cart',
'MiniCart',
[
CartPreviewController::class => 'show',
CurrencyController::class => 'update',
],
[
CartPreviewController::class => 'show',
CurrencyController::class => 'update',
]
);
ExtensionUtility::configurePlugin(
'Cart',
'Cart',
[
CartController::class => 'show, clear, update',
CountryController::class => 'update',
CouponController::class => 'add, remove',
CurrencyController::class => 'update',
OrderController::class => 'show, create',
PaymentController::class => 'update',
ProductController::class => 'add, remove',
ShippingController::class => 'update',
],
[
CartController::class => 'show, clear, update',
CountryController::class => 'update',
CouponController::class => 'add, remove',
CurrencyController::class => 'update',
OrderController::class => 'show, create',
PaymentController::class => 'update',
ProductController::class => 'add, remove',
ShippingController::class => 'update',
]
);
ExtensionUtility::configurePlugin(
'Cart',
'Currency',
[
CurrencyController::class => 'edit, update',
],
[
CurrencyController::class => 'edit, update',
]
);
ExtensionUtility::configurePlugin(
'Cart',
'Order',
[
\Extcode\Cart\Controller\Order\OrderController::class => 'list, show',
],
[
\Extcode\Cart\Controller\Order\OrderController::class => 'list, show',
]
);
// Icon Registry
$icons = [
'apps-pagetree-folder-cart-coupons' => 'apps_pagetree_folder_cart_coupons.svg',
'apps-pagetree-folder-cart-orders' => 'apps_pagetree_folder_cart_orders.svg',
'apps-pagetree-page-cart-cart' => 'apps_pagetree_page_cart_cart.svg',
'ext-cart-wizard-icon' => 'cart_plugin_wizard.svg',
'ext-cart-module' => 'module.svg',
'ext-cart-module-order' => 'module_orders.svg',
];
$iconRegistry = GeneralUtility::makeInstance(
IconRegistry::class
);
foreach ($icons as $identifier => $fileName) {
$iconRegistry->registerIcon(
$identifier,
SvgIconProvider::class,
[
'source' => 'EXT:cart/Resources/Public/Icons/' . $fileName,
]
);
}
// register "cart:" namespace
$GLOBALS['TYPO3_CONF_VARS']['SYS']['fluid']['namespaces']['cart'][] = 'Extcode\\Cart\\ViewHelpers';
// view paths for TYPO3 Mail API
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['templateRootPaths']['1588829280'] = 'EXT:cart/Resources/Private/Templates/';
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['partialRootPaths']['1588829280'] = 'EXT:cart/Resources/Private/Partials/';