- Posts: 34
- Thank you received: 2
Make Better Structure: Properties Types
- Josh
- Offline
- Junior Member
"In negotiations" or "in talks"
"On hold" or "suspended"
"Just added" or "new"
I think they would be useful...
Please Log in or Create an account to join the conversation.
- MelanieB
- Offline
- Elite Member
- Posts: 196
- Thank you received: 5
if you are willing to change some code you can do it yourself by altering a couple of files. They will get over-written when you update though so you would need to re-add your changes when you update. It may become a feature where we can add new ones that remain when we update, but till then try this: Change the following files:
1. Root > components > com_osproperty > helpers > helper.php
Find:
static function buildDropdownMarketStatus($mstatus){
$configClass = self::loadConfig();
$market_status = $configClass;
if($market_status == 1){
$marketArr = array();
$marketArr[] = JHtml::_('select.option',0,JText::_('OS_MARKET_STATUS'));
$market_status = $configClass;
if($market_status != ""){
$market_status_array = explode(",",$market_status);
if(in_array('1',$market_status_array)){
$marketArr[] = JHtml::_('select.option',1,JText::_('OS_SOLD'));
}
if(in_array('2',$market_status_array)){
$marketArr[] = JHtml::_('select.option',2,JText::_('OS_CURRENT'));
}
if(in_array('3',$market_status_array)){
$marketArr[] = JHtml::_('select.option',3,JText::_('OS_RENTED'));
}
}
return JHtml::_('select.genericlist',$marketArr,'isSold','class="input-medium chosen"','value','text',$mstatus);
}
}
static function returnMarketStatus($marketStatus){
switch ($marketStatus){
case "1":
return JText::_('OS_SOLD');
break;
case "2":
return JText::_('OS_CURRENT');
break;
case "3":
return JText::_('OS_RENTED');
break;
}
}
2. root > administrator > components > com_osproperty > classes > configuration > properties > sold.php
$market_status = array();
$market_status[0]->value = 1;
$market_status[0]->text = JText::_('OS_SOLD');
$market_status[1]->value = 2;
$market_status[1]->text = JText::_('OS_CURRENT');
$market_status[2]->value = 3;
$market_status[2]->text = JText::_('OS_RENTED');
$checkbox_market_status = array();
if (isset($configs)){
$checkbox_market_status = explode(',',$configs);
}
if($configs == "1"){
$checkbox_market_status[] = 1;
}
echo JHTML::_('select.genericlist',$market_status,'configuration[market_status][]','multiple class="chosen"','value','text',$checkbox_market_status);
Kind regards
Mel
Please Log in or Create an account to join the conversation.
- Josh
- Offline
- Junior Member
- Posts: 34
- Thank you received: 2
Let's hope OSsolution guys will find them useful!
Please Log in or Create an account to join the conversation.
- MelanieB
- Offline
- Elite Member
- Posts: 196
- Thank you received: 5
Its worked perfectly for me for months. It was Dam who pointed me yhose files (credit to him).
Also, when you have added them you need to go to your configuration in backend and select the new values in the market status box.
Hope that helps. And yes documenting it here helps take a little work off the Joomdonation team
Please Log in or Create an account to join the conversation.
- Marios
- Offline
- New Member
- Posts: 6
- Thank you received: 0
You can send it to my email at: marios.papas1 @ gmail.com
Thanks
Please Log in or Create an account to join the conversation.
- Josh Cissell
- Offline
- New Member
- Posts: 6
- Thank you received: 0
Do you have it planned to add the code changes MelanieB suggests so that we can easily add market statuses without coding and changing code every time we update?
Please Log in or Create an account to join the conversation.
- Josh Cissell
- Offline
- New Member
- Posts: 6
- Thank you received: 0
MelanieB wrote: Hi,
Its worked perfectly for me for months. It was Dam who pointed me yhose files (credit to him).
Also, when you have added them you need to go to your configuration in backend and select the new values in the market status box.
Hope that helps. And yes documenting it here helps take a little work off the Joomdonation team
When I make the changes to those files exactly and add a new market status it doesn't show up "Available June" like the other statuses show up as Rented, Sold, etc... It shows up as OS_Available_June. Just as it is typed in the code. But the other statuses are "OS_RENTED", etc.. and show up as "Rented." Is there another file I have to edit?
Please Log in or Create an account to join the conversation.
- MelanieB
- Offline
- Elite Member
- Posts: 196
- Thank you received: 5
Please Log in or Create an account to join the conversation.
- Josh Cissell
- Offline
- New Member
- Posts: 6
- Thank you received: 0
MelanieB wrote: Hi Josh that's just a language translation. You can change that in the language file or via Joomla language override. Just search for the text (as a constant) and then change it to what you want. Or open the actual override file in cpanel file manager and add it there
Thank you. I was just stumbling upon this as you sent the message. I'm having a problem for some reason though. I named it "OS_AVAILABLE_NOW" and when I search for that to make a translation change it can't find it as a value or constant. I turned on language debugging mode and when "OS_AVAILABLE_NOW" is shown on my website it has two ? marks on each side instead of two *
Please Log in or Create an account to join the conversation.
- MelanieB
- Offline
- Elite Member
- Posts: 196
- Thank you received: 5
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.