Added New hooks for housekeeping and tripadvisor module

This commit is contained in:
vishalsingh.qlo325
2024-03-01 12:56:16 +05:30
parent 17256b4ccb
commit 9eb0534663
5 changed files with 18 additions and 2 deletions

View File

@@ -211,7 +211,9 @@ abstract class ObjectModelCore implements Core_Foundation_Database_EntityInterfa
throw new PrestaShopException('Identifier or table format not valid for class '.$class_name);
}
ObjectModel::$loaded_classes[$class_name] = get_object_vars($this);
$objProperties = get_object_vars($this);
Hook::exec('actionObject'.$class_name.'PropertiesModifier', array('obj_properties' => &$objProperties));
ObjectModel::$loaded_classes[$class_name] = $objProperties;
} else {
foreach (ObjectModel::$loaded_classes[$class_name] as $key => $value) {
$this->{$key} = $value;

View File

@@ -3205,6 +3205,14 @@ class AdminProductsControllerCore extends AdminController
$objHotelRoomDisableDates->reason = $disableDate['reason'];
$objHotelRoomDisableDates->add();
}
Hook::exec(
'actionRoomDisableDatesAddAfter',
array(
'room_info' => $roomInfo,
'disable_dates' => $disableDates
)
);
}
}
}

View File

@@ -89,7 +89,9 @@
</a>
</p>
</td>
<td>{$data_v['hotel_name']}</td>
<td>{$data_v['hotel_name']}
{hook h="displayOrderConfirmationHotelNameAfter" id_product=$data_v['id_product']}
</td>
<td class="text-center">
<p>
{if $rm_v['adults'] <= 9}0{$rm_v['adults']}{else}{$rm_v['adults']}{/if} {if $rm_v['adults'] > 1}{l s='Adults'}{else}{l s='Adult'}{/if}{if $rm_v['children']}, {if $rm_v['children'] <= 9}0{$rm_v['children']}{else} {$rm_v['children']}{/if} {if $rm_v['children'] > 1}{l s='Children'}{else}{l s='Child'}{/if}{/if}<br>{if $rm_v['num_rm'] <= 9}0{/if}{$rm_v['num_rm']} {if $rm_v['num_rm'] > 1}{l s='Rooms'}{else}{l s='Room'}{/if}

View File

@@ -72,9 +72,11 @@
{* Block for booking products *}
{if isset($id_hotel) && $id_hotel}&nbsp;-&nbsp;{$hotel_name}{/if}
</span>
{hook h='displayRoomTypeDetailRoomTypeNameBlock' id_product=$product->id}
</div>
{hook h='displayRoomTypeDetailRoomTypeNameAfter' id_product=$product->id}
</div>
{hook h='displayRoomTypeDetailRoomTypeImageBlockBefore' id_product=$product->id}
<!-- product img-->
<div class="row">

View File

@@ -108,12 +108,14 @@
{$data_v['name']}
</a>
<a class="btn btn-default pull-right product-xs-remove" href="{$rm_v['link']}"><i class="icon-trash"></i></a>
{hook h='displayCartRoomTypeNameAfter' id_product=$data_v['id_product']}
</p>
{if isset($data_v['hotel_info']['location'])}
<p class="hotel-location">
<i class="icon-map-marker"></i> &nbsp;{$data_v['hotel_info']['location']}
</p>
{/if}
{hook h='displayCartRoomTypeInfo' id_product=$data_v['id_product']}
</div>
</div>
{if isset($data_v['hotel_info']['room_features'])}