Skip Navigation

[Fermé] Parametric search – include "all" option within picklists

This support ticket is created Il y a 8 années et 9 mois. 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
- 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 -
- - - - - - -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 11 réponses, has 2 voix.

Last updated by Waqas Il y a 8 années et 9 mois.

Assigned support staff: Waqas.

Auteur
Publications
#270583

I'm trying to set up a Parametric search, and I wish there to be a visible option within the select list for "ANY".

I believe that leaving the option blank achieves this anyway, but I want it to be obvious to users by making the choice an active one on their part.

I have discovered a YouTube video which seems to achieve this by creating a second version of the custom fields, which mirrors the main field, and includes an option for "ALL" (I would call it "ANY").

hidden link

In the video, he then edits all the products so that they are tagged against BOTH versions of the custom field.

The first version of the custom fields are used to define the output template, and the second version is used for the filtering in the parametric search (so that it includes the "ALL" option).

This seems like a nice enough workaround, but is it really necessary?
Is there a better way to do this without having to create duplicate custom fields?

Thanks

#270801

Waqas
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

Please consider following as an example select list for category filter:

[wpv-control taxonomy="category" url_param="wpv-category" type="select" default_label="Any"]

Please notice, default_lable="Any" at end of the above short code. That's how you can label that empty default item.

#270923

So, how would I apply that to this example please:

The following code pulls a list of towns into a select list.
How would I modify it to add an option that says "Any", at the top?
And, obviously, it needs to function so that the search results would contain listings tagged against any of the towns in the list.

[wpv-control field="town" url_param="town" type="select" auto_fill="wpcf-town" auto_fill_sort="asc"]

Thanks

#271285

Waqas
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

You can add default_label="Any" to your short code, like:

[wpv-control field="town" url_param="town" type="select" auto_fill="wpcf-town" auto_fill_sort="asc" default_label="Any"]
#271347

Assuming it would be that simple, I had already tried that - but it had no effect.
I've tried it on two separate select lists, both generated via the "New Filter" button within the Filter Html/css/js section of Views.
When I preview the page, the lists appear and do function correctly, albeit without the "Any" label.
I'm not sure where it might be going wrong.
Any ideas?
thanks

#271523

Waqas
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

Can you please provide me some debug information about your site? You can find the information under any Toolset plugin -> Help -> Debug Information page link at end. Simply copy/paste the information from debug information page, in the relevant area on this thread.

I have also enabled next reply as private, if possible, please supply me a temporary access to your site. So I can look for more details.

#271535

Forgot to mention, the page where I've been testing the parametric search is at
hidden link

(there's a "Coming Soon" plugin active, so you need to be logged in to WP to see the page).

#271558

Waqas
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for providing the access information. Please allow me some time to look into this issue. I will update you as soon as I find a solution.

#271703

Waqas
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

I have forwarded the issue to relevant Dev Team, I will update you as soon as I hear back.

However, on the other hand, can you please down grade your Views plugin to 1.6.4 (latest stable release), since it works fine with that. I didn't apply a downgrade myself, since you may need to backup first and you better know the corners may affect (relying on new features in beta release).

#271707

OK, I've switched it back to Views 1.6.4.
The "Any" option still won't appear 🙁

#271708

Waqas
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for the update, I have relayed your message to the Dev Team, hope they will come up with a solution. I will update you as soon as I hear back, thanks again.

#271976

Waqas
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

I just received a message from the Dev Team, I am copying as-it-is, please consider followings:

"As the documentation on the wpv-control shortcode states:
https://toolset.com/documentation/views-shortcodes/#wpv-control
the default_label argument is only meant for taxonomy filters. Neither downgrading nor a fix will change that.

In fact, the shortcode docs explain that we do have an auto_fill_default attribute that does just what the client is asking. By using the GUI, you can event fill an input field to set this."

Hope it clarifies on this.

Le sujet ‘[Fermé] Parametric search – include "all" option within picklists’ est fermé à de nouvelles réponses.