-
Notifications
You must be signed in to change notification settings - Fork 10
/
ext_tables.php
157 lines (132 loc) · 5.1 KB
/
ext_tables.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
COMMERCE_EXTKEY,
'Configuration/TypoScript/',
'COMMERCE'
);
if (TYPO3_MODE == 'BE') {
/*
* WIZICON
* Default PageTS
*/
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . COMMERCE_EXTKEY . '/Configuration/PageTS/ModWizards.ts">'
);
if (!isset($TBE_MODULES['commerce'])) {
$tbeModules = array();
foreach ($TBE_MODULES as $key => $val) {
$tbeModules[$key] = $val;
if ($key == 'file') {
$tbeModules['commerce'] = 'category';
}
}
$TBE_MODULES = $tbeModules;
}
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('t3skin')) {
$presetSkinImgs = is_array($GLOBALS['TBE_STYLES']['skinImg']) ? $GLOBALS['TBE_STYLES']['skinImg'] : array();
$GLOBALS['TBE_STYLES']['skinImg'] = array_merge($presetSkinImgs, array(
'MOD:commerce_permission/../../../Resources/Public/Icons/mod_access.gif' => array(
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('t3skin') . 'icons/module_web_perms.png',
'width="24" height="24"',
),
));
}
// add main module
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
'commerce',
'',
'after:file',
PATH_TXCOMMERCE . 'Modules/Main/'
);
// add category module
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
'commerce',
'category',
'',
PATH_TXCOMMERCE . 'Modules/Category/'
);
// Access Module
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
'commerce',
'permission',
'',
PATH_TXCOMMERCE . 'Modules/Permission/'
);
// Orders module
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
'commerce',
'orders',
'',
PATH_TXCOMMERCE . 'Modules/Orders/'
);
// Statistic Module
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
'commerce',
'statistic',
'',
PATH_TXCOMMERCE . 'Modules/Statistic/'
);
// Systemdata module
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
'commerce',
'systemdata',
'',
PATH_TXCOMMERCE . 'Modules/Systemdata/'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerAjaxHandler(
'CommerceTeam_Commerce_CategoryViewHelper::ajaxExpandCollapseWithoutProduct',
'CommerceTeam\\Commerce\\Controller\\CategoryNavigationFrameController->ajaxExpandCollapseWithoutProduct'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerAjaxHandler(
'CommerceTeam_Commerce_CategoryViewHelper::ajaxExpandCollapse',
'CommerceTeam\\Commerce\\Controller\\CategoryNavigationFrameController->ajaxExpandCollapse'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerAjaxHandler(
'CommerceTeam_Commerce_PermissionAjaxController::dispatch',
'CommerceTeam\\Commerce\\Controller\\PermissionAjaxController->dispatch'
);
// commerce icon
\TYPO3\CMS\Backend\Sprite\SpriteManager::addTcaTypeIcon(
'pages',
'contains-commerce',
PATH_TXCOMMERCE_REL . 'Resources/Public/Icons/Table/commerce_folder.gif'
);
// Add default User TS config
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig('
options.saveDocNew {
tx_commerce_products = 1
tx_commerce_article_types = 1
tx_commerce_attributes = 1
tx_commerce_attribute_values = 1
tx_commerce_categories = 1
tx_commerce_trackingcodes = 1
tx_commerce_moveordermails = 1
}
');
// Add default page TS config
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
# CONFIGURATION of RTE in table "tx_commerce_products", field "description"
RTE.config.tx_commerce_products.description {
hidePStyleItems = H1, H4, H5, H6
proc.exitHTMLparser_db = 1
proc.exitHTMLparser_db {
keepNonMatchedTags = 1
tags.font.allowedAttribs = color
tags.font.rmTagIfNoAttrib = 1
tags.font.nesting = global
}
}
# CONFIGURATION of RTE in table "tx_commerce_articles", field "description_extra"
RTE.config.tx_commerce_articles.description_extra < RTE.config.tx_commerce_products.description
');
}
// Add context menu for category trees in BE
$GLOBALS['TBE_MODULES_EXT']['xMOD_alt_clickmenu']['extendCMclasses'][] = array(
'name' => 'CommerceTeam\\Commerce\\Utility\\ClickmenuUtility',
'path' => PATH_TXCOMMERCE . 'Classes/Utility/ClickmenuUtility.php',
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToInsertRecords('tx_commerce_categories');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToInsertRecords('tx_commerce_products');