Refactor configurator defaults config, add more defaults
This commit is contained in:
+39
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
defined('TYPO3_MODE') or die();
|
||||
|
||||
call_user_func(function() {
|
||||
|
||||
$budgetItems = $paxItems = $periodItems = [
|
||||
['keine Auswahl', 0]
|
||||
];
|
||||
|
||||
if (isset($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['ep_events'])) {
|
||||
$extensionConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['ep_events']);
|
||||
|
||||
$budgetItemsConfig = explode(';', $extensionConfiguration['configuratorBudgetOptions']);
|
||||
foreach ($budgetItemsConfig as $item)
|
||||
{
|
||||
list ($value, $label) = explode(':', $item);
|
||||
$budgetItems[] = [$label, $value];
|
||||
}
|
||||
$GLOBALS['TCA']['tx_epevents_domain_model_offer']['columns']['configurator_budget']['config']['items'] = $budgetItems;
|
||||
|
||||
$paxItemsConfig = explode(';', $extensionConfiguration['configuratorPaxOptions']);
|
||||
foreach ($paxItemsConfig as $item)
|
||||
{
|
||||
list ($value, $label) = explode(':', $item);
|
||||
$paxItems[] = [$label, $value];
|
||||
}
|
||||
$GLOBALS['TCA']['tx_epevents_domain_model_offer']['columns']['configurator_pax']['config']['items'] = $paxItems;
|
||||
|
||||
$periodItemsConfig = explode(';', $extensionConfiguration['configuratorPeriodOptions']);
|
||||
foreach ($periodItemsConfig as $item)
|
||||
{
|
||||
list ($value, $label) = explode(':', $item);
|
||||
$periodItems[] = [$label, $value];
|
||||
}
|
||||
$GLOBALS['TCA']['tx_epevents_domain_model_offer']['columns']['configurator_period']['config']['items'] = $periodItems;
|
||||
}
|
||||
|
||||
});
|
||||
@@ -27,8 +27,9 @@ return [
|
||||
'interface' => [
|
||||
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, type, name, name_internal,
|
||||
groupname, price, headline, header, arrival, schedule, services, guidelines, image_teaser,
|
||||
image_teaser_mobile, image_header, booking_form, configurator_type, contact, hotel, location, activities,
|
||||
detail_page, url, url_rendered',
|
||||
image_teaser_mobile, image_header, booking_form, configurator_type, configurator_budget,
|
||||
configurator_pax, configurator_period, contact, hotel, location, activities, detail_page, url,
|
||||
url_rendered',
|
||||
],
|
||||
'types' => [
|
||||
'1' => [
|
||||
@@ -71,7 +72,7 @@ return [
|
||||
],
|
||||
],
|
||||
'palettes' => [
|
||||
'general' => ['showitem' => 'type, configurator_type, detail_page'],
|
||||
'general' => ['showitem' => 'type, configurator_type, configurator_pax, configurator_budget, configurator_period, detail_page'],
|
||||
'general_ext' => ['showitem' => 'type, configurator_type, price'],
|
||||
'naming' => ['showitem' => 'name, name_internal'],
|
||||
'url' => ['showitem' => 'url, url_rendered'],
|
||||
@@ -385,7 +386,45 @@ return [
|
||||
'size' => 1,
|
||||
'minitems' => 1,
|
||||
'maxitems' => 1,
|
||||
'eval' => ''
|
||||
],
|
||||
],
|
||||
'configurator_budget' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Konfigurator Budget',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [],
|
||||
'default' => 1,
|
||||
'size' => 1,
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
],
|
||||
'configurator_pax' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Teilnehmerzahl',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [],
|
||||
'default' => 1,
|
||||
'size' => 1,
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
],
|
||||
'configurator_period' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Reisezeitraum',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [],
|
||||
'default' => 1,
|
||||
'size' => 1,
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
],
|
||||
'contact' => [
|
||||
|
||||
@@ -52,70 +52,6 @@ plugin.tx_epevents {
|
||||
contactFormAutoreplySubject = {$plugin.tx_epevents.settings.contactFormAutoreplySubject}
|
||||
businessHours = {$plugin.tx_epevents.settings.businessHours}
|
||||
configurator {
|
||||
options {
|
||||
travelType {
|
||||
1 = Incentive
|
||||
2 = Teambuilding
|
||||
3 = Meeting
|
||||
4 = Corporate Event
|
||||
}
|
||||
locationType {
|
||||
1 = Meer
|
||||
2 = Berge
|
||||
3 = Städte
|
||||
4 = Spezial
|
||||
}
|
||||
accommodationType {
|
||||
1 = 3-Sterne
|
||||
2 = 4-Sterne
|
||||
3 = 5-Sterne
|
||||
4 = Spezial
|
||||
}
|
||||
programmeType {
|
||||
1 = Outdoor & Action
|
||||
2 = Event-Gastronomie
|
||||
3 = Sightseeing
|
||||
4 = Spezial
|
||||
}
|
||||
distance {
|
||||
1 = Deutschland
|
||||
2 = Europa
|
||||
3 = Welt
|
||||
}
|
||||
pax {
|
||||
1 = 20 - 40
|
||||
2 = 40 - 60
|
||||
3 = 60 - 80
|
||||
4 = 80 - 100
|
||||
5 = 100 - 150
|
||||
6 = 150 - 200
|
||||
7 = 200 - 250
|
||||
8 = 250 - 300
|
||||
9 = 350 - 400
|
||||
10 = 400 - 450
|
||||
11 = 450 - 500
|
||||
12 = 500+
|
||||
}
|
||||
budget {
|
||||
1 = nicht festgelegt
|
||||
2 = 400 - 600 €
|
||||
3 = 600 - 800 €
|
||||
4 = 800 - 1000 €
|
||||
5 = 1000 - 1500 €
|
||||
6 = 1500 - 2000 €
|
||||
7 = 2500 - 3000 €
|
||||
}
|
||||
period {
|
||||
1 = Tagesevent
|
||||
2 = 1 Nacht
|
||||
3 = 2 Nächte
|
||||
4 = 3 Nächte
|
||||
5 = 4 Nächte
|
||||
6 = 5 Nächte
|
||||
7 = 6 Nächte
|
||||
8 = 7 Nächte
|
||||
}
|
||||
}
|
||||
defaults {
|
||||
budget = 4
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user