Merge branch 'hotfix/template-code'
This commit is contained in:
@@ -94,7 +94,8 @@ class AjaxContingentController extends ActionController
|
||||
*/
|
||||
public function roomsAction(Hotel $hotel, Product $product, \DateTime $dateFrom, \DateTime $dateTo)
|
||||
{
|
||||
$rooms = $this->contingentDataService->getAvailableRooms($dateFrom, $dateTo, $hotel, $product);
|
||||
$template = $this->settings['bpnBookingUrlTemplateCode'];
|
||||
$rooms = $this->contingentDataService->getAvailableRooms($dateFrom, $dateTo, $hotel, $product, $template);
|
||||
|
||||
return \json_encode($rooms);
|
||||
}
|
||||
|
||||
@@ -76,11 +76,17 @@ class ContingentDataService
|
||||
* @param \DateTime $dateTo
|
||||
* @param Hotel $hotel
|
||||
* @param Product $product
|
||||
* @param string $template
|
||||
* @return array
|
||||
* @throws \Doctrine\DBAL\DBALException
|
||||
*/
|
||||
public function getAvailableRooms(\DateTime $dateFrom, \DateTime $dateTo, Hotel $hotel, Product $product)
|
||||
{
|
||||
public function getAvailableRooms(
|
||||
\DateTime $dateFrom,
|
||||
\DateTime $dateTo,
|
||||
Hotel $hotel,
|
||||
Product $product,
|
||||
$template = 'base'
|
||||
) {
|
||||
$data = $this->contingentRepository->getAvailableRooms($dateFrom, $dateTo, $hotel, $product);
|
||||
|
||||
$rooms = [];
|
||||
@@ -91,6 +97,7 @@ class ContingentDataService
|
||||
'bookingId' => $row['busProId'],
|
||||
'hotelId' => $row['hotelBusProId'],
|
||||
'dateEnd' => $dateTo->format('Y-m-d'),
|
||||
'template' => $template,
|
||||
]);
|
||||
|
||||
$row['servicesIncluded'] = unserialize($row['servicesIncluded']);
|
||||
|
||||
@@ -41,6 +41,7 @@ plugin.tx_epproducts {
|
||||
resellerExportPageUid = {$plugin.tx_epproducts.settings.resellerExportPageUid}
|
||||
ratingPageUid = {$plugin.tx_eptheme.settings.ratingPageUid}
|
||||
searchPageHeaderImage = {$plugin.tx_eptheme.settings.searchPageHeaderImage}
|
||||
bpnBookingUrlTemplateCode = {$plugin.tx_eptheme.settings.bpnBookingUrlTemplateCode}
|
||||
datePickerPresets {
|
||||
1 {
|
||||
label = Silvester
|
||||
|
||||
Reference in New Issue
Block a user