Support » Plugin: Import any XML or CSV File to WordPress » Is it possible?

  • Resolved goldendragonuk

    (@goldendragonuk)


    My supplier hides items that are out of stock and as such dont appear in xml file.

    Is it possible to use some kind of if statement for example if product sku is not in xml set stock quantity to 0 and out of stock ?

    Regards

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hey @goldendragonuk

    In this case, I would suggest importing the products using a “New Items” import, then enabling the “Delete posts that are no longer present in your file” option during step 4. Within this option, you can choose to set the _stock_status field to “outofstock” rather than deleting: https://d.pr/5GwrAh.

    If you need to change both the stock and stock quantity fields, then you can use this hook: wp_all_import_is_post_to_delete.

    Didn’t seem to work even tried setting _stock to 0 no luck either im sure ill figure it out eventually

    Plugin Author WP All Import

    (@wpallimport)

    Hi @goldendragonuk

    That’s strange! We’d need to take a look at the import settings & data to figure out why it’s not working. Please reproduce the issue at http://www.wpallimport.com/debug/ and open a support ticket at http://www.wpallimport.com/support/ referencing this ticket so that we can help out.

    Plugin Author WP All Import

    (@wpallimport)

    Hey @goldendragonuk.

    My apologies, I forgot to mention that you can also try using this setting (as long as “Delete posts that are no longer present in your file” is disabled): https://d.pr/mu9hAM.

    If that also doesn’t work, then we’d be glad to work with you via the support link above.

    I asked support seems like its not possible to do it the way I need it done. See below

    The problem is that you are trying to us a ‘New Item’ import to alter products that already exist on the site. You can only modify/delete products that were created by the same import.

    An ‘Existing Item’ import would be able to update those products, but it doesn’t have the ability to delete them. As such, the provided work around isn’t applicable to existing products.

    You will need to perform a full backup of your site and then remove all of your products. Then put together a file that contains all of the products that should currently be on your site. Use a ‘New Item’ import to recreate them all, then use that same import to perform all updates. That will allow you to use the provided workaround for setting your stock to 0.

    Plugin Author WP All Import

    (@wpallimport)

    Hey @goldendragonuk

    That is true, you can only use these features in a “New Items” import, which can only update posts/products that it previously created.

    eldb

    (@przemyslaw-napierala)

    I’ve similar problem. Generally I sort products in alphabetical order but no stock items are grouped at the end. So I need in “WooComerce Add-on –> Inventory” manage “Stock status” (“On stock” or “Out of stock”) but it’s not possible by WP All Import plugin. I resolved it by prepare another csv file with no stock items only and manually change “Stock status” but will be great if WP All Import allow set “Stock status”.

    I have exactly the samel issue that @goldendragonuk had (and it is not resolved). Will there be functionality at some point possibly with filtering option between distributors distributors? That would help me separate products from one stock (XML file) and another stock (another XML) file. Like condition: if has tag “distributor_1” AND is no longer present in distributor_1_XML.

    At the moment, this workaround to import all products again does not look like a solution because I only sync stocks from distributors XML and products imports are made by custom csv.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Is it possible?’ is closed to new replies.