"Import/Export" module

Discussion of company’s product: questions and suggestions, issues and new modules.

Moderators: Koduc, Xpycm

Forum rules
Pay attention! Forum is not a means for guaranteed support of clients and users. An answer as well as a quick answer is not supposed on the forum. We post messages as soon as possible.

The message limit on the forum is 3 messages per day.
If you want to say "thank you" then use the function "Give good reputation point", which is a green icon "plus" under the nickname of the person, who answered the message.

"Import/Export" module

Postby Xpycm » 02 Jun 2013, 19:46

A paid module "Import/Export of listings", which has been available for Open Real Estate, version 1.2.x, is now released for ORE, version 1.4.x!


Instructions for Use:

Data from the listings is written in the *.csv file encoded in UTF-8 without BOM. No HTML special characters.

While doing the reverse operation (import), the file shuld be loaded in the same encoding.
Before importing make sure that the database contains the names of cities and references.

For paid versions the names of city and references ("Security", "Comfort", "Kitchen", "Bathroom", "Work", "Entertainment", "Services", "On conditions") are taken in the language by default. It means that if a languafe is "en" by default, and the name in the csv file is written in the Russian language (e.g."Москва"), you should correct it according to the language "en" name ("Moscow").

In the OpenOffice Calc you can open and save files in UTF-8 without BOM.

An example of a csv file after exporting data from the product (supported format), with the partition for lines for better understanding (there are language prefixes "ru", "en", "de" for the paid version):
A link to the image - https://www.dropbox.com/s/r32f1ajh19v33 ... csv_en.jpg

An example of a csv file of a free version:
A link to the image - https://www.dropbox.com/s/ojtjieas4zxau ... n_free.jpg

A view in the OpenOffice Calc:
A link to the image - https://www.dropbox.com/s/8hw8d5u1dr9dy ... office.jpg

The exporting fields:

    type - Type of transaction. A numerical value. Possible values can be: '1' — Rent property to smb, '2' - Sell, '3' — Rent property from smb, '4' - Buy, '5' - Exchange;

    priceType - Price type. A numerical value.
    Possible values can be:
    For type "Rent property to smb": '1' — USD per month, '2' — USD per hour, '3' — USD per day, '4' — USD per week;
    For type "Sell": '5 '- USD Sale;
    For type "Rent property from smb": '6';
    For type "Buy": '7';
    For type "Exchange": '8';

    objType - Property type. A numerical value. Data from the table '{prefix} apartment_obj_type'. Ppossible values can be 1 - Apartment, 2 - House, 3 - Commercial real estate;

    cityName - City name. A string value. Data from the table '{prefix}apartment_city'. A possible value can be 'Moscow';

    isPricePoa - Price on asking. Possible values can be '1' - yes, '0' - no;

    price - Price. A numerical value, for instance '3000';

    priceTo - Price "Up to". It is used for property types "Rent property form smb" and "Buy". Do not fill in the field for other property types;

    numberRooms - Number of rooms. A numerical value. The maximum value is set in the Settings by the administrator. A possible value can be '2';

    floor - Floor. A numerical value. A possible value can be '5';

    floorTotal - Total number of floors. A numerical value. The maximum value is set in the Settings by the administrator. A possible value can be '10'.

    square - Square. A numerical value. A possible value can be '52';

    sleeps - Number of berths. A string value or a numerical value. A possible value can be '1+2+1';

    title - Listing title. A string value. A possible value can be "Apartment near Novokuznetskaya metro station, Runovsky Lane, 3B";
    Add a prefix of the language 'title_en', 'title_ru', 'title_de', if you use a paid version. You should fill in each field.

    description - Description. A string value. A possible value can be "Spacious and comfortable apartment";
    Add a prefix of the language 'title_en', 'title_ru', 'title_de', if you use a paid version. You should fill in each field.

    near - What is near. A string value. A possible value can be "Novokuznetskaya metro station";
    Add a prefix of the language 'title_en', 'title_ru', 'title_de', if you use a paid version. You should fill in each field.

    location - Address. A string value. A possible value can be "Runovsky Lane, 3B";
    Add a prefix of the language 'title_en', 'title_ru', 'title_de', if you use a paid version. You should fill in each field.

    exchange - Change for. A string value. A possible value can be "Apartment with the same price";
    It is necessary for listings' type "Exchange"
    Add a prefix of the language 'title_en', 'title_ru', 'title_de', if you use a paid version. You should fill in each field.

    bathroom - Reference "Bathroom". The enumeration of string values separated with a vertical line "|";

    safety - Reference "Security". The enumeration of string values separated with a vertical line "|";

    comfort - Reference "Comfort". The enumeration of string values separated with a vertical line "|";

    kitchen - Reference "Kitchen". The enumeration of string values separated with a vertical line "|";

    employment - Reference "Work". The enumeration of string values separated with a vertical line "|";

    entertainment - Reference "Entertainment". The enumeration of string values separated with a vertical line "|";

    services - Reference "Services". The enumeration of string values separated with a vertical line "|";

    terms - Reference "On conditions". The enumeration of string values separated with a vertical line "|";

    photos - Photos. The enumeration of string values separated with a vertical line "|";

    lat - Latitude. A numerical value. A possible value can be '55.7300745' (use a "point");

    lng - Longitude. A numerical value. A possible value can be '37.6336848' (use a "point");


Separate the elements with a semicolon ";".

The values that are related to the same element (section) should be separated with a vertical line "|".

===============================================================================================================================

You can create a new csv file yourself in the OpenOffice Calc or make it using the exported from the product file as a basis.

The number of listings for importing into one file should not exceed 40-50 ones, it depends on the number of images (the more images, the less number of importing listings should be).
If the number exceeds the recommended one, the script can not have enough time (which is set at server settings) to complete the operation of importing.

If you instead of importing a zip file with attached images place links to the images in the "photos" field, for example: http://re.monoray.ru/pic/1.jpg, the script will try to download these images remotely and save them at your server with the help of 'cURL' or 'file_get_contents'. Note that this operation requires more time than it is needed to extract images out of a zip file.

While importing references' values ("Bathroom", "Kitchen", "Security" etc.) as well as city name it is strictly recommended to follow whatever upper- and low-cases of their names that you use to define them and make sure that the names are correct and are the same as your site contains.
Open Real Estate FAQ: 1 link and 2 link
Xpycm
Web Developer
Web Developer
 
Posts: 189
Joined: 30 Dec 2011, 11:06
Reputation point: 2

Return to Open Real Estate

Who is online

Users browsing this forum: No registered users and 1 guest