Apartment "type" option

Questions and answers about change of functions, design, hosting etc.

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.

Apartment "type" option

Postby darren » 11 Jun 2013, 07:59

Hi ,

I would like to remove two of the the "type" selection ?

as the option rent to smb, rent from smb ...is not applicable for my use. thank you
darren
Stranger
 
Posts: 4
Joined: 11 Jun 2013, 07:48
Reputation point: 0

Re: Apartment "type" option

Postby Xpycm » 11 Jun 2013, 08:25

Hello.

protected/modules/apartments/models/Apartment.php file

function getTypesArray
comment/delete the line:
Code: Select all
$types[self::TYPE_RENT] = tt('Rent''apartments'); 

and
Code: Select all
$types[self::TYPE_RENTING] = tt('Rent a''apartments'); 


function fillI18nArray
comment/delete the line:
Code: Select all
$vs[self::TYPE_RENT] = 'Want rent property to smb'

and
Code: Select all
$vs[self::TYPE_RENTING] = 'Want rent property form smb'


function getTypesWantArray
comment/delete the line:
Code: Select all
$types[self::TYPE_RENT] = tt('Want rent property to smb''apartments'); 

and
Code: Select all
$types[self::TYPE_RENTING] = tt('Want rent property form smb''apartments'); 


Code: Select all
protected/components/SearchForm.php file

function apTypes
comment/delete the line:
Code: Select all
if(in_array(Apartment::PRICE_RENTING$result)){
    
$types[Apartment::PRICE_RENTING] = tt('Rent a''apartments');

and
Code: Select all
if(in_array(Apartment::PRICE_PER_DAY$result)){
    
$types[Apartment::PRICE_PER_DAY] = tc('rent by the day');
}

if(
in_array(Apartment::PRICE_PER_HOUR$result)){
    
$types[Apartment::PRICE_PER_HOUR] = tc('rent by the hour');
}

if(
in_array(Apartment::PRICE_PER_MONTH$result)){
    
$types[Apartment::PRICE_PER_MONTH] = tc('rent by the month');
}

if(
in_array(Apartment::PRICE_PER_WEEK$result)){
    
$types[Apartment::PRICE_PER_WEEK] = tc('rent by the week');
Dropbox
Open Real Estate CMS: FAQ | FAQ 2 | FAQ 3
Image
Xpycm
Web Developer
Web Developer
 
Posts: 281
Joined: 30 Dec 2011, 11:06
Reputation point: 2

Re: Apartment "type" option

Postby darren » 11 Jun 2013, 10:59

Thank you Xpycm *BRAVO* *BRAVO* , I manage to remove the rental component successfully.

With the rental remove, the sections search field become redundant....I wonder you could guide me again to remove this, thank you
darren
Stranger
 
Posts: 4
Joined: 11 Jun 2013, 07:48
Reputation point: 0

Re: Apartment "type" option

Postby Xpycm » 11 Jun 2013, 11:31

protected/views/site/field-type-search.php file
Replace the content of all the file for:
Code: Select all
<?php
    
echo CHtml::hiddenField('apType'0);

    if(
isFree()){
        
$currency param('siteCurrency''$');
    } else {
        
$currency Currency::getCurrentCurrencyName();
    }

    
Yii::app()->clientScript->registerScript('set-currency-name''
        function setCurrencyName(id){
            var currencyName = "'
.$currency.'";

            if (propertyType) {
                /* hide all */
                $.each(propertyType, function(key, value) {
                    $("#price-search-"+key).hide();
                    $("#price-currency-"+key).html("");
                    $("#price-currency-"+key).hide();
                });

                /* show selected */
                $("#price-search-"+id).show();
                $("#price-currency-"+id).html(currencyName);
                $("#price-currency-"+id).show();
            }
        }
    '
CClientScript::POS_END);

    
Yii::app()->clientScript->registerScript('currency-name-init''
        setCurrencyName(0);
    '
CClientScript::POS_READY);
?>
Dropbox
Open Real Estate CMS: FAQ | FAQ 2 | FAQ 3
Image
Xpycm
Web Developer
Web Developer
 
Posts: 281
Joined: 30 Dec 2011, 11:06
Reputation point: 2

Re: Apartment "type" option

Postby darren » 11 Jun 2013, 12:19

Thank you again, great support. *THUMBS UP*
darren
Stranger
 
Posts: 4
Joined: 11 Jun 2013, 07:48
Reputation point: 0


Return to Questions and help for changes

Who is online

Users browsing this forum: No registered users and 12 guests

cron