+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Category search form and saved search

  1. #1

    Category search form and saved search

    Hi Flynax,

    I created a category search form and used the saved search function, but when I check the saved search page, I saw the criteria set fine. But it doesn't show which category is it. User don't know which category this saved search is for. Is there anyway if we can show the category for the correspondent saved search?

    Screen Shot 2021-07-21 at 2.16.37 PM.png

  2. #2
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    Hello,

    By default, this feature saves inputs related only to the form

    but I'll create a task regarding this request (parent category)

  3. #3
    Quote Originally Posted by Rudi View Post
    Hello,

    By default, this feature saves inputs related only to the form

    but I'll create a task regarding this request (parent category)
    Thank you so much Rudi,

    Is there a temporary fix for this?

  4. #4
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    Go to templates > your_template > tpl > blocks > refine_search.tpl

    add at the bottom:
    Code:
    Only registered members can view the code.

    add the same code into side_bar_search.tpl
    Last edited by Rudi; July 23, 2021 at 05:09 PM.

  5. #5
    Wasn't this a bug in 4.8.1?

  6. #6
    Quote Originally Posted by Rudi View Post
    Go to templates > your_template > tpl > blocks > refine_search.tpl

    add at the bottom:
    Code:
    Only registered members can view the code.
    Hi Rudi,

    I have added your code and tried adding new alert but it still not adding the category. May be something wrong?

  7. #7
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    Quote Originally Posted by Joe Can View Post
    Wasn't this a bug in 4.8.1?
    It's not a bug actually because the script saves only what was selected directly on the form

    saving the parent category (if no sub-categories selected) will be a useful option in the future update

  8. #8
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    Quote Originally Posted by Wei Hong View Post
    Hi Rudi,

    I have added your code and tried adding new alert but it still not adding the category. May be something wrong?
    Hello Wei,

    Note that your form should be of 'in_category' type and placed on the category page (not listing type page)

    otherwise, you need to add the Category field to your standard search form

  9. #9
    Quote Originally Posted by Rudi View Post
    Hello Wei,

    Note that your form should be of 'in_category' type and placed on the category page (not listing type page)

    otherwise, you need to add the Category field to your standard search form
    Yes Rudi,

    I tried the form I made for specific category in category page like house for rent, room for rent, not the one with listing type: for rent. I also tried to add the category field in this form but obviously it won't show on the form. When I check the content box in admincp, I was unable to find the content box of those search form for category so I'm not sure if the key is "in_category" or not.

  10. #10
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    Ok, corrected,

    You also need to add this code into side_bar_search.tpl

+ Reply to Thread