Skip Navigation

[Resuelto] Populate field from taxonomy

This support ticket is created hace 5 años, 7 meses. 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Autor
Mensajes
#1084740
multiple-taxonomy-fields.gif

nd I AGREE WITH THAT (what is the essence of my statement what you quoted:
"taxonomy can be used multiple times within post"

I said you can add a taxonomy field in a Form multiple times, and show and hide it with Conditional Forms Groups. This does not mean you can add one term to one post multiple times. I have attached a screenshot showing my point. See that the Category select field is shown in 2 different locations in the Form, based on the selections of other fields. The selected taxonomy term can only applied to the post once, there is no concept of "purpose". I was under the impression that you want to have complex conditionals that allow you to place a taxonomy field in different locations in one Form. If I was mistaken, I apologize. There is a language difference that makes these technical nuances very difficult to communicate.

I would like to see the Views you described in your most recent comment. Is it possible to see them on the site?

#1084748

We are here as I need your help, right. So, don't worry. I will give my best to explain you my consideration and I'm aware that I do not do it precisely as I should.

In couple of hours, I will get final single post view of the parent post (Hotels) with integrated payment media types (it will work 100% as I'm near to be done). Than you will be able to see what I used for taxonomy (and what for fields), as it will be with demo posts.

In that way, we will remain on the GOAL > can it be used in FILTRATION for site visitors, or I should to switch from taxonomies to fields. Simple, not anymore too much waste of time.

So, in couple of hours.

#1084856

Okay I'll stand by for your update. I am unavailable tomorrow but will return Sunday.

#1086634
03.png
02.png
01.png

OK. Now you can see on hidden link what I want. Remaining isue is exactly the topic > "multi purpose".

1) On image 01 you can see how I displayed every post trough taxonomy (termeta > thumbnail).

2) Every post (obviously) contain usage of only one taxonomy (not the taxonomy term > see CC/DC, it is 6 terms in one post, but all within one taxonomy).

3) If I will use more than one taxonomy per post, I will get as on image 03, multiple rows of the same (not necessary) terms.

QUESTION IS > Why will I check more than one taxonomy in same post? Example, if I select Payment Gateways, why I should to use also CC/DC taxonomy? Answer is on image 02 (see JCB card within 2Checkout Payment Gateway - P.S. Cards are shown by static images, not trough taxonomy > so, just look same).

FACTUAL SITUATION

We can see that Hotel page shows that accept 6 Credit Card types (trough POS terminal), but truth is that accept 7 Credit Card types (JCB trough 2Checkout).

ISSUES

FIRST is on single hotel page, where I can't to show INLINE all 6 CC types, as if I check it per post two taxonomy, I will get another rows and duplicated items (not incremented).

SECOND is ARCHIVES, or filtration/search. Obviously, JCB card will not be available for that.

Hopefully is clear now. Is it some solution?

 

#1088662

FIRST is on single hotel page, where I can't to show INLINE all 6 CC types, as if I check it per post two taxonomy, I will get another rows and duplicated items (not incremented).
If this is the only reason not to use multiple taxonomies, then we can fix it with some custom code and a View of terms filtered by term ID. The custom code will find all the slugs of the terms associated with one post (from both taxonomies), then return a comma-separated list of term IDs (from one taxonomy). The View will output the term logos from one taxonomy. This works if the two taxonomies have identical terms and term slugs. Here is a general description of this plan:
Tax A has these terms:
- Term 1 (id 12, slug term-1)
- Term 2 (id 13, slug term-2)

Tax B has these terms:
- Term 1 (id 67, slug term-1)
- Term 2 (id 68, slug term-2)

Post 123 has these taxonomies and terms:
Tax A: Term 1
Tax B: Term 2

Your custom shortcode:

[custom-shortcode]  // returns 12,13 

View of Tax A, filtered by shortcode:

[wpv-view name="view-slug" ids="[custom-shortcode]"]

Even though Term 2 is not applied directly to Post 123, it appears in the View of terms.

SECOND is ARCHIVES, or filtration/search. Obviously, JCB card will not be available for that.
This is a problem whether or not you use multiple taxonomies. To filter or search by some term like JCB, this term must be applied directly to the post, not applied to a related post. There is no easy way around this problem. Instead, I can show you how to use the new post relationship APIs to perform some custom actions whenever two posts are connected or disconnected in a relationship. During those events, you can use custom code to add or remove terms to the Pagos post automatically based on the terms in related posts.

#1089323

Dear Christian, to be honest, I didn't understand pretty much anything of that what you wrote (vs custom code, of course).

I only know, that now I successfully displayed payment posts trough taxonomy view. However, that disable me to use multiple taxonomies per one single post (to get 'secondary' taxonomy, or taxonomy for 'secondary purpose'), as well disable me to get real state of the factual situation regards available taxonomies terms for purpose of custom search filtration.

I'm also not sure that you realized how that 'secondary taxonomy' per post is not taxonomy what user should to insert, rather should be done by me as administrator (and only once, per site wide). So, availability of CC/DC types per Payment Gateways is not something determinate by the clients, rather by the Payment Gateways (so, it is site wide), In other words, I maybe also explained it wrong, as it is essentially 'taxonomy within taxonomy', but taxonomy what should to belongs to the post and to be available for search purpose . Issue is that I don't know how to do it.

Probably the right terminology should be 'nested taxonomy' and not the 'secondary' or 'multipurpose'. Issue is somehow significantly more complicated as in other scenario, such 'nested taxonomy' should to be assigned per post by user (so, per case and not site wide). Example is 'in-shop' 'POS terminal' CC/DC charges could be limited per bank (so, ie VISA is accepted, but only issued by certain bank, what obviously depends per case and not site wide).

#1089505

We are unable to communicate on technical terms, so I do not think we can solve this problem together. As you said you cannot understand anything I wrote. At this point I do not know what else to do. We are already far off the original topic which was "populate field from taxonomy". In my opinion this ticket should be closed.

#1089591

I'm sorry as it looks that you don't feel yourself comfortable with looking for solution with me. However, whatever I eventually did wrong, I'm apologize, as it wasn't my intention. Yes, I will close the topic.

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