Skip Navigation

[Resolved] Use custom fields as taxonomies

This support ticket is created 3 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.

Our next available supporter will start replying to tickets in about 1.41 hours from now. 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 5 replies, has 2 voices.

Last updated by Minesh 3 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#1628567

Hello,

Before I come to the actual question, here is a brief information about the initial situation: We are a company that is active in the trade with spare and industrial parts. Currently we are introducing a new ERP system (Weclapp - hidden link) in our company. This ERP will be the leading system for data maintenance. Our online presence will be a website with integrated Woocommerce Shop. The product data will be transferred to Woocommerce via Weclapps own API.

To transfer product specific properties Weclapp offers us the possibility to create our own fields in the ERP and to transfer these entered values to specific fields in Woocommerce. The assignment is done via the Meta Data Key link.

This is where Toolset comes into play. How can I use the transferred values (which are now in custom fields of every Woocommerce product) as a taxonomy?

The goal is to use the transferred product properties (which are not transferred as properties but in own custom fields (because otherwise not possible)) to filter the products in the online shop and to create own subpages out of them to list the manufacturers and to show the corresponding products.

If the whole thing can be solved differently, I am open to this.
The only important thing is - the API transfers the data only from Weclapp to the Woocommerce products and own Weclapp fields can only be assigned via Meta Data Key. The simplest way would have been to transfer the values as product attributes, but the respective value of a product attribute is unfortunately somewhat cryptic and cannot be entered in the ERP.

I hope I could explain understandably enough what the goal is and where the difficulties are. Please don't hesitate to ask if something is still unclear.

Thanks a lot! 🙂

Best regards,
Ben

#1628861

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Basically, from your request it seems that you want to convert the existing custom field values to taxonomy terms.
If this is correct:

The first thing is that I honestly do not know-how the Weclapp (ERP) or its associated API works and in addition to that we are not allowed to debug/troubleshoot the thrid party products.

Within the WordPress ecosystem, taxonomy and custom field are distinct entities where custom field values stored to postmeta database table and terms are stored to the terms database table and Toolset strictly follows the WordPress ecosystem.

Having said that, Toolset handles custom fields and taxonomies just like standard WordPress post meta and taxonomies, and you may be able to find a solution that generically works with WordPress and WooCommerce, in which case you should be able to use Toolset when working with that data which is stored to the database as per the WordPress standards.

In your case, weclapp support is probably the best people to ask about this. I would say, It's really a weclapp/WordPress/WooCommerce problem rather than a Toolset problem.

As you basically want to convert the postmeta values to terms, it eventually requires custom programming which is beyond the scope of our support policy. If you need custom programming for your project, please feel free to contact our certified partners:
=> https://toolset.com/contractors/

#1629823

Hello, Minesh,

thank you for your feedback.
Unfortunately the Weclapp API cannot be adapted and there is no other possibility than to transfer the product attributes via own fields (Weclapp) to own fields (Woocommerce). Therefore the idea was to process the data that is already in Woocommerce accordingly. I understand if this is too deep for a support request. I also don't want to bend the system too much to enable this functionality by force.

But maybe we can solve at least a part of the problems.

a) Is it possible to create an own view that shows all Woocommerce articles that have the value "zz" in the field "xy"? This would allow the manual creation of certain pages, which would also be very helpful.

b) Is it possible to create a "filter" that filters the current product view (in the same way as question a) for a certain value in field xy? Quasi similar to the actual attribute filtering of Woocommerce. Again, it would not be a classical taxonomy but at least you could use the data of custom fields.

Thanks a lot already.

#1629839

Minesh
Supporter

Languages: English (English )

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

a) Is it possible to create an own view that shows all Woocommerce articles that have the value "zz" in the field "xy"? This would allow the manual creation of certain pages, which would also be very helpful.
==>
if the filed "xy" is a custom field, yes you can add a custom field filter from the "Query Filter" section of your view and add custom field filter and add the value you want to compare.

More info:
=> https://toolset.com/documentation/user-guides/views/filtering-views-by-custom-fields/

b) Is it possible to create a "filter" that filters the current product view (in the same way as question a) for a certain value in field xy? Quasi similar to the actual attribute filtering of Woocommerce. Again, it would not be a classical taxonomy but at least you could use the data of custom fields.
==>
When you say a certain value, do you mean you want to search specific value inside the "xy" field, just like a text search? If yes, you need to use the relevanssi plugin that will allow you to search within the field value.
- https://toolset.com/documentation/user-guides/views/searching-texts-custom-fields-views-relevanssi/

#1637289
mm_25-05-_2020_12-09-04.png

Hello Minesh,

a) seems to be the solution I was looking for. I'll try this out, thank you.

b) this was meant a little bit different. The ERP transfer values (for example: "3/4-16UNF") or just boolean values to custom fields for each article. I want now to filter for this values in my woocommerce product list. Like on the picture I've attached.

#1637301

Minesh
Supporter

Languages: English (English )

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

a) seems to be the solution I was looking for. I'll try this out, thank you.
==>
Ok.

b) this was meant a little bit different. The ERP transfer values (for example: "3/4-16UNF") or just boolean values to custom fields for each article. I want now to filter for this values in my woocommerce product list. Like on the picture I've attached.
==>
You should try to add frontend fitlers to your view using custom search view and check if that helps.

More info:
- https://toolset.com/documentation/user-guides/views/front-page-filters/

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