From ed2f95e2a7527f09d6afdfac447650add71185ea Mon Sep 17 00:00:00 2001 From: Tobias Krais Date: Wed, 16 Jan 2019 21:45:06 +0100 Subject: [PATCH] added OpenImmo category parking --- install.php | 1 + lang/de_de.lang | 11 +++++++++ lib/d2u_immo_module_manager.php | 2 +- lib/property.php | 8 ++++++ modules/70/1/install.php | 6 ++++- modules/70/1/output.php | 2 +- pages/contact.php | 2 +- pages/property.php | 31 +++++++++++++++++++++++- pages/setup.php | 1 + plugins/export/lib/immobilienscout24.php | 18 +++++++------- plugins/export/lib/openimmo.php | 4 +++ update.php | 9 +++++-- 12 files changed, 79 insertions(+), 16 deletions(-) diff --git a/install.php b/install.php index 927ad73..537c10d 100644 --- a/install.php +++ b/install.php @@ -51,6 +51,7 @@ land_type varchar(255) collate utf8_general_ci default NULL, office_type varchar(255) collate utf8_general_ci default NULL, hall_warehouse_type varchar(255) collate utf8_general_ci default NULL, + parking_type varchar(255) collate utf8_general_ci default NULL, other_type varchar(255) collate utf8_general_ci default NULL, street varchar(100) collate utf8_general_ci default NULL, house_number varchar(5) collate utf8_general_ci default NULL, diff --git a/lang/de_de.lang b/lang/de_de.lang index f0b44c5..9ff2e29 100644 --- a/lang/de_de.lang +++ b/lang/de_de.lang @@ -222,6 +222,7 @@ d2u_immo_property_object_type_grundstueck = Grundstück d2u_immo_property_object_type_hallen_lager_prod = Halle oder Lager d2u_immo_property_object_type_haus = Haus d2u_immo_property_object_type_land_und_forstwirtschaft = Land und Forstwirtschaft +d2u_immo_property_object_type_parken = Parken d2u_immo_property_object_type_sonstige = Sonstige d2u_immo_property_object_type_wohnung = Wohnung d2u_immo_property_object_type_zimmer = Zimmer @@ -246,6 +247,16 @@ d2u_immo_property_parking_space_duplex = Anzahl Duplex Parkplätze d2u_immo_property_parking_space_garage = Anzahl Garagenparkplätze d2u_immo_property_parking_space_simple = Anzahl Stellplätze d2u_immo_property_parking_space_undergroundcarpark = Anzahl Tiefgaragenparkplätze +d2u_immo_property_parking_type_BOOTSLIEGEPLATZ = Bootsliegeplatz +d2u_immo_property_parking_type_CARPORT = Carport +d2u_immo_property_parking_type_DOPPELGARAGE = Doppelgarage +d2u_immo_property_parking_type_DUPLEX = Duplex +d2u_immo_property_parking_type_EINZELGARAGE = Einzelgarage +d2u_immo_property_parking_type_PARKHAUS = Parkhaus +d2u_immo_property_parking_type_PARKPLATZ_STROM = Parkplatz mit Ladestation für Elektrofahrzeuge +d2u_immo_property_parking_type_STELLPLATZ = Stellplatz +d2u_immo_property_parking_type_TIEFGARAGENSTELLPLATZ = Tiefgaragenstellplatz +d2u_immo_property_parking_type_TIEFGARAGE = Tiefgarage d2u_immo_property_prices = Preise d2u_immo_property_publish_address = Adresse anzeigen? d2u_immo_property_purchase_price = Kaufpreis diff --git a/lib/d2u_immo_module_manager.php b/lib/d2u_immo_module_manager.php index 5b161c9..4ce84e6 100644 --- a/lib/d2u_immo_module_manager.php +++ b/lib/d2u_immo_module_manager.php @@ -13,7 +13,7 @@ public static function getModules() { $modules = []; $modules[] = new D2UModule("70-1", "D2U Immo Addon - Hauptausgabe", - 10); + 11); $modules[] = new D2UModule("70-2", "D2U Immo Addon - Infobox Ansprechpartner", 2); diff --git a/lib/property.php b/lib/property.php index abd6477..315b468 100644 --- a/lib/property.php +++ b/lib/property.php @@ -78,6 +78,12 @@ class Property implements \D2U_Helper\ITranslationHelper { */ var $hall_warehouse_type = ""; + /** + * @var string Type of car parking places. Values are defined in OpenImmo definition + * of value "parken". + */ + var $parking_type = ""; + /** * @var string Type of office. Values are defined in OpenImmo definition * of value "sonstige_typ". @@ -491,6 +497,7 @@ public function __construct($property_id, $clang_id) { $this->parking_space_garage = $result->getValue("parking_space_garage"); $this->parking_space_simple = $result->getValue("parking_space_simple"); $this->parking_space_undergroundcarpark = $result->getValue("parking_space_undergroundcarpark"); + $this->parking_type = $result->getValue("parking_type"); $this->pictures = preg_grep('/^\s*$/s', explode(",", $result->getValue("pictures")), PREG_GREP_INVERT); $this->priority = $result->getValue("priority"); $this->publish_address = $result->getValue("publish_address") == "1" ? TRUE : FALSE; @@ -918,6 +925,7 @@ public function save() { ."parking_space_garage = ". $this->parking_space_garage .", " ."parking_space_simple = ". $this->parking_space_simple .", " ."parking_space_undergroundcarpark = ". $this->parking_space_undergroundcarpark .", " + ."parking_type = '". $this->parking_type ."', " ."pictures = '". implode(",", $this->pictures) ."', " ."publish_address = ". ($this->publish_address ? 1 : 0) .", " ."purchase_price = ". $this->purchase_price .", " diff --git a/modules/70/1/install.php b/modules/70/1/install.php index b67a1c2..6bc8eae 100644 --- a/modules/70/1/install.php +++ b/modules/70/1/install.php @@ -1,2 +1,6 @@  '; - if($property->object_type != "grundstueck" && strlen($property->energy_pass) > 5) { + if(($property->object_type != "grundstueck" && $property->object_type != "parken") && strlen($property->energy_pass) > 5) { if($print != "") { // Remove when https://github.com/twbs/bootstrap/issues/22753 is solved print '
'; } diff --git a/pages/contact.php b/pages/contact.php index c412f58..8a36f12 100644 --- a/pages/contact.php +++ b/pages/contact.php @@ -127,7 +127,7 @@

-