Merge branch 'feature/price-calculator-groups' into develop
This commit is contained in:
@@ -0,0 +1,95 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace EP\EpProducts\Controller;
|
||||||
|
|
||||||
|
/***************************************************************
|
||||||
|
*
|
||||||
|
* Copyright notice
|
||||||
|
*
|
||||||
|
* (c) 2020 Björn Fromme <[email protected]>, dreipunktnull
|
||||||
|
*
|
||||||
|
* All rights reserved
|
||||||
|
*
|
||||||
|
* This script is part of the TYPO3 project. The TYPO3 project is
|
||||||
|
* free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* The GNU General Public License can be found at
|
||||||
|
* http://www.gnu.org/copyleft/gpl.html.
|
||||||
|
*
|
||||||
|
* This script is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* This copyright notice MUST APPEAR in all copies of the script!
|
||||||
|
***************************************************************/
|
||||||
|
|
||||||
|
use EP\EpProducts\Domain\Model\Hotel;
|
||||||
|
use EP\EpProducts\Service\GroupsPriceService;
|
||||||
|
use League\Period\Period;
|
||||||
|
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
|
||||||
|
use TYPO3\CMS\Extbase\Mvc\Exception\NoSuchArgumentException;
|
||||||
|
|
||||||
|
class AjaxGroupsPriceController extends ActionController
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var GroupsPriceService
|
||||||
|
*/
|
||||||
|
protected $groupsPriceService;
|
||||||
|
|
||||||
|
public function __construct(GroupsPriceService $groupsPriceService)
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
|
$this->groupsPriceService = $groupsPriceService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function initializeAction()
|
||||||
|
{
|
||||||
|
if ($this->request->hasArgument('dateFrom')) {
|
||||||
|
try {
|
||||||
|
$dateFrom = new \DateTime($this->request->getArgument('dateFrom'));
|
||||||
|
}
|
||||||
|
catch (\Throwable $e) {
|
||||||
|
$dateFrom = null;
|
||||||
|
}
|
||||||
|
$this->request->setArgument('dateFrom', $dateFrom);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->request->hasArgument('dateTo')) {
|
||||||
|
try {
|
||||||
|
$dateTo = new \DateTime($this->request->getArgument('dateTo'));
|
||||||
|
}
|
||||||
|
catch (\Throwable $e) {
|
||||||
|
$dateTo = null;
|
||||||
|
}
|
||||||
|
$this->request->setArgument('dateTo', $dateTo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Hotel $hotel
|
||||||
|
* @param \DateTime $dateFrom
|
||||||
|
* @param \DateTime $dateTo
|
||||||
|
* @param int $pax
|
||||||
|
* @return string
|
||||||
|
* @throws \League\Period\Exception
|
||||||
|
*/
|
||||||
|
public function indexAction(Hotel $hotel, \DateTime $dateFrom = null, \DateTime $dateTo = null, $pax = 0)
|
||||||
|
{
|
||||||
|
if (null !== $dateFrom && null !== $dateTo) {
|
||||||
|
$period = new Period($dateFrom, $dateTo);
|
||||||
|
$price = $this->groupsPriceService->calculateHotelPrice($hotel, $period, $pax);
|
||||||
|
}
|
||||||
|
|
||||||
|
return json_encode([
|
||||||
|
'price' => $price ?? [],
|
||||||
|
'configs' => $hotel->getGroupsPriceConfigs()->toArray(),
|
||||||
|
'boards' => $hotel->getGroupsPriceBoards()->toArray(),
|
||||||
|
'options' => $hotel->getGroupsPriceOptions()->toArray(),
|
||||||
|
], JSON_THROW_ON_ERROR, 512);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace EP\EpProducts\Domain\Model;
|
||||||
|
|
||||||
|
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
||||||
|
|
||||||
|
/***************************************************************
|
||||||
|
*
|
||||||
|
* Copyright notice
|
||||||
|
*
|
||||||
|
* (c) 2020 Björn Fromme <[email protected]>, dreipunktnull
|
||||||
|
*
|
||||||
|
* All rights reserved
|
||||||
|
*
|
||||||
|
* This script is part of the TYPO3 project. The TYPO3 project is
|
||||||
|
* free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* The GNU General Public License can be found at
|
||||||
|
* http://www.gnu.org/copyleft/gpl.html.
|
||||||
|
*
|
||||||
|
* This script is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* This copyright notice MUST APPEAR in all copies of the script!
|
||||||
|
***************************************************************/
|
||||||
|
|
||||||
|
class GroupsPriceBoard extends AbstractEntity implements \JsonSerializable
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var float
|
||||||
|
*/
|
||||||
|
protected $price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getTitle(): string
|
||||||
|
{
|
||||||
|
return $this->title;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $title
|
||||||
|
*/
|
||||||
|
public function setTitle(string $title): void
|
||||||
|
{
|
||||||
|
$this->title = $title;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return float
|
||||||
|
*/
|
||||||
|
public function getPrice(): float
|
||||||
|
{
|
||||||
|
return $this->price;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param float $price
|
||||||
|
*/
|
||||||
|
public function setPrice(float $price): void
|
||||||
|
{
|
||||||
|
$this->price = $price;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function jsonSerialize()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'title' => $this->getTitle(),
|
||||||
|
'price' => $this->getPrice(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace EP\EpProducts\Domain\Model;
|
||||||
|
|
||||||
|
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
||||||
|
|
||||||
|
/***************************************************************
|
||||||
|
*
|
||||||
|
* Copyright notice
|
||||||
|
*
|
||||||
|
* (c) 2020 Björn Fromme <[email protected]>, dreipunktnull
|
||||||
|
*
|
||||||
|
* All rights reserved
|
||||||
|
*
|
||||||
|
* This script is part of the TYPO3 project. The TYPO3 project is
|
||||||
|
* free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* The GNU General Public License can be found at
|
||||||
|
* http://www.gnu.org/copyleft/gpl.html.
|
||||||
|
*
|
||||||
|
* This script is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* This copyright notice MUST APPEAR in all copies of the script!
|
||||||
|
***************************************************************/
|
||||||
|
|
||||||
|
class GroupsPriceConfig extends AbstractEntity implements \JsonSerializable
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var \DateTime
|
||||||
|
*/
|
||||||
|
protected $dateFrom;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var \DateTime
|
||||||
|
*/
|
||||||
|
protected $dateTo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
protected $personsIncluded;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var float
|
||||||
|
*/
|
||||||
|
protected $price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var float
|
||||||
|
*/
|
||||||
|
protected $priceAdditionalPerson;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return \DateTime
|
||||||
|
*/
|
||||||
|
public function getDateFrom(): \DateTime
|
||||||
|
{
|
||||||
|
return $this->dateFrom;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \DateTime $dateFrom
|
||||||
|
*/
|
||||||
|
public function setDateFrom(\DateTime $dateFrom): void
|
||||||
|
{
|
||||||
|
$this->dateFrom = $dateFrom;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return \DateTime
|
||||||
|
*/
|
||||||
|
public function getDateTo(): \DateTime
|
||||||
|
{
|
||||||
|
return $this->dateTo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \DateTime $dateTo
|
||||||
|
*/
|
||||||
|
public function setDateTo(\DateTime $dateTo): void
|
||||||
|
{
|
||||||
|
$this->dateTo = $dateTo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public function getPersonsIncluded(): int
|
||||||
|
{
|
||||||
|
return $this->personsIncluded;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param int $personsIncluded
|
||||||
|
*/
|
||||||
|
public function setPersonsIncluded(int $personsIncluded): void
|
||||||
|
{
|
||||||
|
$this->personsIncluded = $personsIncluded;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return float
|
||||||
|
*/
|
||||||
|
public function getPrice(): float
|
||||||
|
{
|
||||||
|
return $this->price;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param float $price
|
||||||
|
*/
|
||||||
|
public function setPrice(float $price): void
|
||||||
|
{
|
||||||
|
$this->price = $price;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return float
|
||||||
|
*/
|
||||||
|
public function getPriceAdditionalPerson(): float
|
||||||
|
{
|
||||||
|
return $this->priceAdditionalPerson;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param float $priceAdditionalPerson
|
||||||
|
*/
|
||||||
|
public function setPriceAdditionalPerson(float $priceAdditionalPerson): void
|
||||||
|
{
|
||||||
|
$this->priceAdditionalPerson = $priceAdditionalPerson;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function jsonSerialize()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'dateFrom' => $this->getDateFrom()->format('d.m.Y'),
|
||||||
|
'dateTo' => $this->getDateTo()->format('d.m.Y'),
|
||||||
|
'personsIncluded' => $this->getPersonsIncluded(),
|
||||||
|
'price' => $this->getPrice(),
|
||||||
|
'priceAdditionalPerson' => $this->getPriceAdditionalPerson(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace EP\EpProducts\Domain\Model;
|
||||||
|
|
||||||
|
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
||||||
|
|
||||||
|
/***************************************************************
|
||||||
|
*
|
||||||
|
* Copyright notice
|
||||||
|
*
|
||||||
|
* (c) 2020 Björn Fromme <[email protected]>, dreipunktnull
|
||||||
|
*
|
||||||
|
* All rights reserved
|
||||||
|
*
|
||||||
|
* This script is part of the TYPO3 project. The TYPO3 project is
|
||||||
|
* free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* The GNU General Public License can be found at
|
||||||
|
* http://www.gnu.org/copyleft/gpl.html.
|
||||||
|
*
|
||||||
|
* This script is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* This copyright notice MUST APPEAR in all copies of the script!
|
||||||
|
***************************************************************/
|
||||||
|
|
||||||
|
class GroupsPriceOption extends AbstractEntity implements \JsonSerializable
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var float
|
||||||
|
*/
|
||||||
|
protected $price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getTitle(): string
|
||||||
|
{
|
||||||
|
return $this->title;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $title
|
||||||
|
*/
|
||||||
|
public function setTitle(string $title): void
|
||||||
|
{
|
||||||
|
$this->title = $title;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return float
|
||||||
|
*/
|
||||||
|
public function getPrice(): float
|
||||||
|
{
|
||||||
|
return $this->price;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param float $price
|
||||||
|
*/
|
||||||
|
public function setPrice(float $price): void
|
||||||
|
{
|
||||||
|
$this->price = $price;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function jsonSerialize()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'title' => $this->getTitle(),
|
||||||
|
'price' => $this->getPrice(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -27,7 +27,10 @@ namespace EP\EpProducts\Domain\Model;
|
|||||||
* This copyright notice MUST APPEAR in all copies of the script!
|
* This copyright notice MUST APPEAR in all copies of the script!
|
||||||
***************************************************************/
|
***************************************************************/
|
||||||
|
|
||||||
class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements TeaserInterface
|
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
||||||
|
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
|
||||||
|
|
||||||
|
class Hotel extends AbstractEntity implements TeaserInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
const CATEGORY_STANDARD = 1;
|
const CATEGORY_STANDARD = 1;
|
||||||
@@ -246,6 +249,21 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
*/
|
*/
|
||||||
protected $pathSegment;
|
protected $pathSegment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\GroupsPriceConfig>
|
||||||
|
*/
|
||||||
|
protected $groupsPriceConfigs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\GroupsPriceOption>
|
||||||
|
*/
|
||||||
|
protected $groupsPriceOptions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\GroupsPriceBoard>
|
||||||
|
*/
|
||||||
|
protected $groupsPriceBoards;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->initStorageObjects();
|
$this->initStorageObjects();
|
||||||
@@ -253,14 +271,17 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
|
|
||||||
protected function initStorageObjects()
|
protected function initStorageObjects()
|
||||||
{
|
{
|
||||||
$this->images = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
$this->images = new ObjectStorage();
|
||||||
$this->resellerImages = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
$this->resellerImages = new ObjectStorage();
|
||||||
$this->teaserImages = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
$this->teaserImages = new ObjectStorage();
|
||||||
$this->headerImages = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
$this->headerImages = new ObjectStorage();
|
||||||
$this->teamer = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
$this->teamer = new ObjectStorage();
|
||||||
$this->products = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
$this->products = new ObjectStorage();
|
||||||
$this->facts = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
$this->facts = new ObjectStorage();
|
||||||
$this->additionalCodes = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
$this->additionalCodes = new ObjectStorage();
|
||||||
|
$this->groupsPriceConfigs = new ObjectStorage();
|
||||||
|
$this->groupsPriceOptions = new ObjectStorage();
|
||||||
|
$this->groupsPriceBoards = new ObjectStorage();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -537,6 +558,7 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
if (empty($this->latitude) && $this->region !== null) {
|
if (empty($this->latitude) && $this->region !== null) {
|
||||||
return $this->region->getLatitude();
|
return $this->region->getLatitude();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->latitude;
|
return $this->latitude;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -556,6 +578,7 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
if (empty($this->longitude) && $this->region !== null) {
|
if (empty($this->longitude) && $this->region !== null) {
|
||||||
return $this->region->getLongitude();
|
return $this->region->getLongitude();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->longitude;
|
return $this->longitude;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -584,7 +607,7 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> $images
|
* @return ObjectStorage $images
|
||||||
*/
|
*/
|
||||||
public function getImages()
|
public function getImages()
|
||||||
{
|
{
|
||||||
@@ -592,15 +615,15 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> $images
|
* @param ObjectStorage $images
|
||||||
*/
|
*/
|
||||||
public function setImages(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $images)
|
public function setImages(ObjectStorage $images)
|
||||||
{
|
{
|
||||||
$this->images = $images;
|
$this->images = $images;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> $resellerImages
|
* @return ObjectStorage $resellerImages
|
||||||
*/
|
*/
|
||||||
public function getResellerImages()
|
public function getResellerImages()
|
||||||
{
|
{
|
||||||
@@ -608,7 +631,7 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> $resellerImages
|
* @param ObjectStorage $resellerImages
|
||||||
*/
|
*/
|
||||||
public function setResellerImages($resellerImages)
|
public function setResellerImages($resellerImages)
|
||||||
{
|
{
|
||||||
@@ -616,7 +639,7 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
|
* @return ObjectStorage
|
||||||
*/
|
*/
|
||||||
public function getTeaserImages()
|
public function getTeaserImages()
|
||||||
{
|
{
|
||||||
@@ -624,7 +647,7 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return null|\TYPO3\CMS\Extbase\Persistence\ObjectStorage
|
* @return null|ObjectStorage
|
||||||
*/
|
*/
|
||||||
public function getTeaserImage()
|
public function getTeaserImage()
|
||||||
{
|
{
|
||||||
@@ -632,11 +655,13 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return reset($this->teaserImages->toArray());
|
$images = $this->teaserImages->toArray();
|
||||||
|
|
||||||
|
return reset($images);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $teaserImages
|
* @param ObjectStorage $teaserImages
|
||||||
*/
|
*/
|
||||||
public function setTeaserImages($teaserImages)
|
public function setTeaserImages($teaserImages)
|
||||||
{
|
{
|
||||||
@@ -644,7 +669,7 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
|
* @return ObjectStorage
|
||||||
*/
|
*/
|
||||||
public function getHeaderImages()
|
public function getHeaderImages()
|
||||||
{
|
{
|
||||||
@@ -658,7 +683,7 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return null|\TYPO3\CMS\Extbase\Persistence\ObjectStorage
|
* @return null|ObjectStorage
|
||||||
*/
|
*/
|
||||||
public function getHeaderImage()
|
public function getHeaderImage()
|
||||||
{
|
{
|
||||||
@@ -666,11 +691,13 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return reset($this->headerImages->toArray());
|
$images = $this->headerImages->toArray();
|
||||||
|
|
||||||
|
return reset($images);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $headerImages
|
* @param ObjectStorage $headerImages
|
||||||
*/
|
*/
|
||||||
public function setHeaderImages($headerImages)
|
public function setHeaderImages($headerImages)
|
||||||
{
|
{
|
||||||
@@ -694,23 +721,23 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \EP\EpProducts\Domain\Model\MatchCode $code
|
* @param MatchCode $code
|
||||||
*/
|
*/
|
||||||
public function addAdditionalCode(\EP\EpProducts\Domain\Model\MatchCode $code)
|
public function addAdditionalCode(MatchCode $code)
|
||||||
{
|
{
|
||||||
$this->additionalCodes->attach($code);
|
$this->additionalCodes->attach($code);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \EP\EpProducts\Domain\Model\MatchCode $codeToRemove
|
* @param MatchCode $codeToRemove
|
||||||
*/
|
*/
|
||||||
public function removeAdditionalCodes(\EP\EpProducts\Domain\Model\MatchCode $codeToRemove)
|
public function removeAdditionalCodes(MatchCode $codeToRemove)
|
||||||
{
|
{
|
||||||
$this->additionalCodes->detach($codeToRemove);
|
$this->additionalCodes->detach($codeToRemove);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\MatchCode> $codes
|
* @return ObjectStorage $codes
|
||||||
*/
|
*/
|
||||||
public function getAdditionalCodes()
|
public function getAdditionalCodes()
|
||||||
{
|
{
|
||||||
@@ -718,9 +745,9 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\MatchCode> $codes
|
* @param ObjectStorage $codes
|
||||||
*/
|
*/
|
||||||
public function setAdditionalCodes(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $codes)
|
public function setAdditionalCodes(ObjectStorage $codes)
|
||||||
{
|
{
|
||||||
$this->additionalCodes = $codes;
|
$this->additionalCodes = $codes;
|
||||||
}
|
}
|
||||||
@@ -770,7 +797,7 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \EP\EpProducts\Domain\Model\Country $country
|
* @return Country $country
|
||||||
*/
|
*/
|
||||||
public function getCountry()
|
public function getCountry()
|
||||||
{
|
{
|
||||||
@@ -778,15 +805,15 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \EP\EpProducts\Domain\Model\Country $country
|
* @param Country $country
|
||||||
*/
|
*/
|
||||||
public function setCountry(\EP\EpProducts\Domain\Model\Country $country)
|
public function setCountry(Country $country)
|
||||||
{
|
{
|
||||||
$this->country = $country;
|
$this->country = $country;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \EP\EpProducts\Domain\Model\Region $region
|
* @return Region $region
|
||||||
*/
|
*/
|
||||||
public function getRegion()
|
public function getRegion()
|
||||||
{
|
{
|
||||||
@@ -794,15 +821,15 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \EP\EpProducts\Domain\Model\Region $region
|
* @param Region $region
|
||||||
*/
|
*/
|
||||||
public function setRegion(\EP\EpProducts\Domain\Model\Region $region)
|
public function setRegion(Region $region)
|
||||||
{
|
{
|
||||||
$this->region = $region;
|
$this->region = $region;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \EP\EpProducts\Domain\Model\City $city
|
* @return City $city
|
||||||
*/
|
*/
|
||||||
public function getCity()
|
public function getCity()
|
||||||
{
|
{
|
||||||
@@ -810,31 +837,31 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \EP\EpProducts\Domain\Model\City $city
|
* @param City $city
|
||||||
*/
|
*/
|
||||||
public function setCity(\EP\EpProducts\Domain\Model\City $city)
|
public function setCity(City $city)
|
||||||
{
|
{
|
||||||
$this->city = $city;
|
$this->city = $city;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \EP\EpProducts\Domain\Model\Teammember $teamer
|
* @param Teammember $teamer
|
||||||
*/
|
*/
|
||||||
public function addTeamer(\EP\EpProducts\Domain\Model\Teammember $teamer)
|
public function addTeamer(Teammember $teamer)
|
||||||
{
|
{
|
||||||
$this->teamer->attach($teamer);
|
$this->teamer->attach($teamer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \EP\EpProducts\Domain\Model\Teammember $teamerToRemove The Teammember to be removed
|
* @param Teammember $teamerToRemove The Teammember to be removed
|
||||||
*/
|
*/
|
||||||
public function removeTeamer(\EP\EpProducts\Domain\Model\Teammember $teamerToRemove)
|
public function removeTeamer(Teammember $teamerToRemove)
|
||||||
{
|
{
|
||||||
$this->teamer->detach($teamerToRemove);
|
$this->teamer->detach($teamerToRemove);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Teammember> $teamer
|
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $teamer
|
||||||
*/
|
*/
|
||||||
public function getTeamer()
|
public function getTeamer()
|
||||||
{
|
{
|
||||||
@@ -842,31 +869,31 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Teammember> $teamer
|
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $teamer
|
||||||
*/
|
*/
|
||||||
public function setTeamer(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $teamer)
|
public function setTeamer(ObjectStorage $teamer)
|
||||||
{
|
{
|
||||||
$this->teamer = $teamer;
|
$this->teamer = $teamer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \EP\EpProducts\Domain\Model\Product $product
|
* @param Product $product
|
||||||
*/
|
*/
|
||||||
public function addProduct(\EP\EpProducts\Domain\Model\Product $product)
|
public function addProduct(Product $product)
|
||||||
{
|
{
|
||||||
$this->products->attach($product);
|
$this->products->attach($product);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \EP\EpProducts\Domain\Model\Product $product
|
* @param Product $product
|
||||||
*/
|
*/
|
||||||
public function removeProduct(\EP\EpProducts\Domain\Model\Product $product)
|
public function removeProduct(Product $product)
|
||||||
{
|
{
|
||||||
$this->products->detach($product);
|
$this->products->detach($product);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Product>
|
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
|
||||||
*/
|
*/
|
||||||
public function getProducts()
|
public function getProducts()
|
||||||
{
|
{
|
||||||
@@ -874,38 +901,38 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Product> $products
|
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $products
|
||||||
*/
|
*/
|
||||||
public function setProducts(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $products)
|
public function setProducts(ObjectStorage $products)
|
||||||
{
|
{
|
||||||
$this->products = $products;
|
$this->products = $products;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Room> $rooms
|
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $rooms
|
||||||
*/
|
*/
|
||||||
public function setRooms($rooms) {
|
public function setRooms($rooms) {
|
||||||
$this->rooms = $rooms;
|
$this->rooms = $rooms;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \EP\EpProducts\Domain\Model\Fact $fact
|
* @param Fact $fact
|
||||||
*/
|
*/
|
||||||
public function addFact(\EP\EpProducts\Domain\Model\Fact $fact)
|
public function addFact(Fact $fact)
|
||||||
{
|
{
|
||||||
$this->facts->attach($fact);
|
$this->facts->attach($fact);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \EP\EpProducts\Domain\Model\Fact $factToRemove
|
* @param Fact $factToRemove
|
||||||
*/
|
*/
|
||||||
public function removeFact(\EP\EpProducts\Domain\Model\Fact $factToRemove)
|
public function removeFact(Fact $factToRemove)
|
||||||
{
|
{
|
||||||
$this->facts->detach($factToRemove);
|
$this->facts->detach($factToRemove);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Fact>
|
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
|
||||||
*/
|
*/
|
||||||
public function getFacts()
|
public function getFacts()
|
||||||
{
|
{
|
||||||
@@ -913,9 +940,9 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Fact> $facts
|
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $facts
|
||||||
*/
|
*/
|
||||||
public function setFacts(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $facts)
|
public function setFacts(ObjectStorage $facts)
|
||||||
{
|
{
|
||||||
$this->facts = $facts;
|
$this->facts = $facts;
|
||||||
}
|
}
|
||||||
@@ -968,4 +995,51 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
return !$this->getIsApartment() && !$this->getIsHolidayFlat();
|
return !$this->getIsApartment() && !$this->getIsHolidayFlat();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
|
||||||
|
*/
|
||||||
|
public function getGroupsPriceConfigs()
|
||||||
|
{
|
||||||
|
return $this->groupsPriceConfigs;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $groupPriceConfigs
|
||||||
|
*/
|
||||||
|
public function setGroupsPriceConfigs(ObjectStorage $groupPriceConfigs)
|
||||||
|
{
|
||||||
|
$this->groupsPriceConfigs = $groupPriceConfigs;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
|
||||||
|
*/
|
||||||
|
public function getGroupsPriceOptions()
|
||||||
|
{
|
||||||
|
return $this->groupsPriceOptions;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $groupsPriceOptions
|
||||||
|
*/
|
||||||
|
public function setGroupsPriceOptions(ObjectStorage $groupsPriceOptions)
|
||||||
|
{
|
||||||
|
$this->groupsPriceOptions = $groupsPriceOptions;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
|
||||||
|
*/
|
||||||
|
public function getGroupsPriceBoards()
|
||||||
|
{
|
||||||
|
return $this->groupsPriceBoards;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $groupsPriceBoards
|
||||||
|
*/
|
||||||
|
public function setGroupsPriceBoards(ObjectStorage $groupsPriceBoards)
|
||||||
|
{
|
||||||
|
$this->groupsPriceBoards = $groupsPriceBoards;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,105 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace EP\EpProducts\Service;
|
||||||
|
|
||||||
|
use EP\EpProducts\Domain\Model\Hotel;
|
||||||
|
use League\Period\Period;
|
||||||
|
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||||
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||||
|
|
||||||
|
class GroupsPriceService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @param Hotel $hotel
|
||||||
|
* @param Period $period
|
||||||
|
* @param int $pax
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function calculateHotelPrice(Hotel $hotel, Period $period, $pax)
|
||||||
|
{
|
||||||
|
// Get all price configs for provided hotel
|
||||||
|
$configs = $this->getConfigs($hotel);
|
||||||
|
|
||||||
|
// Create periods in configs to simplify following steps
|
||||||
|
$this->patchConfigPeriods($configs);
|
||||||
|
|
||||||
|
$nights = 0;
|
||||||
|
$price = 0;
|
||||||
|
|
||||||
|
// Iterate over provided period
|
||||||
|
foreach ($period->getDatePeriod('1 DAY') as $day) {
|
||||||
|
|
||||||
|
// Iterate over all configs
|
||||||
|
foreach ($configs as $config) {
|
||||||
|
|
||||||
|
// Skip config if current day is not contained
|
||||||
|
if (false === $config['period']->contains($day)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Calculate base price
|
||||||
|
$price += $config['price'];
|
||||||
|
|
||||||
|
// Add costs for not-included number of persons
|
||||||
|
if ($pax > $config['persons_included']) {
|
||||||
|
$price += $config['price_additional_person'] * ($pax - $config['persons_included']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$nights++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($nights === 2) {
|
||||||
|
$shortTermCosts = $price * .2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($nights === 3) {
|
||||||
|
$shortTermCosts = $price * .1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$electricityCosts = ($nights - 1) * $pax * 1.7;
|
||||||
|
|
||||||
|
return [
|
||||||
|
'pax' => $pax,
|
||||||
|
'basePrice' => $price,
|
||||||
|
'shortTermCosts' => $shortTermCosts ?? 0.0,
|
||||||
|
'electricityCosts' => $electricityCosts,
|
||||||
|
'nights' => $nights,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function patchConfigPeriods(array &$configs)
|
||||||
|
{
|
||||||
|
foreach ($configs as $idx => $config) {
|
||||||
|
$configDateFrom = (new \DateTimeImmutable())->setTimestamp($config['date_from']);
|
||||||
|
$configDateTo = (new \DateTimeImmutable())->setTimestamp($config['date_to']);
|
||||||
|
$configs[$idx]['period'] = new Period($configDateFrom, $configDateTo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Hotel $hotel
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
protected function getConfigs(Hotel $hotel)
|
||||||
|
{
|
||||||
|
$qb = $this->getQueryBuilder();
|
||||||
|
|
||||||
|
return $qb
|
||||||
|
->select('*')
|
||||||
|
->from('tx_epproducts_domain_model_groupspriceconfig')
|
||||||
|
->where($qb->expr()->eq('hotel', $qb->createNamedParameter($hotel->getUid())))
|
||||||
|
->orderBy('date_from')
|
||||||
|
->execute()
|
||||||
|
->fetchAll()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getQueryBuilder()
|
||||||
|
{
|
||||||
|
/** @var ConnectionPool $connectionPool */
|
||||||
|
$connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
|
||||||
|
|
||||||
|
return $connectionPool->getQueryBuilderForTable('tx_epproducts_domain_model_groupspriceconfig');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -93,4 +93,13 @@ class LabelService
|
|||||||
$parameters['title'] = sprintf('%s: %s (%d/%d)', $date->format('d.m.Y'), $hotel['name'], $contingent['available'], $contingent['pax']);
|
$parameters['title'] = sprintf('%s: %s (%d/%d)', $date->format('d.m.Y'), $hotel['name'], $contingent['available'], $contingent['pax']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $parameters
|
||||||
|
* @param array $parentObject
|
||||||
|
*/
|
||||||
|
public function getGroupsPriceConfigLabel(&$parameters, $parentObject)
|
||||||
|
{
|
||||||
|
$record = BackendUtility::getRecord('tx_epproducts_domain_model_groupspriceconfig', $parameters['row']['uid']);
|
||||||
|
$parameters['title'] = sprintf('%s - %s', date('d.m.Y', $record['date_from']), date('d.m.Y', $record['date_to']));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+149
@@ -0,0 +1,149 @@
|
|||||||
|
<?php
|
||||||
|
return [
|
||||||
|
'ctrl' => [
|
||||||
|
'title' => 'Verpflegungsleistung',
|
||||||
|
'default_sortby' => 'ORDER BY price',
|
||||||
|
'sortby' => 'sorting',
|
||||||
|
'label' => 'title',
|
||||||
|
'tstamp' => 'tstamp',
|
||||||
|
'crdate' => 'crdate',
|
||||||
|
'cruser_id' => 'cruser_id',
|
||||||
|
'dividers2tabs' => true,
|
||||||
|
'versioningWS' => true,
|
||||||
|
'languageField' => 'sys_language_uid',
|
||||||
|
'transOrigPointerField' => 'l10n_parent',
|
||||||
|
'transOrigDiffSourceField' => 'l10n_diffsource',
|
||||||
|
'delete' => 'deleted',
|
||||||
|
'enablecolumns' => [
|
||||||
|
'disabled' => 'hidden',
|
||||||
|
'starttime' => 'starttime',
|
||||||
|
'endtime' => 'endtime',
|
||||||
|
],
|
||||||
|
'searchFields' => 'title',
|
||||||
|
'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg',
|
||||||
|
'hideTable' => true,
|
||||||
|
],
|
||||||
|
'interface' => [
|
||||||
|
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, price',
|
||||||
|
],
|
||||||
|
'types' => [
|
||||||
|
'1' => [
|
||||||
|
'showitem' => 'title, price',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'palettes' => [
|
||||||
|
],
|
||||||
|
'columns' => [
|
||||||
|
|
||||||
|
'sys_language_uid' => [
|
||||||
|
'exclude' => 0,
|
||||||
|
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'select',
|
||||||
|
'renderType' => 'selectSingle',
|
||||||
|
'foreign_table' => 'sys_language',
|
||||||
|
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||||
|
'items' => [
|
||||||
|
['LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1],
|
||||||
|
['LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0]
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'l10n_parent' => [
|
||||||
|
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
||||||
|
'exclude' => 0,
|
||||||
|
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'select',
|
||||||
|
'renderType' => 'selectSingle',
|
||||||
|
'items' => [
|
||||||
|
['', 0],
|
||||||
|
],
|
||||||
|
'foreign_table' => 'tx_epproducts_domain_model_groupspriceboard',
|
||||||
|
'foreign_table_where' => 'AND tx_epproducts_domain_model_groupspriceboard.pid=###CURRENT_PID### AND tx_epproducts_domain_model_groupspriceboard.sys_language_uid IN (-1,0)',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'l10n_diffsource' => [
|
||||||
|
'config' => [
|
||||||
|
'type' => 'passthrough',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
't3ver_label' => [
|
||||||
|
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'input',
|
||||||
|
'size' => 30,
|
||||||
|
'max' => 255,
|
||||||
|
]
|
||||||
|
],
|
||||||
|
|
||||||
|
'hidden' => [
|
||||||
|
'exclude' => 0,
|
||||||
|
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'check',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'starttime' => [
|
||||||
|
'exclude' => 0,
|
||||||
|
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'input',
|
||||||
|
'size' => 13,
|
||||||
|
'eval' => 'datetime',
|
||||||
|
'checkbox' => 0,
|
||||||
|
'default' => 0,
|
||||||
|
'range' => [
|
||||||
|
'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
|
||||||
|
],
|
||||||
|
'behaviour' => [
|
||||||
|
'allowLanguageSynchronization' => true,
|
||||||
|
],
|
||||||
|
'renderType' => 'inputDateTime',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'endtime' => [
|
||||||
|
'exclude' => 0,
|
||||||
|
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'input',
|
||||||
|
'size' => 13,
|
||||||
|
'eval' => 'datetime',
|
||||||
|
'checkbox' => 0,
|
||||||
|
'default' => 0,
|
||||||
|
'range' => [
|
||||||
|
'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
|
||||||
|
],
|
||||||
|
'behaviour' => [
|
||||||
|
'allowLanguageSynchronization' => true,
|
||||||
|
],
|
||||||
|
'renderType' => 'inputDateTime',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
'title' => [
|
||||||
|
'exclude' => false,
|
||||||
|
'label' => 'Bezeichnung',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'input',
|
||||||
|
'size' => 32,
|
||||||
|
'eval' => 'required',
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'price' => [
|
||||||
|
'exclude' => false,
|
||||||
|
'label' => 'Preis pro Person/Nacht',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'input',
|
||||||
|
'size' => 8,
|
||||||
|
'eval' => 'double2,required',
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'sorting' => [
|
||||||
|
'config' => [
|
||||||
|
'type' => 'passthrough'
|
||||||
|
]
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
+176
@@ -0,0 +1,176 @@
|
|||||||
|
<?php
|
||||||
|
return [
|
||||||
|
'ctrl' => [
|
||||||
|
'title' => 'Gruppenhaus Preis',
|
||||||
|
'default_sortby' => 'ORDER BY date_from',
|
||||||
|
'label' => 'date_from',
|
||||||
|
'label_userFunc' => \EP\EpProducts\Service\LabelService::class . '->getGroupsPriceConfigLabel',
|
||||||
|
'tstamp' => 'tstamp',
|
||||||
|
'crdate' => 'crdate',
|
||||||
|
'cruser_id' => 'cruser_id',
|
||||||
|
'dividers2tabs' => true,
|
||||||
|
'versioningWS' => true,
|
||||||
|
'languageField' => 'sys_language_uid',
|
||||||
|
'transOrigPointerField' => 'l10n_parent',
|
||||||
|
'transOrigDiffSourceField' => 'l10n_diffsource',
|
||||||
|
'delete' => 'deleted',
|
||||||
|
'enablecolumns' => [
|
||||||
|
'disabled' => 'hidden',
|
||||||
|
'starttime' => 'starttime',
|
||||||
|
'endtime' => 'endtime',
|
||||||
|
],
|
||||||
|
'searchFields' => 'date_from',
|
||||||
|
'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg',
|
||||||
|
'hideTable' => true,
|
||||||
|
],
|
||||||
|
'interface' => [
|
||||||
|
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, date_from, date_to,
|
||||||
|
persons_included, price, price_additional_person',
|
||||||
|
],
|
||||||
|
'types' => [
|
||||||
|
'1' => [
|
||||||
|
'showitem' => '--palette--;;dates, --palette--;;prices, persons_included',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'palettes' => [
|
||||||
|
'dates' => ['showitem' => 'date_from, date_to'],
|
||||||
|
'prices' => ['showitem' => 'price, price_additional_person'],
|
||||||
|
],
|
||||||
|
'columns' => [
|
||||||
|
|
||||||
|
'sys_language_uid' => [
|
||||||
|
'exclude' => 0,
|
||||||
|
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'select',
|
||||||
|
'renderType' => 'selectSingle',
|
||||||
|
'foreign_table' => 'sys_language',
|
||||||
|
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||||
|
'items' => [
|
||||||
|
['LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1],
|
||||||
|
['LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0]
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'l10n_parent' => [
|
||||||
|
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
||||||
|
'exclude' => 0,
|
||||||
|
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'select',
|
||||||
|
'renderType' => 'selectSingle',
|
||||||
|
'items' => [
|
||||||
|
['', 0],
|
||||||
|
],
|
||||||
|
'foreign_table' => 'tx_epproducts_domain_model_groupspriceconfig',
|
||||||
|
'foreign_table_where' => 'AND tx_epproducts_domain_model_groupspriceconfig.pid=###CURRENT_PID### AND tx_epproducts_domain_model_groupspriceconfig.sys_language_uid IN (-1,0)',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'l10n_diffsource' => [
|
||||||
|
'config' => [
|
||||||
|
'type' => 'passthrough',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
't3ver_label' => [
|
||||||
|
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'input',
|
||||||
|
'size' => 30,
|
||||||
|
'max' => 255,
|
||||||
|
]
|
||||||
|
],
|
||||||
|
|
||||||
|
'hidden' => [
|
||||||
|
'exclude' => 0,
|
||||||
|
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'check',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'starttime' => [
|
||||||
|
'exclude' => 0,
|
||||||
|
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'input',
|
||||||
|
'size' => 13,
|
||||||
|
'eval' => 'datetime',
|
||||||
|
'checkbox' => 0,
|
||||||
|
'default' => 0,
|
||||||
|
'range' => [
|
||||||
|
'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
|
||||||
|
],
|
||||||
|
'behaviour' => [
|
||||||
|
'allowLanguageSynchronization' => true,
|
||||||
|
],
|
||||||
|
'renderType' => 'inputDateTime',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'endtime' => [
|
||||||
|
'exclude' => 0,
|
||||||
|
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'input',
|
||||||
|
'size' => 13,
|
||||||
|
'eval' => 'datetime',
|
||||||
|
'checkbox' => 0,
|
||||||
|
'default' => 0,
|
||||||
|
'range' => [
|
||||||
|
'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
|
||||||
|
],
|
||||||
|
'behaviour' => [
|
||||||
|
'allowLanguageSynchronization' => true,
|
||||||
|
],
|
||||||
|
'renderType' => 'inputDateTime',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
'date_from' => [
|
||||||
|
'exclude' => false,
|
||||||
|
'label' => 'Datum von',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'input',
|
||||||
|
'size' => 8,
|
||||||
|
'eval' => 'date,required',
|
||||||
|
'renderType' => 'inputDateTime',
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'date_to' => [
|
||||||
|
'exclude' => false,
|
||||||
|
'label' => 'Datum bis',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'input',
|
||||||
|
'size' => 8,
|
||||||
|
'eval' => 'date,required',
|
||||||
|
'renderType' => 'inputDateTime',
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'persons_included' => [
|
||||||
|
'exclude' => false,
|
||||||
|
'label' => 'Inklusiv-Personen',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'input',
|
||||||
|
'size' => 4,
|
||||||
|
'eval' => 'int,required',
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'price' => [
|
||||||
|
'exclude' => false,
|
||||||
|
'label' => 'Preis pro Nacht',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'input',
|
||||||
|
'size' => 8,
|
||||||
|
'eval' => 'double2,required',
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'price_additional_person' => [
|
||||||
|
'exclude' => false,
|
||||||
|
'label' => 'Preis weitere Person',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'input',
|
||||||
|
'size' => 8,
|
||||||
|
'eval' => 'double2,required',
|
||||||
|
]
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
+149
@@ -0,0 +1,149 @@
|
|||||||
|
<?php
|
||||||
|
return [
|
||||||
|
'ctrl' => [
|
||||||
|
'title' => 'Gruppenhaus Zusatzleistung',
|
||||||
|
'default_sortby' => 'ORDER BY price',
|
||||||
|
'sortby' => 'sorting',
|
||||||
|
'label' => 'title',
|
||||||
|
'tstamp' => 'tstamp',
|
||||||
|
'crdate' => 'crdate',
|
||||||
|
'cruser_id' => 'cruser_id',
|
||||||
|
'dividers2tabs' => true,
|
||||||
|
'versioningWS' => true,
|
||||||
|
'languageField' => 'sys_language_uid',
|
||||||
|
'transOrigPointerField' => 'l10n_parent',
|
||||||
|
'transOrigDiffSourceField' => 'l10n_diffsource',
|
||||||
|
'delete' => 'deleted',
|
||||||
|
'enablecolumns' => [
|
||||||
|
'disabled' => 'hidden',
|
||||||
|
'starttime' => 'starttime',
|
||||||
|
'endtime' => 'endtime',
|
||||||
|
],
|
||||||
|
'searchFields' => 'title',
|
||||||
|
'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg',
|
||||||
|
'hideTable' => true,
|
||||||
|
],
|
||||||
|
'interface' => [
|
||||||
|
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, price',
|
||||||
|
],
|
||||||
|
'types' => [
|
||||||
|
'1' => [
|
||||||
|
'showitem' => 'title, price',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'palettes' => [
|
||||||
|
],
|
||||||
|
'columns' => [
|
||||||
|
|
||||||
|
'sys_language_uid' => [
|
||||||
|
'exclude' => 0,
|
||||||
|
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'select',
|
||||||
|
'renderType' => 'selectSingle',
|
||||||
|
'foreign_table' => 'sys_language',
|
||||||
|
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||||
|
'items' => [
|
||||||
|
['LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1],
|
||||||
|
['LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0]
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'l10n_parent' => [
|
||||||
|
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
||||||
|
'exclude' => 0,
|
||||||
|
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'select',
|
||||||
|
'renderType' => 'selectSingle',
|
||||||
|
'items' => [
|
||||||
|
['', 0],
|
||||||
|
],
|
||||||
|
'foreign_table' => 'tx_epproducts_domain_model_groupspriceoption',
|
||||||
|
'foreign_table_where' => 'AND tx_epproducts_domain_model_groupspriceoption.pid=###CURRENT_PID### AND tx_epproducts_domain_model_groupspriceoption.sys_language_uid IN (-1,0)',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'l10n_diffsource' => [
|
||||||
|
'config' => [
|
||||||
|
'type' => 'passthrough',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
't3ver_label' => [
|
||||||
|
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'input',
|
||||||
|
'size' => 30,
|
||||||
|
'max' => 255,
|
||||||
|
]
|
||||||
|
],
|
||||||
|
|
||||||
|
'hidden' => [
|
||||||
|
'exclude' => 0,
|
||||||
|
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'check',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'starttime' => [
|
||||||
|
'exclude' => 0,
|
||||||
|
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'input',
|
||||||
|
'size' => 13,
|
||||||
|
'eval' => 'datetime',
|
||||||
|
'checkbox' => 0,
|
||||||
|
'default' => 0,
|
||||||
|
'range' => [
|
||||||
|
'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
|
||||||
|
],
|
||||||
|
'behaviour' => [
|
||||||
|
'allowLanguageSynchronization' => true,
|
||||||
|
],
|
||||||
|
'renderType' => 'inputDateTime',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'endtime' => [
|
||||||
|
'exclude' => 0,
|
||||||
|
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'input',
|
||||||
|
'size' => 13,
|
||||||
|
'eval' => 'datetime',
|
||||||
|
'checkbox' => 0,
|
||||||
|
'default' => 0,
|
||||||
|
'range' => [
|
||||||
|
'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
|
||||||
|
],
|
||||||
|
'behaviour' => [
|
||||||
|
'allowLanguageSynchronization' => true,
|
||||||
|
],
|
||||||
|
'renderType' => 'inputDateTime',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
'title' => [
|
||||||
|
'exclude' => false,
|
||||||
|
'label' => 'Bezeichnung',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'input',
|
||||||
|
'size' => 32,
|
||||||
|
'eval' => 'required',
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'price' => [
|
||||||
|
'exclude' => false,
|
||||||
|
'label' => 'Preis',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'input',
|
||||||
|
'size' => 8,
|
||||||
|
'eval' => 'double2,required',
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'sorting' => [
|
||||||
|
'config' => [
|
||||||
|
'type' => 'passthrough'
|
||||||
|
]
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
+66
-6
@@ -28,7 +28,7 @@ return [
|
|||||||
address, longitude, latitude, headline, teaser, description, features, room_types, additional_information,
|
address, longitude, latitude, headline, teaser, description, features, room_types, additional_information,
|
||||||
teaser_images, header_images, images, reseller_images, code, type, category, country, region, city, facts,
|
teaser_images, header_images, images, reseller_images, code, type, category, country, region, city, facts,
|
||||||
teamer, products, header_title,header_subtitle, earlybird, new, low_contingent, show_as_teaser,
|
teamer, products, header_title,header_subtitle, earlybird, new, low_contingent, show_as_teaser,
|
||||||
external_link, path_segment',
|
external_link, path_segment, groups_price_configs, groups_price_boards, groups_price_options',
|
||||||
],
|
],
|
||||||
'types' => [
|
'types' => [
|
||||||
'1' => [
|
'1' => [
|
||||||
@@ -36,7 +36,8 @@ return [
|
|||||||
--palette--;;destinations, --palette--;;categories, keywords,
|
--palette--;;destinations, --palette--;;categories, keywords,
|
||||||
--div--;Texte, teaser, description, features, room_types, additional_information,
|
--div--;Texte, teaser, description, features, room_types, additional_information,
|
||||||
--div--;Verknüpfungen, facts, teamer, additional_codes,
|
--div--;Verknüpfungen, facts, teamer, additional_codes,
|
||||||
--div--;Bilder/Dateien, teaser_images, header_images, images, reseller_images',
|
--div--;Bilder/Dateien, teaser_images, header_images, images, reseller_images,
|
||||||
|
--div--;Gruppenhaus Preise, groups_price_configs, groups_price_boards, groups_price_options',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'palettes' => [
|
'palettes' => [
|
||||||
@@ -592,7 +593,7 @@ return [
|
|||||||
'additional_codes' => [
|
'additional_codes' => [
|
||||||
'exclude' => 0,
|
'exclude' => 0,
|
||||||
'label' => 'Zusätzliche Codes',
|
'label' => 'Zusätzliche Codes',
|
||||||
'config' => array(
|
'config' => [
|
||||||
'type' => 'inline',
|
'type' => 'inline',
|
||||||
'foreign_table' => 'tx_epproducts_domain_model_matchcode',
|
'foreign_table' => 'tx_epproducts_domain_model_matchcode',
|
||||||
'foreign_field' => 'entity',
|
'foreign_field' => 'entity',
|
||||||
@@ -600,15 +601,15 @@ return [
|
|||||||
'entity_type' => 'hotel',
|
'entity_type' => 'hotel',
|
||||||
],
|
],
|
||||||
'maxitems' => 10,
|
'maxitems' => 10,
|
||||||
'appearance' => array(
|
'appearance' => [
|
||||||
'collapseAll' => 1,
|
'collapseAll' => 1,
|
||||||
'levelLinksPosition' => 'top',
|
'levelLinksPosition' => 'top',
|
||||||
'showSynchronizationLink' => 0,
|
'showSynchronizationLink' => 0,
|
||||||
'showPossibleLocalizationRecords' => 0,
|
'showPossibleLocalizationRecords' => 0,
|
||||||
'showAllLocalizationLink' => 0,
|
'showAllLocalizationLink' => 0,
|
||||||
'expandSingle' => 1,
|
'expandSingle' => 1,
|
||||||
),
|
],
|
||||||
),
|
],
|
||||||
],
|
],
|
||||||
'latitude' => [
|
'latitude' => [
|
||||||
'exclude' => 0,
|
'exclude' => 0,
|
||||||
@@ -654,5 +655,64 @@ return [
|
|||||||
'eval' => 'uniqueInSite',
|
'eval' => 'uniqueInSite',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
'groups_price_configs' => [
|
||||||
|
'exclude' => 0,
|
||||||
|
'label' => 'Preiskonfigurationen',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'inline',
|
||||||
|
'foreign_table' => 'tx_epproducts_domain_model_groupspriceconfig',
|
||||||
|
'foreign_field' => 'hotel',
|
||||||
|
'maxitems' => 99,
|
||||||
|
'minitems' => 0,
|
||||||
|
'appearance' => [
|
||||||
|
'collapseAll' => 1,
|
||||||
|
'levelLinksPosition' => 'top',
|
||||||
|
'showSynchronizationLink' => 0,
|
||||||
|
'showPossibleLocalizationRecords' => 0,
|
||||||
|
'showAllLocalizationLink' => 0,
|
||||||
|
'expandSingle' => 1,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'groups_price_boards' => [
|
||||||
|
'exclude' => 0,
|
||||||
|
'label' => 'Verpflegungsleistungen',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'inline',
|
||||||
|
'foreign_table' => 'tx_epproducts_domain_model_groupspriceboard',
|
||||||
|
'foreign_field' => 'hotel',
|
||||||
|
'maxitems' => 99,
|
||||||
|
'minitems' => 0,
|
||||||
|
'appearance' => [
|
||||||
|
'useSortable' => true,
|
||||||
|
'collapseAll' => 1,
|
||||||
|
'levelLinksPosition' => 'top',
|
||||||
|
'showSynchronizationLink' => 0,
|
||||||
|
'showPossibleLocalizationRecords' => 0,
|
||||||
|
'showAllLocalizationLink' => 0,
|
||||||
|
'expandSingle' => 1,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'groups_price_options' => [
|
||||||
|
'exclude' => 0,
|
||||||
|
'label' => 'Optionale Zusatzleistungen',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'inline',
|
||||||
|
'foreign_table' => 'tx_epproducts_domain_model_groupspriceoption',
|
||||||
|
'foreign_field' => 'hotel',
|
||||||
|
'maxitems' => 99,
|
||||||
|
'minitems' => 0,
|
||||||
|
'appearance' => [
|
||||||
|
'useSortable' => true,
|
||||||
|
'collapseAll' => 1,
|
||||||
|
'levelLinksPosition' => 'top',
|
||||||
|
'showSynchronizationLink' => 0,
|
||||||
|
'showPossibleLocalizationRecords' => 0,
|
||||||
|
'showAllLocalizationLink' => 0,
|
||||||
|
'expandSingle' => 1,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -133,6 +133,9 @@ tx_epproducts_ajax_json {
|
|||||||
AjaxWatchlist {
|
AjaxWatchlist {
|
||||||
1 = list
|
1 = list
|
||||||
}
|
}
|
||||||
|
AjaxGroupsPrice {
|
||||||
|
1 = index
|
||||||
|
}
|
||||||
}
|
}
|
||||||
features.requireCHashArgumentForActionArguments = 0
|
features.requireCHashArgumentForActionArguments = 0
|
||||||
settings =< plugin.tx_epproducts.settings
|
settings =< plugin.tx_epproducts.settings
|
||||||
|
|||||||
@@ -345,6 +345,7 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\EP\EpProducts\T
|
|||||||
'AjaxTable' => 'pricetable,pricetableHtml,eventPricetable',
|
'AjaxTable' => 'pricetable,pricetableHtml,eventPricetable',
|
||||||
'AjaxCalendar' => 'range,contingents,availableRooms',
|
'AjaxCalendar' => 'range,contingents,availableRooms',
|
||||||
'AjaxWatchlist' => 'list',
|
'AjaxWatchlist' => 'list',
|
||||||
|
'AjaxGroupsPrice' => 'index',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'AjaxSearch' => 'searchresult',
|
'AjaxSearch' => 'searchresult',
|
||||||
@@ -355,6 +356,7 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\EP\EpProducts\T
|
|||||||
'AjaxTable' => 'pricetable,pricetableHtml,eventPricetable',
|
'AjaxTable' => 'pricetable,pricetableHtml,eventPricetable',
|
||||||
'AjaxCalendar' => 'range,contingents,availableRooms',
|
'AjaxCalendar' => 'range,contingents,availableRooms',
|
||||||
'AjaxWatchlist' => 'list',
|
'AjaxWatchlist' => 'list',
|
||||||
|
'AjaxGroupsPrice' => 'index',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -382,6 +384,7 @@ $GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epp
|
|||||||
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_ajax[months]';
|
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_ajax[months]';
|
||||||
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_ajax[month]';
|
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_ajax[month]';
|
||||||
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_ajax[year]';
|
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_ajax[year]';
|
||||||
|
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_ajax[hotel]';
|
||||||
|
|
||||||
$GLOBALS['TYPO3_CONF_VARS']['LOG']['EP']['EpProducts']['Controller']['writerConfiguration'] = [
|
$GLOBALS['TYPO3_CONF_VARS']['LOG']['EP']['EpProducts']['Controller']['writerConfiguration'] = [
|
||||||
\TYPO3\CMS\Core\Log\LogLevel::INFO => [
|
\TYPO3\CMS\Core\Log\LogLevel::INFO => [
|
||||||
|
|||||||
@@ -238,6 +238,9 @@ CREATE TABLE tx_epproducts_domain_model_hotel
|
|||||||
address varchar(255) DEFAULT '' NOT NULL,
|
address varchar(255) DEFAULT '' NOT NULL,
|
||||||
latitude varchar(255) DEFAULT '' NOT NULL,
|
latitude varchar(255) DEFAULT '' NOT NULL,
|
||||||
longitude varchar(255) DEFAULT '' NOT NULL,
|
longitude varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
groups_price_configs int(11) unsigned NOT NULL default '0',
|
||||||
|
groups_price_options int(11) unsigned NOT NULL default '0',
|
||||||
|
groups_price_boards int(11) unsigned NOT NULL default '0',
|
||||||
|
|
||||||
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
|
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
crdate int(11) unsigned DEFAULT '0' NOT NULL,
|
crdate int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
@@ -268,6 +271,137 @@ CREATE TABLE tx_epproducts_domain_model_hotel
|
|||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#
|
||||||
|
# Table structure for table 'tx_epproducts_domain_model_groupspriceconfig'
|
||||||
|
#
|
||||||
|
CREATE TABLE tx_epproducts_domain_model_groupspriceconfig
|
||||||
|
(
|
||||||
|
|
||||||
|
uid int(11) NOT NULL auto_increment,
|
||||||
|
pid int(11) DEFAULT '0' NOT NULL,
|
||||||
|
|
||||||
|
date_from int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
date_to int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
persons_included int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
price float(8) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
price_additional_person float(8) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
hotel int(11) unsigned DEFAULT '0',
|
||||||
|
|
||||||
|
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
crdate int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
starttime int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
endtime int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
|
||||||
|
t3ver_oid int(11) DEFAULT '0' NOT NULL,
|
||||||
|
t3ver_id int(11) DEFAULT '0' NOT NULL,
|
||||||
|
t3ver_wsid int(11) DEFAULT '0' NOT NULL,
|
||||||
|
t3ver_label varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
|
||||||
|
t3ver_stage int(11) DEFAULT '0' NOT NULL,
|
||||||
|
t3ver_count int(11) DEFAULT '0' NOT NULL,
|
||||||
|
t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
|
||||||
|
t3ver_move_id int(11) DEFAULT '0' NOT NULL,
|
||||||
|
|
||||||
|
sys_language_uid int(11) DEFAULT '0' NOT NULL,
|
||||||
|
l10n_parent int(11) DEFAULT '0' NOT NULL,
|
||||||
|
l10n_diffsource mediumblob,
|
||||||
|
|
||||||
|
PRIMARY KEY (uid),
|
||||||
|
KEY parent (pid),
|
||||||
|
KEY t3ver_oid (t3ver_oid, t3ver_wsid),
|
||||||
|
KEY language (l10n_parent, sys_language_uid)
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
#
|
||||||
|
# Table structure for table 'tx_epproducts_domain_model_groupspriceoption'
|
||||||
|
#
|
||||||
|
CREATE TABLE tx_epproducts_domain_model_groupspriceoption
|
||||||
|
(
|
||||||
|
|
||||||
|
uid int(11) NOT NULL auto_increment,
|
||||||
|
pid int(11) DEFAULT '0' NOT NULL,
|
||||||
|
|
||||||
|
title varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
price float(8) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
hotel int(11) unsigned DEFAULT '0',
|
||||||
|
sorting int(11) DEFAULT '0' NOT NULL,
|
||||||
|
|
||||||
|
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
crdate int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
starttime int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
endtime int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
|
||||||
|
t3ver_oid int(11) DEFAULT '0' NOT NULL,
|
||||||
|
t3ver_id int(11) DEFAULT '0' NOT NULL,
|
||||||
|
t3ver_wsid int(11) DEFAULT '0' NOT NULL,
|
||||||
|
t3ver_label varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
|
||||||
|
t3ver_stage int(11) DEFAULT '0' NOT NULL,
|
||||||
|
t3ver_count int(11) DEFAULT '0' NOT NULL,
|
||||||
|
t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
|
||||||
|
t3ver_move_id int(11) DEFAULT '0' NOT NULL,
|
||||||
|
|
||||||
|
sys_language_uid int(11) DEFAULT '0' NOT NULL,
|
||||||
|
l10n_parent int(11) DEFAULT '0' NOT NULL,
|
||||||
|
l10n_diffsource mediumblob,
|
||||||
|
|
||||||
|
PRIMARY KEY (uid),
|
||||||
|
KEY parent (pid),
|
||||||
|
KEY t3ver_oid (t3ver_oid, t3ver_wsid),
|
||||||
|
KEY language (l10n_parent, sys_language_uid)
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
#
|
||||||
|
# Table structure for table 'tx_epproducts_domain_model_groupspriceboard'
|
||||||
|
#
|
||||||
|
CREATE TABLE tx_epproducts_domain_model_groupspriceboard
|
||||||
|
(
|
||||||
|
|
||||||
|
uid int(11) NOT NULL auto_increment,
|
||||||
|
pid int(11) DEFAULT '0' NOT NULL,
|
||||||
|
|
||||||
|
title varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
price float(8) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
hotel int(11) unsigned DEFAULT '0',
|
||||||
|
sorting int(11) DEFAULT '0' NOT NULL,
|
||||||
|
|
||||||
|
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
crdate int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
starttime int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
endtime int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
|
||||||
|
t3ver_oid int(11) DEFAULT '0' NOT NULL,
|
||||||
|
t3ver_id int(11) DEFAULT '0' NOT NULL,
|
||||||
|
t3ver_wsid int(11) DEFAULT '0' NOT NULL,
|
||||||
|
t3ver_label varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
|
||||||
|
t3ver_stage int(11) DEFAULT '0' NOT NULL,
|
||||||
|
t3ver_count int(11) DEFAULT '0' NOT NULL,
|
||||||
|
t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
|
||||||
|
t3ver_move_id int(11) DEFAULT '0' NOT NULL,
|
||||||
|
|
||||||
|
sys_language_uid int(11) DEFAULT '0' NOT NULL,
|
||||||
|
l10n_parent int(11) DEFAULT '0' NOT NULL,
|
||||||
|
l10n_diffsource mediumblob,
|
||||||
|
|
||||||
|
PRIMARY KEY (uid),
|
||||||
|
KEY parent (pid),
|
||||||
|
KEY t3ver_oid (t3ver_oid, t3ver_wsid),
|
||||||
|
KEY language (l10n_parent, sys_language_uid)
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
#
|
#
|
||||||
# Table structure for table 'tx_epproducts_domain_model_room'
|
# Table structure for table 'tx_epproducts_domain_model_room'
|
||||||
#
|
#
|
||||||
|
|||||||
+53
@@ -0,0 +1,53 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
Foo!
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import axios from 'axios';
|
||||||
|
import $ from 'jquery';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
endpoint: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
processing: false,
|
||||||
|
price: {},
|
||||||
|
configs: [],
|
||||||
|
boards: [],
|
||||||
|
options: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
load () {
|
||||||
|
this.processing = true;
|
||||||
|
axios({
|
||||||
|
url: this.endpoint,
|
||||||
|
method: 'POST',
|
||||||
|
data: $.param({
|
||||||
|
'tx_epproducts_ajax[pax]': 60,
|
||||||
|
'tx_epproducts_ajax[dateFrom]': '2020-04-28',
|
||||||
|
'tx_epproducts_ajax[dateTo]': '2020-04-31'
|
||||||
|
})
|
||||||
|
}).then(response => {
|
||||||
|
this.configs = response.data.configs;
|
||||||
|
this.boards = response.data.boards;
|
||||||
|
this.options = response.data.options;
|
||||||
|
this.price = response.data.price;
|
||||||
|
}).catch(error => {
|
||||||
|
}).finally(() => {
|
||||||
|
this.processing = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
this.load();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -28,6 +28,7 @@
|
|||||||
DaterangeSelect,
|
DaterangeSelect,
|
||||||
AjaxContent,
|
AjaxContent,
|
||||||
Calendar,
|
Calendar,
|
||||||
|
GroupsPriceCalculator: () => import('./GroupsPriceCalculator.vue'),
|
||||||
FacebookPixel,
|
FacebookPixel,
|
||||||
WatchlistToggle,
|
WatchlistToggle,
|
||||||
OsmMap,
|
OsmMap,
|
||||||
|
|||||||
@@ -87,6 +87,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="hidden-xs">
|
<div class="hidden-xs">
|
||||||
|
<f:comment>
|
||||||
|
<f:if condition="{product.calendarHotel}">
|
||||||
|
<groups-price-calculator
|
||||||
|
endpoint="{ep:uri.ajax(action: 'index', controller: 'AjaxGroupsPrice', extensionName: 'epproducts', pageUid: settings.defaultAjaxUid, arguments: '{hotel: hotel}')}"
|
||||||
|
></groups-price-calculator>
|
||||||
|
</f:if>
|
||||||
|
</f:comment>
|
||||||
<f:render section="Calendar" arguments="{_all}"/>
|
<f:render section="Calendar" arguments="{_all}"/>
|
||||||
<f:render partial="Facts" arguments="{facts: product.facts}"/>
|
<f:render partial="Facts" arguments="{facts: product.facts}"/>
|
||||||
<f:if condition="{product.video}">
|
<f:if condition="{product.video}">
|
||||||
|
|||||||
Reference in New Issue
Block a user