Skip Navigation

[Resolved] Show only available options for each input not working

This support ticket is created 6 years, 6 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.

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

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 24 replies, has 2 voices.

Last updated by jaumeB 6 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#918825
screencapture-thecraftplatform-wp-admin-admin-php-2018-06-28-16_18_58.png

Hi!
I am trying to create a custom search in which inputs only show available options.
I have filters by taxonomies and a filter by relationship.
When selecting options in relationship filter, results are refreshing but inputs taxonomy are not refreshing.

I send in this ticket a complete screencapture with the custom search view settings.
And code from filters:

[wpv-filter-start hide="false"]
[wpv-filter-controls]
<div id="misfiltros">

[wpv-control-post-relationship ancestors="country@location.parent>city-town@mta-city-town.child" url_param="wpv-relationship-filter"]
	<div class="form-group ">
             	 <label>[wpml-string context="wpv-views"]country[/wpml-string]</label>
             	 [wpv-control-post-ancestor type="select" default_label="--country--" ancestor_type="country@location.parent"]
				</div>
            	<div class="form-group ">
            	  <label>[wpml-string context="wpv-views"]city-town[/wpml-string]</label>
              	[wpv-control-post-ancestor type="select" default_label="--city/town--" ancestor_type="city-town@mta-city-town.child"]
				</div>
				[/wpv-control-post-relationship]
<div class="form-group">
	<label>[wpml-string context="wpv-views"]Material[/wpml-string]</label>
	[wpv-control-post-taxonomy taxonomy="material" type="select" url_param="wpv-material" default_label="Todos"]
</div>
<div class="form-group" id="selecttecnica">
	<label>[wpml-string context="wpv-views"]Técnica[/wpml-string]</label>
	[wpv-control-post-taxonomy taxonomy="tecnica" type="select" url_param="wpv-tecnica" default_label="Todas"]
</div>
<div class="form-group">
	<label>[wpml-string context="wpv-views"]Artesanía[/wpml-string]</label>
	[wpv-control-post-taxonomy taxonomy="artesania" type="select" url_param="wpv-artesania" default_label="Todas"]
</div>
</div>
[/wpv-filter-controls]

[wpv-filter-end]

Thank you very much

#918900

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jaum,

Than you for contacting our support forum.

Its still showing all the possible output ?

Would you mind temporarily disabling all the non-toolset plugins and trying again ?

Thanks,
Shane

#918991
Captura de pantalla 2018-06-28 a las 20.43.05.png
Captura de pantalla 2018-06-28 a las 20.42.50.png
Captura de pantalla 2018-06-28 a las 20.42.36.png
Captura de pantalla 2018-06-28 a las 20.42.25.png

Hi,
No, still not working.
I'll try to explain the problem better:
What I need is taxonomies filters to show only available options when choosing an option from relationship filter.

When I choose country "Spain", the results are filtered and it's only shown the post with the ID "4721". Thats OK. But the taxonomy filter "Material" should show only "Wooden", that is de term associated with post "4721".
I tried choosing also the city (Madrid), that is the related post and not the parent (country). But filters still not updating the data. You can see it in the images attached to this reply.

Thank you for your answer!
Hope we can figure out whats going on!
Jaume

#919000

Sorry, one more thing:
When I use the filters by taxonomy, the others filters, taxonomies and relationship, show only available options. So it works fine in that case. If I choose "Bronze" in material filter, the others filters update the options.
And I need that the same happens when choosing a country: the other filters should update options to only available.

Thanks!

#919039

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jaume,

From here it seems that its working correctly .

Would you mind providing me with a link to this page so that I can give it a test?

Thanks,
Shane

#919055

Of course:
hidden link

Selecting country Spain shows results ok, but doesn't shows only available options in the others filters. In this case Material should show only Wood.

Thanks!

#919057

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jaume,

Would you mind providing me with access to the site so that I can have a look at the view on the backend ?

Thanks,
Shane

#919058

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Private fields

#919370

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jaume,

Not sure why the bronze still appears but it seems that it is causing the issue.

Could you delete the only post attached to bronze and then try again ?

Thanks,
Shane

#919625

Hi Shane,
I've deleted the two MTA posts and created another. Still not showing only available options, but all of them.

Thank you
Jaume

#920025

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Juame,

Is there a clay item for Spain in the spanish translation ?

I think this might be the cause. It might be picking up the item from another language.

Thanks,
Shane

#920080

Hi Shane,
I've created a test site. Fresh install, no plugins, no wpml... but the problem remains the same.
Taxonomy filters work OK. If you select a term, the result list of posts and the available options inside filters are update (both types: taxonomy and relationship filters).
The relationship filter doesn't work ok. The resulting list of posts is update but taxonomy filters options remain the same, with options that should be not available.
I can give you user and password of the test site.
This feature is very important for the project I'm developing.

Thank you
Jaume

#920393

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Jaume,

Yes please provide the credentials.

Also there has been an update to our plugins, could you update and let me know if the issue still remains?
Thanks,
Shane

#921310

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jaume,

Our forum is extremely busy at the moment hence why i'm taking a while to get back to you.

I'm currently taking a look at this one right now.

Thanks,
Shane

#921314

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jaume,

Since this is a fresh install i'm going to create a copy of this and send to our team for further debugging.

Unfortunately i dont have a workaround at the moment because you require a relationship filter but this is breaking the other filters.

Please keep the test site open so they can have a look at it as well.

Thanks,
Shane