diff --git a/modules/dashproducts/dashproducts.php b/modules/dashproducts/dashproducts.php index 3cbe6fc69..f3927610c 100644 --- a/modules/dashproducts/dashproducts.php +++ b/modules/dashproducts/dashproducts.php @@ -561,7 +561,7 @@ class DashProducts extends Module LEFT JOIN `'._DB_PREFIX_.'date_range` dr ON pv.`id_date_range` = dr.`id_date_range` LEFT JOIN `'._DB_PREFIX_.'page` p ON pv.`id_page` = p.`id_page` LEFT JOIN `'._DB_PREFIX_.'page_type` pt ON pt.`id_page_type` = p.`id_page_type` - LEFT JOIN `'._DB_PREFIX_.'htl_room_type` hrt ON hrt.`id_product` = p.`id_object` + INNER JOIN `'._DB_PREFIX_.'htl_room_type` hrt ON hrt.`id_product` = p.`id_object` WHERE pt.`name` = \'product\' '.Shop::addSqlRestriction(false, 'pv').' AND dr.`time_start` BETWEEN "'.pSQL($date_from).' 00:00:00" AND "'.pSQL($date_to).' 23:59:59" diff --git a/modules/statsbestproducts/statsbestproducts.php b/modules/statsbestproducts/statsbestproducts.php index 04dfe49ff..1d91fd849 100644 --- a/modules/statsbestproducts/statsbestproducts.php +++ b/modules/statsbestproducts/statsbestproducts.php @@ -205,7 +205,8 @@ class StatsBestProducts extends ModuleGrid LEFT JOIN `'._DB_PREFIX_.'htl_room_type` hrt ON (hrt.`id_product` = p.`id_product`) LEFT JOIN `'._DB_PREFIX_.'htl_branch_info_lang` hbil - ON (hbil.`id` = hrt.`id_hotel` AND hbil.`id_lang` = '.(int) $id_lang .')'; + ON (hbil.`id` = hrt.`id_hotel` AND hbil.`id_lang` = '.(int) $id_lang .') + WHERE p.`booking_product` = 1'; if (Validate::IsName($this->_sort)) { $this->query .= ' ORDER BY `'.bqSQL($this->_sort).'`';