OS Property support center

0,5 bedrooms and 1,5 bathroom dilemma

  • Nel van der Bijl
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 4 days ago #29728 by Nel van der Bijl
0,5 bedrooms and 1,5 bathroom dilemma was created by Nel van der Bijl
Hi

Thank you, for all the changes to date for Osproperty, but sadly I have another request. We have a lot of Apartments (Bachelor) that only have 0,5 bedrooms as they have the option of a smaller separate room that could double up as a bedroom. Could it be possible to bring that in to the mix and also searchable?

Regards

Nel

Please Log in or Create an account to join the conversation.

More
11 years 4 days ago #29733 by Mr. Dam
Replied by Mr. Dam on topic Re: 0,5 bedrooms and 1,5 bathroom dilemma
Hi Nel,
I can change the database structure to from integer to decimal for you, and then, you can enter the decimal number like 1,5 or 0,5.
But the main problem is system can't search those values, it can only search the integer value like 1,2,3,4,5 v.v.
Thanks
Dam

Please Log in or Create an account to join the conversation.

  • Nel van der Bijl
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 4 days ago #29739 by Nel van der Bijl
Replied by Nel van der Bijl on topic Re: 0,5 bedrooms and 1,5 bathroom dilemma
Hi Dam

Could you maybe then just add '0+' to the number of Bedrooms and Bathrooms?

Regards

Nel

Please Log in or Create an account to join the conversation.

More
11 years 4 days ago #29746 by Mr. Dam
Replied by Mr. Dam on topic Re: 0,5 bedrooms and 1,5 bathroom dilemma
Hi,
You can add 0+ into the filter fields in Advanced search page by follow these steps
1. Open file : components > com_osproperty > classes > listing.php
2 . find
// number bath room
$bathArr[] = JHTML::_('select.option','',JText::_('OS_ANY'));
for($i=1;$i<=5;$i++){
$bathArr[] = JHTML::_('select.option',$i,$i.'+');
}
$lists = JHTML::_('select.genericlist',$bathArr,'nbath',' class="input-small" style="width:100px;"','value','text',$nbath);


//number bed room
$lists = $nbed;
$bedArr[] = JHTML::_('select.option','',JText::_('OS_ANY'));
for($i=1;$i<=5;$i++){
$bedArr[] = JHTML::_('select.option',$i,$i.'+');
}
$lists = JHTML::_('select.genericlist',$bedArr,'nbed','class="input-small" style="width:100px;"','value','text',$nbed);

from line 1046
and change to

// number bath room
$bathArr[] = JHTML::_('select.option','',JText::_('OS_ANY'));
for($i=0;$i<=5;$i++){
$bathArr[] = JHTML::_('select.option',$i,$i.'+');
}
$lists = JHTML::_('select.genericlist',$bathArr,'nbath',' class="input-small" style="width:100px;"','value','text',$nbath);


//number bed room
$lists = $nbed;
$bedArr[] = JHTML::_('select.option','',JText::_('OS_ANY'));
for($i=0;$i<=5;$i++){
$bedArr[] = JHTML::_('select.option',$i,$i.'+');
}
$lists = JHTML::_('select.genericlist',$bedArr,'nbed','class="input-small" style="width:100px;"','value','text',$nbed);

Good luck
Dam

Please Log in or Create an account to join the conversation.

  • Nel van der Bijl
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 4 days ago #29748 by Nel van der Bijl
Replied by Nel van der Bijl on topic Re: 0,5 bedrooms and 1,5 bathroom dilemma
Thanks Dam!

Please Log in or Create an account to join the conversation.

  • Nel van der Bijl
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 11 months ago #30005 by Nel van der Bijl
Replied by Nel van der Bijl on topic Re: 0,5 bedrooms and 1,5 bathroom dilemma
Hi Dam,

Hope all is well... alas I got feedback from the Estate Agency and they would rather have a decimal database structure so that the property will display 1,5 or 0,5 bedrooms and/or bathrooms in the listing (see attach). As for the searching of these values, they are not bothered about the not being able to search for that values.

Regards and thank you in advance for your assistance.

Nel
Attachments:

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #30010 by Mr. Dam
Replied by Mr. Dam on topic Re: 0,5 bedrooms and 1,5 bathroom dilemma
Hi,
I think you can change the attribute of those fields from integer to decimal by using phpmyadmin
Data table
#__osrs_properties
field
bed_room
bath_room
rooms
Currently, their attributes are int(11), you can change them to decimal (5,2)
Good luck
Dam

Please Log in or Create an account to join the conversation.

  • Nel van der Bijl
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 11 months ago #30012 by Nel van der Bijl
Replied by Nel van der Bijl on topic Re: 0,5 bedrooms and 1,5 bathroom dilemma
Thanks Dam

But I think I will pass on this one... scared I break the whole site.

Regards

Nel

Please Log in or Create an account to join the conversation.

Moderators: Mr. DamNguyen Phu Quan