OS Property support center

Integrate Category Better

  • Gary Rudd
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 5 months ago #43353 by Gary Rudd
Integrate Category Better was created by Gary Rudd
Thank for last advice, I got 250 items imported into CATEGORY and Then I changed all "Category" to Base in translation. This need is important for my site so thank you for your advice... NEXT

1) I know its not built in but can I/you modify QUICK SEARCH box to also include Drop Down Box For Category (Base)? Again Category/Base very important point to site. - See my BASE usage
www.offbaselodging.com/advanced-search/&TOTS=1
(Yes you need the TOTS to bypass coming soon)

2) Can I pay to have one feature added: I would like to add a single "drop down" as module that I can put anyplace that will allow drop down box of CATEGORY(BASE) then when selected either Auto-Submit selected or have to submit by clicking on icon. When executed the Category/Base selected will return all result just like if clicking Category in search
(better explained here: www.htmlgoodies.com/beyond/javascript/article.php/3902606 )

3) How to format the Category listings:
www.offbaselodging.com/property-listings?TOTS=1
See on my site it looks very bad

4) Can I default the Category Listing pages to 100 (or add ALL as an option)

Thanks! Almost done!!

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

More
11 years 5 months ago #43355 by Dang Thuc Dam
Replied by Dang Thuc Dam on topic Integrate Category Better
HI Gary,
1. You
2. You want to modify the search module to submit the search form when user select one option?
3. You can modify the layout of the categories list page in
components > com_osproperty > classes > category.html.php
4. You can modify the number categories per pages in
components > com_osproperty > classes > category.php
change
$limit = JRequest::getInt('limit',20);
to
$limit = JRequest::getInt('limit',100);
Good luck
Dam
$limit = JRequest::getInt('limit',20);

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

  • Gary Rudd
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 5 months ago #43373 by Gary Rudd
Replied by Gary Rudd on topic Integrate Category Better
Thank you - to finish:

1) HOW do I add field to QUICK SEARCH? I want to add "Category" as search option in quick search...

2) I want to CREATE a new search module that is made up of ONLY ONE item: the "category" drop down options. When the item is selected it will either: automatically perform search OR after select category hit "GO" icon to search.

3) Thank you - I WILL TRY :)

4) Thank you - I will fix (also is "ALL" an option instead of number?)

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

More
11 years 5 months ago #43377 by Dang Thuc Dam
Replied by Dang Thuc Dam on topic Integrate Category Better
Hi Gary,
1. If you open source code of search module (mod_ospropertysearch)
modules > mod_ospropertysearch > helper.php
you will see 2 functions
listCategories and loadCategoryOptions
They are used to create the drop-down select list Category
and in the layout file: modules > mod_ospropertysearch > tmpl > default.php
we show the dropdown select list category by this code
<?php echo modOspropertySearchHelper::listCategories(JRequest::getVar('category_id'),'',$inputbox_width_site); ?>
You can see it and use to add "Category" in your search module.
======
2. I want to CREATE a new search module that is made up of ONLY ONE item: the "category" drop down options. When the item is selected it will either: automatically perform search OR after select category hit "GO" icon to search.
The answer is as above, but you only need to change a bit in the layout file
<?php echo modOspropertySearchHelper::listCategories(JRequest::getVar('category_id'),'javascript:document.form.submit();',$inputbox_width_site); ?>

in: "document.form.submit", form is name of search form
Good luck
Dam

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

Moderators: Dang Thuc DamNguyen Phu Quan