• Resolved alx359

    (@alx359)


    After learning some more of WP and MLA internals, think to have figured out how the ‘Tag Groups’ plugin wouldn’t be needed anymore.

    Have enabled support for ‘Product categories’ (product_cat) taxonomy, and an empty mirror of it has appeared in Media > MLA > Categories.

    What I’d need now is an automated way of assigning all media images to that mirrored ‘Categories’ taxonomy.

    The link I have for achieving such task relies upon all images in media library being already attached to a given product.

    Would you suggest a tool or process that could read a WooCommerce product gallery and assign the images found to the same (mirrored) category as the product itself?

    Example:
    – Product Category: ‘Asian Collection I’ [82 products]
    – Each product under that leaf has its own WooCommerce gallery, consisting of about 5-6 images attached to the product itself.
    – I’d need these 5-6 images to get assigned at once to the same “Asian Collection I” leaf mirrored in MLA.

    Is that possible?

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your question. You can find some good information in this earlier topic:

    Automatically assigning/syncing WooCommerce taxonomies to/with MLA

    You might also be able to use some of the tools built in to the “WooCommerce Fixit” example plugin, which I believe you have already installed. Go to the Tools/Woo Fixit admin submenu and scroll down to the “Term Assignments for Media Library Items” section. Read the description of the tools there and see if they do what you need. You can use the “First Product” and “Last Product” boxes at the top of the screen to experiment with the tools on a single product and its associated attachments.

    I am marking this topic resolved, but please update it if you have problems or further questions regarding the above suggestions.

    Thread Starter alx359

    (@alx359)

    I’ve used Term Assignments for Media Library Items > Assign Terms and it seems to be doing exactly what I needed. A real time-saver, thanks!

    I also skimmed through the informational topic you linked, but I’m not so sure I understand enough the logic behind and implications of using a “mirrored” product taxonomy, instead of an independent Att. Taxonomy. For example:

    – What happens when one shuffles around a WC product in the (source) WC category? Does all corresponding images in the mirrored category will follow suit and shuffle together, too, or one has to do all that manually?
    [Answer edit1:] No, they seem to stay in the old WC category.
    Follow up: would hitting the “Assign Terms” button once again update or append the new category?
    [Answer edit2:] It appends the new product category to assigned images. A workaround is first hitting ‘Clear Terms’ and then ‘Assign Terms’ again.

    – Are these tagged images in the mirrored category also part of the source product category, and might they be accessible with other tools also, if MLA isn’t present?

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update with the good news regarding the Woo Fixit example plugin. I see you have answered your first question by continuing your experimentation.

    Regarding your second question, as long as the product_cat (and/or product_tag) taxonomy is registered for the attachments post type the assigned terms will be accessible with or without MLA. If you have used the “Taxonomy Support” section of the Settings/Media Library Assistant General tab to register the taxonomy you will have to find another way to accomplish the registration when MLA is not present. A line of code in your theme’s functions.php file, perhaps.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘map product gallery to media taxonomy’ is closed to new replies.