• Resolved itsfrancisnadal

    (@itsfrancisnadal)


    Hi, I’m really looking forward for your update where we can search store by names. I would also like some help. I wanted to create an indication if the store is Open or Closed based on the Hours of this plugin. Hope to hear from you soon, thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    Search by store names will come in the 2.3 update, but showing whether a store is open / closed is something I haven’t looked into. Will do that as well for the next major update.

    Thread Starter itsfrancisnadal

    (@itsfrancisnadal)

    Thank you very much! I’m interested in doing it myself but I’m not really that sure how(code-wise) because the Hours are accessed via shortcode right? Maybe you could hint me in the right direction for a start 🙂

    Plugin Author Tijmen Smit

    (@tijmensmit)

    If you want to add support to search by name then you will first have to create a custom template, there maybe include a checkbox / dropdown to allow users to chose between search by name / location. If you give it a ‘wpsl-custom-dropdown’ or ‘wpsl-custom-checkboxes’ class, then the set value is automatically included in the AJAX data.

    You will need to use the wpsl_sql and wpsl_sql_placeholder_values to modify the SQL query so that the locations are searched by name, and not by the coordinates.

    To check if the store is open you will have to access the hours value with this filter, then compare it with the current date, and include a custom value in the returned data showing whether it’s open or closed.

    Then show the custom value holding the open / closed value in the custom template with this filter.

    Thread Starter itsfrancisnadal

    (@itsfrancisnadal)

    Thank you very much again! Would try my best and share if ever I be successful in implementing it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Search by Store Name/Open-Close based on Hours’ is closed to new replies.