Skip to content

Commit

Permalink
Merge branch 'webkul:develop' into gli-1589
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek-webkul authored Sep 15, 2023
2 parents 99e52fd + ce93a98 commit 6442f47
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1259,9 +1259,9 @@
{displayPrice price=$discount['value'] currency=$currency->id}
</td>
{if $can_edit}
<td>
<a href="{$current_index}&amp;submitDeleteVoucher&amp;id_order_cart_rule={$discount['id_order_cart_rule']}&amp;id_order={$order->id}&amp;token={$smarty.get.token|escape:'html':'UTF-8'}">
<i class="icon-minus-sign"></i>
<td class="text-center">
<a class="btn btn-default" href="{$current_index}&amp;submitDeleteVoucher&amp;id_order_cart_rule={$discount['id_order_cart_rule']}&amp;id_order={$order->id}&amp;token={$smarty.get.token|escape:'html':'UTF-8'}">
<i class="icon-trash"></i>
{l s='Delete voucher'}
</a>
</td>
Expand Down
10 changes: 8 additions & 2 deletions classes/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -2580,9 +2580,15 @@ protected static function _getProductIdByDate($beginning, $ending, Context $cont

$id_address = $context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')};
$ids = Address::getCountryAndState($id_address);
$id_country = $ids['id_country'] ? (int) $ids['id_country'] : (int) Configuration::get('PS_COUNTRY_DEFAULT');

return SpecificPrice::getProductIdByDate(
$id_country = null;
if (isset($ids['id_country']) && (int) $ids['id_country']) {
$id_country = (int) $ids['id_country'];
} else {
$id_country = (int) Configuration::get('PS_COUNTRY_DEFAULT');
}

return SpecificPrice::getProductIdByDate(
$context->shop->id,
$context->currency->id,
$id_country,
Expand Down
2 changes: 2 additions & 0 deletions classes/Tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -3603,6 +3603,8 @@ public static function getDescriptionClean($description)

public static function purifyHTML($html, $uri_unescape = null, $allow_style = false)
{
require_once(_PS_TOOL_DIR_.'htmlpurifier/HTMLPurifier.auto.php');

static $use_html_purifier = null;
static $purifier = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ public function getHotelRoomTypesRatesAndInventoryByDate($id_hotel, $id_product=
$hotelRoomType = new HotelRoomType();
$context = Context::getContext();
$roomTypeRatesAndInventory = array();
$hotelCartBookingData = new HotelCartBookingData();
$objBookingDetail = new HotelBookingDetail();
$incr = 0;
$date_from = date('Y-m-d', strtotime($date_from));
Expand All @@ -283,7 +282,7 @@ public function getHotelRoomTypesRatesAndInventoryByDate($id_hotel, $id_product=
$totalAvailableRooms = 0;
}

$roomTypePrice = $hotelCartBookingData->getRoomTypeTotalPrice($id_product, $currentDate, $nextDayDate);
$roomTypePrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice($id_product, $currentDate, $nextDayDate);
$roomTypeRatesAndInventory[$incr]['date'] = $currentDate;
$roomTypeRatesAndInventory[$incr]['room_types'][0]['id'] = $id_product;
$roomTypeRatesAndInventory[$incr]['room_types'][0]['rates'] = $roomTypePrice;
Expand All @@ -293,7 +292,7 @@ public function getHotelRoomTypesRatesAndInventoryByDate($id_hotel, $id_product=
if ($hotelRoomTypes) {
$roomTypeRatesAndInventory[$incr]['date'] = $currentDate;
foreach ($hotelRoomTypes as $key => $product) {
$roomTypePrice = $hotelCartBookingData->getRoomTypeTotalPrice(
$roomTypePrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice(
$product['id_product'],
$currentDate,
$nextDayDate
Expand Down

0 comments on commit 6442f47

Please sign in to comment.