Woocommerce List All The Attributes And Delete Empty Attributes

Remove all attributes with empty fields

I have a geodatabase with multiple feature classes. The FCs do not all have identical fields. I want to write a test that removes attributes fields that are empty. I can’t find a way to do this, i.e. select all attribute fields.

The BulkAttributeRemover seems like the best bet, but not sure how to code the expression. Also, tried the custom transformer NullAttributeRemover, but the script expects the user to select which attributes to utilise (not a Python user).

Any suggestions appreciated! Thanks.

Thanks for the reply and the solution, this worked in Python. I’m surpised this can’t be done natively in FME, but hey-ho problem solved.

Are you able to share Takashi’s python file? I attempted to recreate it from the text above but evidently my python skills are not the best.


This subject was posted in 2013. You can use the NullAttributeMapper in 2014+.

This was five years ago. has something changed in the meantime?
I like to have a transformer which can check for attributes with no data in it, empty fields. So you can decide to remove them.

All about data quality and minimalization of attributes needed.

Hi, I’d like to take this a step farther and remove the attribute columns that only contain "Missing" attributes. Any ideas?

Hi @dos_gis, there isn’t a dedicated transformer that is designed for hiding attribute names, but you can hide unnecessary attributes by the TclCaller (2016) or PythonCaller with setting their "Attributes to Hide" parameter.

If they are missing then they won’t be actual attributes anyway. If you want to hide them on the canvas you can open the Reader feature type and turn them off in the user attributes tab

I think a PythonCaller is the quickest way.
This script, for example, removes null or empty attributes, then stores removed attribute names and the number of them as new attributes (removed_attr_names, removed_attr_count):

If you aren’t familar with Python, start from: Python and FME Basics New Python FME Objects API in FME 2012 Takashi

to remove attributes containing only , I’ve adjusted the script to:
Still doesn’t work.
(I’m not very convenient with Python. )

@takashi : can you help?

Hi @HarmenKampinga, firstly you will have to understand differences among , , and in modern FME after the null has been introduced (FME 2014 or later).

  • : a string value which contains no characters.
  • : a special value which indicates the attribute doesn’t have any valid value.
  • : a term (or symbol shown on FME Workbench interface, Log etc.) to indicate that the attribute doesn’t exist.

Although some transformers often treat and as in fact, they are strictly differentiated internally.
In modern FME, this PythonCaller script removes all attributes that store empty (not null).

And, it’s equivalent to the NullAttributeValueMapper with this parameters setting. That is, "Map To: Missing" is equivalent to "Remove the attribute".

You will also have to be aware that FME Workbench still keeps displaying names of attributes on its user interface, even if you have created a workspace containing a process to remove those attributes.
Whether an attribute exists at run-time won’t directly affect whether its name appears on Workbench interface. The attribute names displayed on Workbench interface would be determined statically when you have created the workspace.

[Resolved] Woocommerce product attributes empty/lost/not usable

This is the technical support forum for WPML – the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This thread is resolved. Here is a description of the problem and solution.

Problem:Products are translated but are not being displayed without front-end of the secondary language.

Solution:The customer was using the "Show only products with custom prices in secondary currencies" option enabled. When this option is enabled, only products with custom prices are displayed.

To fix this issue: – Click on the WooCommerce > WooCommerce Multilingual > Multi-Currency – Uncheck the "Show only products with custom prices in secondary currencies" option – Click on the "Save" button

This topic contains 4 replies, has 2 voices.

Assigned support staff: Bruno.

I am trying to:
View/buy existing variation products

URL of (my) website where problem appears:
hidden link

I expected to see:
A dropdown menu where I can select the size of the product and then buy it

Instead, I got:
a message telling me that the product of my choice does not exist and a "sold out" product

Steps to duplicate the issue:
just go to any of the products in the category "mala-armbänder" which are variation products

I did also try to create a new variation product with new product attributes.
But as soon as I click on "use this attribute for variations" – nothing happens. Woocommerce seems to be not able to use/find the product attributes.

I also deactivated all plugins and ran my page on twenty fourteen. The error persisted.
I am using WordPress Version 4.7.1,Woocommerce 2.6.13 and all the latest versions of your plugins.

Looking forward to your help.

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you for contacting us.

Do you have you tried to re-save the original product to see if the variations are being displayed in the secondary language?

Also, can you confirm that you have translated all the variations being used by these products? If not, you can see step by step in our documentation: https://wpml.org/documentation/related-projects/woocommerce-multilingual/#variations

Yes, I have tried that.
I have translated all variations for one product. It does not work and i get the same error in both languages.

The thing is, even if I want to create a new product and use the "size" attribute as the basis for variations, he will not create the variations. Even if I create a completely new attribute and try to create variations with this, it does not work.

I just found the reason: It’s multi currency mode.
As soon as I switch it off everything is perfect. As soon as I switch it on, it does not work.

Seems the "multi currency dropdown menu" (which I do not want to be displayed at all) affects my "size dropdown menu" in any form.

Do you have any insight in how I can solve this. I NEED multi currency.

OK, problem solved. I foreced "Show only products with custom prices in secondary currencies " and apparently I have none set.

How can we improve WooCommerce?

A method of grouping attributes to make them easier to manage – possible through nesting attribute terms.

45 комментариев

This would be so useful!

and be able to use it with

