Store Locator Plus® for WordPress › Forums › Premier Support › Make a dropdown dependent
- This topic has 8 replies, 2 voices, and was last updated 2 years, 11 months ago by Cici.
-
AuthorPosts
-
November 19, 2021 at 1:30 PM #82466JuergenParticipant
Hi guys
This is not a bug report, but rather a question of how to implement something.
We need to make one dropdown dependent on another dropdown. So one shows up only when a specific option is set on the other dropdown.According to our developer this would be just a little bit of javascript, so I wanted to ask you if there is a specific location where we should put it – i.e. the search form input field in the backend.
Here the url of the page I am referring to: https://genol.testinstanz.at/
Thanks.
BR, JayNovember 19, 2021 at 1:48 PM #82468CiciKeymasterUnder Settings/Search
With Premier there are additional hierarchy selector options such as Single Parent, Parent /child relationship . They can be further defined with a relationship if you are referring to categories, such as horizontal checkbox with an OR
https://docs.storelocatorplus.com/store-and-category-manager/
You need to set up a parent as it appears you have. You could also redirect to a new map page using Widgets and shortcodes
I can not tell if you are using TAGS in text or Categories. You can use hierarchy rules if using categories. Tags are just text and do not have hierarchy.
Without specific information aid is difficult to ascertain and answer .
Could you provide a specific example ? Also versions, do you have Premier, experience and power activated, what versions etc.
- This reply was modified 3 years ago by Cici.
November 22, 2021 at 7:03 AM #82472JuergenParticipantHi,
our active plugin versions are the following:
Store Locator Plus®: 5.12.3
Experience: 5.11
Power: 5.11At the moment we don’t have an active Premier plugin on the site.
We are using both categories and tags, the first dropdown “Art” being categories and the second “Leistungen” being tags.
What we would like to do is only display the tag dropdown if a certain category (or a certain parent category) is selected.
I hope this explains better what we’re looking for.
November 25, 2021 at 11:04 AM #82475CiciKeymasterTags and categories are 100% independent of each other,
tags are non – hierarchical
categories: a hierarchical taxonomy
Please refer to the WP developers handbook for the explanation of categories, taxonomy, tags framework .
The info in the WP developer may give you some ideas on how to better organize the groups.
Alternatively you may decide to create multiple parent child categories instead of single parent
December 2, 2021 at 12:34 PM #82481JuergenParticipantHi Cici
I am coming back to you, since the subcategory approach did not work out.
Here our system:
+ WordPress 5.8.2
+ SLP Core 5.12
+ Experience 5.11
+ Power 5.11
+ Premier 5.12Here our use case:
Our customer uses SLP for gas stations. So far we had one dropdown for all the different fuel types.
Now, this needs to be extended for EVs. So we gonna need to setup one dropdown for
1. EV
2. gas powered
and another dropdown appearing only if no2 (gas powered) is selected in the first dropdown. The fuel type would be selectable in this 2nd one.We are completely flexible how we implement this, we can even alter the data type of the properties (tags / subs), since the datapoints have to be revised anyway.
So much for the direction we have to go to.
We played around with subcategories and different settings, but so far we havent achieved too much. We had one dropdown for all options, or checkboxes, and both wasnt really useable for this use case. What would you recommend?
We would love to find a solution incorporating your advise instead of just adding some javascript.Thanks, BR
JayDecember 2, 2021 at 1:26 PM #82482CiciKeymasterDid you try the radio button bar with the Bennet theme and a category legend checked off?
https://docs.storelocatorplus.com/category-button-bar/
Are you testing on a new clone site not your production site?
I understand the scenario , you want to combine selector styles. I can mention to Lance and see if he has another idea that doesn’t include customization. He has been super busy with a large custom software project (not WordPress)
I will try some experimentation as well to see if I can come up with a solution.
December 2, 2021 at 2:46 PM #82484CiciKeymasterI tested using the Button bar for categories, along with Parent/Child categories.
You would have two parents ,
1 EV,
2 Gas,
Under Gas/ add the subcategories and they will appear in drop down.
In my example I have used Packies (beer with subcategories) and Solar.
You can have no subcategories on one and sub categories on the other or vs versa . With the Button bar and Bennet layout both will display .
Example of two Parent /Sub and selections (ignore the layout)
Attachments:
You must be logged in to view attached files.December 2, 2021 at 5:16 PM #82486CiciKeymasterYou can test it here to see if it is something that would work for you https://test.storelocatorplus.com
December 2, 2021 at 5:20 PM #82487CiciKeymasterAlso you can try Widget to redirect to a separate page if EV power has no subcategories. The Shortcode for the page would be “only_with_category=”EV or whatever the category is
with shortcodes there are a plethora of options
https://docs.storelocatorplus.com/how-do-i-show-two-different-maps-with-different-locations-on-each/
-
AuthorPosts
- You must be logged in to reply to this topic.