Skip Navigation

[Resolved] Extend Views Search

This thread is resolved. Here is a description of the problem and solution.

Problem:
Extend Views Search - How to reset the view filters

Solution:
With Toolset custom search, it offers the Reset button, What if you try to use the Reset button and before performing new search try to Reset your search.

Relevant Documentation:
=> https://toolset.com/course-lesson/creating-a-custom-search/

This support ticket is created 2 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by Puntorosso 2 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#2061745

I need to integrate a double WooCommerce search in a view:

- It should search for date
- it should search the billing names

I was able to solve the date search, but I am stuck with the names.
I am using a simple input field

<input type="text" name="srcname" id="srcname" placeholder="Search..."> 

and I have set the Views filter parameters to

Select items with field:
_billing_first_name is a string like URL_PARAM(srcname)
OR
_billing_last_name is a string like URL_PARAM(srcname)
OR
BookingDate is a number equal URL_PARAM(srcdate)

It works good when I search only the name, as I get a clean URL like

/?srcname=john

But as soon as I use the date search, I have added a URL parameters, like

/?srcdate=1623715200

and from now on, if I search for a name, I get

/?srcdate=1623715200&srcname=john

which deliver only John's orders for that date.

How can I reset the URL parameters when starting a new name search?
Or you maybe have a better solution for this scenario?

Thanks

#2062511

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

With Toolset custom search, it offers the Reset button, What if you try to use the Reset button and before performing new search try to Reset your search.

#2065431

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.