– translation (i use polylang to translate attr)
– product variations
– desc and image for each attr

This is a simple way to implement this: JC WooCommerce Advanced Product Attributes

This plugin seem to not be supported anymore.

It makes Three thinks:

1/ Group and manage atributes and atributes default values (this is great) on backend allowing to define sets of atributes
2/ Present Atributes in groups on fornt end.

3/ Manage swatches for each atribute (This seem not to be a key feature in this Topics but could be useful if implemented in the core woocommerce using Woocommerce sawtches).

Is there any update on this, or a solution people have discovered elsewhere (not including plugins)?

This is a great idea and would save a huge amount of time. Any updates?

For this function to be really useful, it needs to work a bit like Magento. In Magento you can define attribute groups and each product then is assigned an attribute group. Once a user makes a change to an attribute group, that change is now live on all products with that group. So for example, if you decide you no longer need an attribute and delete it from the attribute group, it is now no longer available on every product that uses that attribute group. Same if you had or rearrange the order of attributes within the group.

This is a functional rethink of the way it is right now done in WooCommerce where you have "global" attributes and "local" attributes. When you delete a global attribute, it does not change the local attribute data per say. It is still there and actually leads to a lot of potentially orphaned data.

IMO, this is one of the more baffling issues where WooCommerce lags behind Magento. I think if WooCommerce would do a rethink (which I believe would require a core change as you will need new tables to manage this), by moving all attribute management to one place and then be able to manage attribute groups from there. In essence, the meta data stored for each product would only be the group name (id), while the values would be stored in a data table in the db by group ID.

Can you share your solution?

We just made this https://goo.gl/e99hjd. It allows you to organize attributes in groups and categories and add them together with a single click where creating simple and variable products. A live video of how it works can be found here https://www.youtube.com/watch?v=WBzeFDwDQz4

I need to group product attributes, Please help me!

I so need this and I can’t believe someone hasn’t jumped at the opportunity to create what would be a premium plugin. I would happily pay US$50 – $100 given how much more efficient it would make entering products. We sell everything from Motorbikes to generators and lawnmowers.

Please share your email address. I will send it to you.

I have created something similar extension, but it was working separately from default woocommerce attributes. It was creating new section called Specifications and all the things were working almost similar to what you have mentioned.

Woocommerce Plugin is too old, long have been updated: Like I said above, the update to the new version plugin will solve the problem of compatibility, and fixes a lot of bugs, so you should update to the new Woocommerce The most frequently.
Error by 3rd party theme: We often use the theme is written by a 3rd party, so you should check that the theme look like the plugin Woocommerce injured or not, to examine change the default theme WordPress Twenty Fifteen or Twenty Sixteen as if this fault disappears, so 3rd party themes are not, find another solution: D

what i mean as an example

there are 2 way to add attributes: 1-categorized attributes and 2-single attributes

1-categorized attributes
Attribute category name: Body
Attributes that are in this category:
– Dimensions
– Weights
– Material

Attribute Category Name: Connections
Attributes of this category :
– WiFi
– Bluetooth
– Infrared

for example i assigned 2 attribute category "Body" and "Connections" and 2 single attribute "Battery" and "Network"
to Product category mobile.
so when i am adding new product to this category, in the attribute sections i have something like this :

– Dimensions :
– Weights :
– Material:

– USB :
– WiFi :
– Bluetooth :
– NFC :
– Infrared :

so i fill just the value of the attributes and there is no need to add attribute one by one, and this is how it showed in site :

– Dimensions : 124x120x90 mm
– Weights : 120g
– Material: Ceramic
– USB : V3.0,OTG Support
– WiFi : a/b/c/d/n
– Bluetooth : v4.1,A2DP
– NFC : Yes
– Infrared : Yes
– Battery : 4000mAh, Fast charging
– Network : 2G / 3G / 4G

I hope to see this idea soon in WooCommerce

I’d also like to see attribute groups. Ideally so that two product may have their own unique set of attributes though with the same name such as "Color" but each of these color attributes are within unique attribute groups. To be able to have the same name attributes taxonomies, with different terms applied to unique products so the labels on the front end could be identical.

So, um. Has James plugin done it’s job? I’m going to develop my own version (since i need additional functionality) so I’ve been wandering if there was any progress in this area.

Hi, I have been waiting on this feature being added to woocommerce, after a while i decided to have a go at developing a plugin which allows you to create groups of product attributes which can be loaded into products from just under the attributes section. JC WooCommerce Advanced Product Attributes has other features which can be enabled/disabled from the settings page. Attribute grouping works with WooCommerce 2.2+

For anyone interested in this issue: here’s the solution that I’ve been using for now (although I, like others here, would love to see this featured added in to the wonderful Woocommerce!).
For products that have a lot of pre-defined attributes, I create a draft product as a "template" (setting some initial attributes, plus the product category, etc. etc.). Then I use the convenient "Copy to a new draft" feature to create a new product based on that "template." That new product already has the attributes & other details mostly set. I customize everything for that new product and am on my way. It’s not perfect (especially since at least one of each attributes needs to be set for the attribute to appear within the template draft — since no empty attributes are displayed by default). But, it’s the most efficient method I’ve found thus far.

Новые и зарегистрированные пользователи могут войти

Leave a Reply

Your email address will not be published. Required fields are marked *