Support » Plugin: Media Library Assistant » Adding images to product

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

    (@dglingren)

    Thanks for your question and for the screen shots you included; very helpful.

    It looks like you are using WooCommerce. As I understand it, you want to upload images and have them added to the WooCommerce Product Image and Product Gallery Images. Is that right?

    If so, I want to clarify what is and is not available in the current MLA version. The “Parent ID”, “Attached to” and “ORPHAN?/UNUSED?” features refer to WordPress core functions and have little relation to the WooCommerce Product Image/Product Gallery functions. The “Product Image” is stored as the WordPress “featured image” for the post and the “Product Gallery” is stored as a WordPress custom field. The ORPHAN? indicator simply means that the item is attached to the “post” (Product) but does not appear in the post content field, etc.

    There is an MLA example plugin, “WooCommerce Fixit”, which has evolved over several earlier support topics to accomplish various product-specific tasks. Your requirement is a new one, and I regret that none of the existing tools it provides will accomplish your goal of populating the Product Image and/or Product Gallery with Media Library items attached to the Product “post” during the upload.

    It might be possible to add new tools to the Woo Fixit plugin to accomplish your “bulk edit” goal. I have very limited time to work on this but if you are patient I can investigate further. Am I correct in understanding your goal, i.e., create the Product Gallery and Product Image from attached items? Which of the items should become the Product Image; first uploaded, perhaps?

    I will leave this topic unresolved until I hear back from you. Thanks for your understanding, your patience and your interest in the plugin.

    Thread Starter fireskyresale

    (@fireskyresale)

    Thank you for getting back to me. Yes, the first photo on bulk upload would be the main product image followed by the rest as the gallery in the order they are uploaded. Right now your bulk edit tool is making it WAY easier to at least group and find my images. Especially when I sell a product and then have to find the photos to delete. That has saved some time but it would be hours and hours saved if they auto attach. Take your time and thank you for looking into it. 🙂

    Michelle

    Plugin Author David Lingren

    (@dglingren)

    I am happy to report some progress on developing new tools in the WooCommerce Fixit example plugin. I have uploaded a new MLA Development Version dated 20210317 that contains a new version, 2.10, of the example plugin as well as an update in the core plugin that fixes a defect I encountered during my work. You can find step-by-step instructions for using the Development Version in this earlier topic:

    PHP Warning on media upload with Polylang

    Once the Development Version is installed you must install/update and activate the example plugin. Navigate to the Settings/Media library Assistant Documentation tab and click the “Example Plugins” button. Type “woo” in the text box and click “Search Plugins” to filter the table.

    You are looking for the “WooCommerce Fixit” example plugin. Find that plugin and hover over the title in the left-most column. Click the “Install” (or “Update”) rollover action, then go to the WordPress Plugins/Installed Plugins submenu and activate the example plugin as you would any other plugin. Make sure you have the latest version, 2.10, installed. You can also click the “View” rollover action to view the source code of the plugin, which contains documentation and use notes displayed as comments at the beginning of the source code.

    Once the Development Version and updated example plugin are installed you will see three new tools in the “Operations on the Product Image and Product Gallery” section:

    1. The “Fill from Children” will add the product’s attached images to the Product Image and/or Product Gallery. Any images already present will be retained.
    2. The “Replace from Children” will replace the product’s attached images to the Product Image and/or Product Gallery. Any images already present will be deleted. Make sure this is your intent before using the replace tool.
    3. The “Populate P.I. and P.G. …” options implement the feature you requested in this topic. When images are uploaded and attached to a product, they will be added to the Product Image and Product Gallery.

    There are two options for the “… from Children” tools. The “Add Product Image to Gallery” option will add a copy of the Product Image to the Product Gallery (the default behavior omits the P.I. from the gallery). The “Delete P.I. and P.G. if no children” option will delete the P.I. and P.G. from any product that has no attached children (the default behavior leaves them in place).

    The “Populate P.I. and P.G. …” options are not tools that run within the exmple plugin. When checked, they add logic to the image upload process that inserts the image in the parent’s Product Image and/or the Product Gallery. You did not say how you upload images and attach them to products; these options cover two different upload methods.

    The “Bulk Edit on Upload” option is active when you upload images using the Media/Add New (Upload New Media) admin screen to which MLA has added a Bulk Edit area. If you open the Bulk Edit area and enter the product’s ID in the “Parent ID” field, the images will be attached to the product as they are uploaded.

    The “WordPress MMMW Add Files” option is active when you click the “Set product Image” or “Add product gallery images” links on the Product/Edit Product admin screen. Either one will activate the MMMW popup window with the “Upload files” and “Media Library” tabs. If you select the Upload files tab and drop images into the upload area the images are attached to the product and the option is active. The one awkward part of this alternative is that you must manually refresh the Product/Edit Product admin screen after closing the popup window to see the new additions. For this reason I recommend using the first method instead.

    It would be great if you could install the Development Version and the updated example plugin, run some tests and let me know how they work for you. I will leave this topic unresolved for now and I hope to hear back from you soon. Thansk for your patience and for inspiring these Woo Fixit improvements.

    Thread Starter fireskyresale

    (@fireskyresale)

    Hello,

    I am so sorry that I have taken so long to get back to you. I had surgery and I’m a bit behind on everything. On a plus note this will allow me this week to work on my website uninterrupted so I am excited to see how it works. I’ll let you know how it goes and if I run into any issues. I really appreciate all of your work for it. If this works, it will save me hours!!!

    Michelle

    Thread Starter fireskyresale

    (@fireskyresale)

    Finally clear headed today and checked out the update. Works perfectly! This is exactly what I was looking for. I can’t thank you enough. Do you have a donate option for your time? I appreciate the work you put into this plugin, it is great!

    -Michelle-

    Plugin Author David Lingren

    (@dglingren)

    Thanks for both of your updates with the good news about the enhancements to the “WooCommerce Fixit” example plugin. Thanks as well for your patience while I was traveling and away from my computers.

    Thanks especially for your question “Do you have a donate option for your time?” For years MLA had an option to donate to our nonprofit, Fair Trade Judaica. I removed the option when FTJ shut down. Your question inspired me to create a new donation option which I will add to the next MLA update. In the interim you can access the new option here:

    Donations to Support MLA

    I appreciate your kind words and your generosity! I am marking this topic resolved, but please update it if you have any problems or further questions regarding the Woo Fixit enhancements.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.