diff --git a/admin/themes/default/template/controllers/orders/helpers/view/view.tpl b/admin/themes/default/template/controllers/orders/helpers/view/view.tpl
index 57b1384ae..b72c4e4cb 100644
--- a/admin/themes/default/template/controllers/orders/helpers/view/view.tpl
+++ b/admin/themes/default/template/controllers/orders/helpers/view/view.tpl
@@ -1259,9 +1259,9 @@
{displayPrice price=$discount['value'] currency=$currency->id}
{if $can_edit}
-
-
-
+ |
+
+
{l s='Delete voucher'}
|
diff --git a/classes/Product.php b/classes/Product.php
index 84fc215a2..9af80ed4f 100644
--- a/classes/Product.php
+++ b/classes/Product.php
@@ -2580,9 +2580,15 @@ class ProductCore extends ObjectModel
$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,
diff --git a/classes/Tools.php b/classes/Tools.php
index c48c02177..58ab06580 100644
--- a/classes/Tools.php
+++ b/classes/Tools.php
@@ -3603,6 +3603,8 @@ exit;
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;
diff --git a/modules/hotelreservationsystem/classes/HotelRoomTypeFeaturePricing.php b/modules/hotelreservationsystem/classes/HotelRoomTypeFeaturePricing.php
index 29e33a3bb..76b77a65c 100644
--- a/modules/hotelreservationsystem/classes/HotelRoomTypeFeaturePricing.php
+++ b/modules/hotelreservationsystem/classes/HotelRoomTypeFeaturePricing.php
@@ -260,7 +260,6 @@ class HotelRoomTypeFeaturePricing extends ObjectModel
$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));
@@ -283,7 +282,7 @@ class HotelRoomTypeFeaturePricing extends ObjectModel
$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;
@@ -293,7 +292,7 @@ class HotelRoomTypeFeaturePricing extends ObjectModel
if ($hotelRoomTypes) {
$roomTypeRatesAndInventory[$incr]['date'] = $currentDate;
foreach ($hotelRoomTypes as $key => $product) {
- $roomTypePrice = $hotelCartBookingData->getRoomTypeTotalPrice(
+ $roomTypePrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice(
$product['id_product'],
$currentDate,
$nextDayDate