XML Product import Woocommerce

Closed

Import WP Addon - WooCommerce Updated 2 years ago 15 Replies

Timothy asked 2 years ago on February 26, 2023 at 12:31 am

Hello,

I just purchased your plugin to import products from an XML file into my woocommerce online store. I am having difficulty with the following.

1. I got an index file not found error message when I  started the tool.

2. I can not seem to get the product images to upload and or show up. This is a critical feature!

https://d1o1wlqwda3y1b.cloudfront.net/CNVELD/1001-0313.JPG

3. I can not assign the new imported products to a category. Do I have to create the categories?

4. I do not understand the custom fields. I wanted to include categories. Do I have to create them first?

5. Now when I attempt to import the file I receive the below error message

TB

Timothy replied privately

2 years ago on February 26, 2023 at 1:14 am

J

James replied Support Agent

2 years ago on February 26, 2023 at 9:25 am

Hi Timothy,

Do you continue to get the "index file not found error message" , if so this is to do with the preview data, could you please go back to the "1. select file" step and re download/upload the xml file, this should refresh the index cache.

So that i can get an idea of the strucutre and setup of your importer are you able to attach a copy of your importer by going to Tools > Import WP > Settings / Tools > Import / Export > and attach the exported importer file to this ticket, along with a sample of the xml you are using.

For reference a good example of importing product categories and images can be found in this documentation (even tho the example is csv): https://www.importwp.com/docs/import-woocommerce-products-from-csv-xml/

James

TB

Timothy replied privately

2 years ago on February 26, 2023 at 7:20 pm

J

James replied Support Agent

2 years ago on February 26, 2023 at 9:30 pm

Thank you for sending over the information (i have attached my generated sample.

Based on the exported importer and sample data i ran into some issues with your setup.

1. Product ID field , this field is used if you are referencing the wordpress product ID which is numeric, in your example this is: CNVELD-1001-0313 , which when the importer tries to use to find the product it causes errors. Normally WooCommerce uses the SKU, which you have set to {/UPC} in the example: 184709000000.

If you want to continue using the Product ID field as your thats fine, but if you want to use the sku field, under the permissions step of the importer set the Unique identifier field to _sku

2. Product Gallery - Empty he repeater node field, Emtpy the base_node field

3. Categories - Remove Category_1, Category_2, and Category_1 custom field rows, and instead add them to the taxonomy rows, selecting the Taxonomy as "Product categories", and setting the terms to "{/Category_1},{/Category_2},{/Category_3}" , as you can see each term is seperated by a comma.

J

James replied Support Agent

2 years ago on February 26, 2023 at 9:33 pm

J

James replied privately Support Agent

2 years ago on February 26, 2023 at 9:35 pm

TB

Timothy replied privately

2 years ago on February 26, 2023 at 10:47 pm

J

James replied Support Agent

2 years ago on February 26, 2023 at 10:57 pm

How was the importer ran?

TB

Timothy replied

2 years ago on February 26, 2023 at 11:08 pm

From Tools>WP Import>importers

 

It has not moved but the products that were imported look gook

J

James replied Support Agent

2 years ago on February 26, 2023 at 11:08 pm

If it was manually run then you need to keep the page running it open

TB

Timothy replied

2 years ago on February 26, 2023 at 11:14 pm

Ok, I was wondering if my pc going to sleep had anything to do with it.

 

Should I just rerun it and keep the window open?

J

James replied Support Agent

2 years ago on February 26, 2023 at 11:19 pm

yes that sounds like it may have caused it to stop.

if it does stop again, you could schedule the importer then it would be ran in the background using the wordpress cron, this works best if you have the wordpress cron hooked into the servers task scheduler and running every 5 minutes.

TB

Timothy replied

2 years ago on February 26, 2023 at 11:55 pm

It looks like it is running well now. Thanks again..

The only issue is that my status field has OOS for Out of stock. How can I compensate for this by using the data to trigger the status?

J

James replied Support Agent

2 years ago on February 27, 2023 at 9:16 am

To map your stock data you need to use a custom method, by adding this code to your websites.

function iwphd_stock_map($input = '')

{

    switch ($input) {

        case 'In Stock':

            return 'instock';

        case '':

            return 'onbackorder';

            break;

        case 'OOS':

            return 'outofstock';

            break;

    }

}

And using it in the importer by setting the stock status field to:

[iwphd_stock_map("{/Stock_Info}")]

This will change the value "In Stock" to the woocommerce "instock", and "OOS" to the woocommerce "outofstock"

TB

Timothy replied

2 years ago on February 27, 2023 at 2:37 pm

WOW... Thanks a Million!!!!