OS Property support center

SUB CATEGORY SERCH NOT WORKING!!! BUG FIX REQEST!

  • Marco Lombardo
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 9 months ago #21900 by Marco Lombardo
IF I HIT A SERCH IN A CATEGORY WHICH HAVE SEVERAL SUB CATEGORYS WHIT SOME PROPRETY IT WILL LISTING NOTTHING!!!!
TAHT'S A HUGE BUG!!!!

AN OTHER HUGE BUG IS THAT IF I POINT IN THE MENU AT A CATEGORY WHIC HAVE SEVERAL SUBCATEGORY WHIT PROPRETY IT WILL SHOW ONLY THE COATEGORY WHITOUT NOTTHING IN LIKE THAT THE CATEGORY IS EMPTY!

PLEAS FIX IT! THATS A HUGE PROBLEM THIS COMPONET IS GREAT BUT WHIT THIS BUGS IT IS COMPLTY USELESS!!!

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

More
12 years 9 months ago #21912 by Dang Thuc Dam
Replied by Dang Thuc Dam on topic Re: SUB CATEGORY SERCH NOT WORKING!!! BUG FIX REQEST!
Hi Marco,
I requested the informaton of your site through ticket system. Please response me.
Thanks
Dam

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

  • Marco Lombardo
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 9 months ago #21942 by Marco Lombardo
Replied by Marco Lombardo on topic Re: SUB CATEGORY SERCH NOT WORKING!!! BUG FIX REQEST!
replayed

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

More
12 years 9 months ago #22214 by Laura
Hello,

I have the same problem.
Can you please tell me how to fix it?
Thank you!

Laura

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

More
12 years 9 months ago #22215 by Dang Thuc Dam
Replied by Dang Thuc Dam on topic Re: SUB CATEGORY SERCH NOT WORKING!!! BUG FIX REQEST!
Hi Laura,
You have to do following tasks:
1 Open file components > com_osproperty > helper > common.php

add this function
function getCategoriesList($parent_id, & $catArr){
global $mainframe;
$db = JFactory::getDbo();
$db->setQuery("Select id, parent_id from #__osrs_categories where parent_id = '$parent_id'");
$categories = $db->loadObjectList();
if(count($categories) > 0){
for($i=0;$i<count($categories);$i++){
$category = $categories[$i];
$count = count($catArr);
$catArr[$count] = $category->id;
$parent_id = $category->id;
$catArr = HelperOspropertyCommon::getCategoriesList($parent_id,$catArr);
}
}
return $catArr;
}

2. Open file components > com_osproperty > classes > listing.php
In function listProperties.
Change
if($category_id != ""){
$query .= " AND a.category_id = '$category_id'";
}
by

if(intval($category_id) > 0){
$catArr = array();
$catArr[0] = $category_id;
$catArr = HelperOspropertyCommon::getCategoriesList($category_id,$catArr);
$catStr = implode(",",$catArr);
$query .= " AND a.category_id in ($catStr)";
}

remember 2 places.
Thanks
Dam
The following user(s) said Thank You: Laura

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

More
12 years 9 months ago #22219 by Laura
Hi Dam,

I've made the changes according to your explanation, but it is still not working.
Neither on property listing layout menu nor in the properties search module.

Any other suggestion?

Thank you again.

Laura

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

  • Marco Lombardo
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 9 months ago - 12 years 9 months ago #22229 by Marco Lombardo
Replied by Marco Lombardo on topic Re: SUB CATEGORY SERCH NOT WORKING!!! BUG FIX REQEST!

File Attachment:

File Name: commonandlisting.zip
File Size:41.06 KB

try thos file are modified by dam.
backup befor u overwrit!
Last edit: 12 years 9 months ago by Marco Lombardo.
The following user(s) said Thank You: Laura

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

More
12 years 9 months ago #22230 by Laura
Hi Marco,

it worked!
Thank you so much for your support!

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

Moderators: Dang Thuc DamNguyen Phu Quan