Unable to update a custom field in the product variations.

Pending

Import WP Addon - Advanced Custom Fields Updated 3 days ago 32 Replies

Jonathan asked 2 months ago on November 29, 2024 at 2:37 pm

Hello,

I hope you’re doing well.

I have a question. We need to fill in a field created by a partner for the EANs. The field is as follows: sf_advanced_ean_field. I think I found it in the plugin, but I’m unable to update it.

Could you help me with this?

Thank you.

Ps : Your plugin can create this field: `sf_advanced_ean_field`, as initially, I couldn’t find it.

Because normally, this field: `sf_advanced_ean_field` is linked to the EAN field (screenshot attached).

J

James replied Support Agent

2 months ago on December 2, 2024 at 2:39 pm

Hi,

Is the sf_advanced_ean_field and acf (Advanced custom fields) field or a normal wordpress custom field?

If you create example variable / variation product with this field populated, are you able to use the custom field viewer to see the value of this field? https://www.importwp.com/docs/how-to-import-wordpress-custom-fields/#find-existing-custom-fields

James

JG

Jonathan replied

2 months ago on December 2, 2024 at 5:13 pm

Yes, I can see it now, but maybe that's because I created it with WP import. The first time, it was not possible to find it.

So I think it's with ACF.

J

James replied Support Agent

2 months ago on December 2, 2024 at 9:42 pm

Just to make sure i am not missing anything, did you create a demo product with the custom field, then use that demo product as an example to find the custom field from the custom field viewer mentioned in the previous response.

JG

Jonathan replied privately

2 months ago on December 3, 2024 at 9:05 am

J

James replied Support Agent

2 months ago on December 3, 2024 at 9:41 am

Can you Provide me with a temporary login, and a link the an existing product that has the correct sf_advanced_ean_field custom field populated.

J

James replied privately Support Agent

1 month ago on December 4, 2024 at 9:54 pm

JG

Jonathan replied privately

1 month ago on December 6, 2024 at 12:41 pm

J

James replied privately Support Agent

1 month ago on December 9, 2024 at 10:28 pm

JG

Jonathan replied privately

1 month ago on December 10, 2024 at 8:04 am

J

James replied Support Agent

1 month ago on December 10, 2024 at 1:01 pm

Using the username and password does not allow me to login:

 

J

James replied privately Support Agent

1 month ago on December 10, 2024 at 1:03 pm

JG

Jonathan replied privately

1 month ago on December 16, 2024 at 2:46 pm

J

James replied Support Agent

1 month ago on December 16, 2024 at 5:49 pm

Thank you for sending the files, i have had a look through the sql and can see it is a custom field that is named: "sf_advanced_ean_field".

You should be able to import into this field by using the custom field section, and setting the field to "enable text field" and manually entering the name: sf_advanced_ean_field

I have attached a Screenshot attached showing the importer custom field panel, screenshot showing the importer history for the variation in the example #20 , a and a couple others showing the custom field values.

If you are having trouble replicating this, can you please send similar screenshots of the custom field settings in the importer template, the importer history view for a record, and the same records input data (row of xml or csv).

Thanks
James

 

JG

Jonathan replied

1 week ago on January 8, 2025 at 10:13 am

Thank you, i'll try this now. 

JG

Jonathan replied privately

1 week ago on January 8, 2025 at 11:23 am

J

James replied Support Agent

1 week ago on January 9, 2025 at 10:03 pm

Is the EAN field on the variable product being saved? from the field preview it looks like there is no value.

To set any data on the product variation, you need to have an importer that updates the variation like you have for the variable product.

To set a default value for a field, click on the icon to the right of the select data button (https://www.importwp.com/docs/template-fields/#mapping-fields) , then set it to be (shown in the attachment)

If Value: Equals
This: 
Then return: (the name of your default attribute)

James

JG

Jonathan replied privately

1 week ago on January 10, 2025 at 1:07 pm

JG

Jonathan replied privately

1 week ago on January 10, 2025 at 1:09 pm

J

James replied Support Agent

1 week ago on January 10, 2025 at 1:27 pm

The previous attachment, at the bottom right of the screenshot, to the right of the "select data" button, will load up the modal/popup.

I will have a go at creating a video, however they just use the custom fields section the same as any other product: https://www.importwp.com/docs/how-to-import-wordpress-custom-fields/ , so the row in the csv/xml should have the ean column populated. are you able to provide me with:

Your xml / csv file being used so i can use this as an example, and can you please export and attach your importer settings to this ticket by going to Tools > Import WP > Settings / Tools > Import / Export and select and export your importer as a JSON file.

James

JG

Jonathan replied privately

4 days ago on January 13, 2025 at 4:41 pm

J

James replied Support Agent

4 days ago on January 13, 2025 at 9:50 pm

Hi Jonathan,

Thank you for providing those 2 files, after loading up your importer and running importer on a fresh woocommerce / wordpress install it created a seperate variable product for each row.

To solve this i changed the "Product type" field from variable product to "{0}".

running it again, it created the variable product, but was unable to create the product variations as it could not find the parent variable product.

To fix this i edited the importer template, changing the "Advanced" section "Parent Field Type" to "Name", and setting the Parent field to the Nom column: "{2}".

Running this on a fresh install created a single product with 6 variations, screenshot attached showing the imported product with the custom fields set.

James

 

JG

Jonathan replied privately

4 days ago on January 14, 2025 at 8:30 am

J

James replied Support Agent

4 days ago on January 14, 2025 at 3:25 pm

The only thing i can see is the permissions tab, change the unique identifier to "Select a template field to be used as the unique identifier for each record.", and set the Template field: "_sku".

If you re-run that, and take a screenshot of the history, possibly compare the records #id to see if they are targeting the correct products.

James

JG

Jonathan replied

3 days ago on January 15, 2025 at 9:01 am

Hello, 

I made the change and i got this : 

J

James replied Support Agent

3 days ago on January 15, 2025 at 9:09 am

Can you confirm that the sku of records 1-6 exist? and are of type product variation?

JG

Jonathan replied

3 days ago on January 15, 2025 at 9:34 am

Yes : 

J

James replied Support Agent

3 days ago on January 15, 2025 at 9:37 am

Sorry i was meaning to check your woocommerce shop for existing products that have the "Test - (36-41)", as the error message suggests that these exist but are not product variations, so you need to delete them and remove them from the trash.

JG

Jonathan replied

3 days ago on January 15, 2025 at 9:42 am

I will empty the products into the trash; maybe that is what is causing the problem.

JG

Jonathan replied

3 days ago on January 15, 2025 at 9:55 am

It works.

However, I have empty fields, how can I fill them?

Then, how can I add photos?

JG

Jonathan replied privately

3 days ago on January 15, 2025 at 9:56 am

J

James replied Support Agent

3 days ago on January 15, 2025 at 9:57 am

Have you populated these fields in the importer? 

An introduction to importing woocommerce products can be found here: https://www.importwp.com/docs/import-woocommerce-products-from-csv-xml/

JG

Jonathan replied

3 days ago on January 15, 2025 at 11:01 am

I'll check. 

Thank you