OS Property support center

nbed list

  • Stuart
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 years 5 days ago #62638 by Stuart
nbed list was created by Stuart
Hi

I would like to add ‘Studio’ to the nbed list, but not sure which is the best way to do this.

I have changed the bed_room entry in the database table _osrs_properties from int to varchar but am not sure where to look in administrator/components/com_osproperty to add the word ’Studio’ to show above the number '1'

Any help would be appreciated.

Thanks

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

More
10 years 5 days ago #62641 by Mr. Dam
Replied by Mr. Dam on topic nbed list
Hi Stuart,
Firstly, when you change the attribute from int to varchar, it will effect to other parts of OS Property like Search function.
Can you please send us the screenshot where do you want to show the word 'Studio', i will suggest the solution for you.
Thanks
Dam

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

  • Stuart
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 years 5 days ago #62643 by Stuart
Replied by Stuart on topic nbed list
In admin I am trying to add Studio to the list of bed numbers, like this


So that when Studio is selected in the admin options the word 'Studio' appears instead of bedroom number in Category Listing here:


and replaces the bedroom number in Details here:

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

More
9 years 11 months ago #63471 by Denis
Replied by Denis on topic nbed list
Hi
Is there a solution?

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

  • Stuart
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 11 months ago - 9 years 11 months ago #63483 by Stuart
Replied by Stuart on topic nbed list
Not from me, I'm afraid :(

However, I did use a very temporary workaround until I find a permanent solution, making use of the lot_size property field, that I wasn't use for the property listings.

It's a little dirty, but works on the frontend ......

In details.html.tpl.php, under OS_FEATURES I added:
Code:
<?php if(($configClass['use_squarefeet'] == 1) and ($row->lot_size > 0)){ ?> <div class="span12"> <div class="span61"> <?php echo JText::_('Bedroom Type').":"; ?> </div> <div class="span61"> <?php echo JText::_('Studio')." ";?> </div> </div> <?php } ?>

which produced this in the frontend (assuming that BEDROOMS has not been used)




To make ‘Studio’ appear in lisiting.html.tpl.php (instead of Bed number, again assuming that BEDROOMS has not been used) I used this:
Code:
<?php if(($configClass['use_squarefeet'] == 1) and ($row->lot_size > 0)){ ?> <li class="property-icon-bed meta-block"> <i class="ospico-bed"></i> <span><?php echo JText::_('Studio')." ";?></span></li> <?php } ?>

to produce the bed icon with the word Studio next to it



Like I said, it’s very quick and dirty, but works. I’m sure someone with php knowledge could improve upon it :)


Edit: I have to stress that whilst this temporary workaround works on my own website, one should be cautious implementing it on their own website, esapecially if using the advanced search features.
Last edit: 9 years 11 months ago by Stuart.
The following user(s) said Thank You: Denis

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

More
9 years 5 months ago #72116 by Sheldon
Replied by Sheldon on topic nbed list
Hi there did you ever the solution to work for you for adding Studio

I am facing the same issue where I have clients that want to have studio appear as a selection for the bedroom type. Since not all the places they rent or sell are 1 bedroom many are just studios and would like to select this option.

I would like to know if your workaround worked and if i can see a screen shot of it.

Cheers

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

  • Stuart
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 5 months ago #72128 by Stuart
Replied by Stuart on topic nbed list

Sheldon wrote: Hi there did you ever the solution to work for you for adding Studio

I am facing the same issue where I have clients that want to have studio appear as a selection for the bedroom type. Since not all the places they rent or sell are 1 bedroom many are just studios and would like to select this option.

I would like to know if your workaround worked and if i can see a screen shot of it.

Cheers



Hi

The solution I posted above works for me, but unfortunately the screenshots disappeared when I released the domain name where they were stored on the server. I have replaced the screenshots on a different server, and linked then below.


It's a little dirty, but works on the frontend ......

In details.html.tpl.php, under OS_FEATURES I added:
Code:
<?php if(($configClass['use_squarefeet'] == 1) and ($row->lot_size > 0)){ ?> <div class="span12"> <div class="span61"> <?php echo JText::_('Bedroom Type').":"; ?> </div> <div class="span61"> <?php echo JText::_('Studio')." ";?> </div> </div> <?php } ?>

which produced this in the frontend (assuming that BEDROOMS has not been used)




To make ‘Studio’ appear in lisiting.html.tpl.php (instead of Bed number, again assuming that BEDROOMS has not been used) I used this:
Code:
<?php if(($configClass['use_squarefeet'] == 1) and ($row->lot_size > 0)){ ?> <li class="property-icon-bed meta-block"> <i class="ospico-bed"></i> <span><?php echo JText::_('Studio')." ";?></span></li> <?php } ?>

to produce the bed icon with the word Studio next to it



Like I said, it’s very quick and dirty, but works. I’m sure someone with php knowledge could improve upon it :)


Edit: I have to stress that whilst this temporary workaround works on my own website, one should be cautious implementing it on their own website, esapecially if using the advanced search features.

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

Moderators: Mr. DamNguyen Phu Quan