Unable to update a custom field in the product variations.

Closed

Import WP Addon - Advanced Custom Fields Updated 2 weeks ago 55 Replies

Jonathan asked 3 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

3 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

3 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

3 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

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

J

James replied Support Agent

3 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

3 months ago on December 4, 2024 at 9:54 pm

JG

Jonathan replied privately

3 months ago on December 6, 2024 at 12:41 pm

J

James replied privately Support Agent

2 months ago on December 9, 2024 at 10:28 pm

JG

Jonathan replied privately

2 months ago on December 10, 2024 at 8:04 am

J

James replied Support Agent

2 months 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

2 months ago on December 10, 2024 at 1:03 pm

JG

Jonathan replied privately

2 months ago on December 16, 2024 at 2:46 pm

J

James replied Support Agent

2 months 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 month ago on January 8, 2025 at 10:13 am

Thank you, i'll try this now. 

JG

Jonathan replied privately

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

J

James replied Support Agent

1 month 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 month ago on January 10, 2025 at 1:07 pm

JG

Jonathan replied privately

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

J

James replied Support Agent

1 month 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

1 month ago on January 13, 2025 at 4:41 pm

J

James replied Support Agent

1 month 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

1 month ago on January 14, 2025 at 8:30 am

J

James replied Support Agent

1 month 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

1 month ago on January 15, 2025 at 9:01 am

Hello, 

I made the change and i got this : 

J

James replied Support Agent

1 month 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

1 month ago on January 15, 2025 at 9:34 am

Yes : 

J

James replied Support Agent

1 month 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

1 month 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

1 month 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

1 month ago on January 15, 2025 at 9:56 am

J

James replied Support Agent

1 month 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

1 month ago on January 15, 2025 at 11:01 am

I'll check. 

Thank you

JG

Jonathan replied privately

1 month ago on January 22, 2025 at 2:41 pm

J

James replied Support Agent

1 month ago on January 22, 2025 at 4:30 pm

To help me understand this can you export your and attach your current 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.

Along with the file being imported.

JG

Jonathan replied privately

4 weeks ago on January 23, 2025 at 1:36 pm

J

James replied Support Agent

4 weeks ago on January 23, 2025 at 7:07 pm

Hi Jonathan,

Are you able to replicate your issue on a sandbox website: https://demo.importwp.com/

James

JG

Jonathan replied

4 weeks ago on January 24, 2025 at 9:24 am

Are the EANs activated?

My objective, given that everything is not working properly and that starting next week, I need to bring back hundreds of products, would simply be to update the EANs.

Can you suggest a solution for this?

J

James replied Support Agent

4 weeks ago on January 24, 2025 at 9:37 am

If my previous solution that i can get working locally, and you are not able to. i would recommend getting a refund from codecanyon and trying a different importer plugin since this has taken 2 months with no resolve as all you are doing is importing a custom field onto a product variation.

James

 

JG

Jonathan replied

4 weeks ago on January 24, 2025 at 10:34 am

The solution you gave me works, but some information doesn't appear on the product page.

That's why I simply want to update the EAN. Is it possible with your product to update only one part of a product? If yes, in my case it would be to update the EANs.

Can you help me with this?

I don't want to have a refund at the moment. I think we haven't explored the appropriate solutions

J

James replied Support Agent

4 weeks ago on January 24, 2025 at 10:41 am

To update a single part of a product you can use the permissions tab of the importer, under the update permission, set this to "import" only the following fields and then select which ones.

and uncheck create / delete if you do not want these.

JG

Jonathan replied

4 weeks ago on January 24, 2025 at 10:51 am

Thank you i'll try.

JG

Jonathan replied

4 weeks ago on January 24, 2025 at 11:19 am

After some tests, I notice that the errors occur only when I select _SKU. Maybe it could come from there, otherwise when I choose to select SKUs manually, here is what I have, can you help me. Thank you

J

James replied Support Agent

4 weeks ago on January 24, 2025 at 11:29 am

Does your products have an sku set? , those permission errors suggest that an existing product cant be found using your unique identifier

JG

Jonathan replied

3 weeks ago on February 3, 2025 at 6:16 pm

Yes but it didn't work. 

Please can you help me ? 

J

James replied Support Agent

3 weeks ago on February 3, 2025 at 6:42 pm

The importer cant find products matching your sku's, which is why it is trying to create those product instead (but it is not allowed to due to not having the create permission enabled).

For me to help, are you able to share a temporary login to access the site to see what is going on?

JG

Jonathan replied privately

3 weeks ago on February 4, 2025 at 9:10 am

J

James replied Support Agent

3 weeks ago on February 4, 2025 at 9:18 am

Whats the login url?

JG

Jonathan replied privately

3 weeks ago on February 4, 2025 at 9:30 am

J

James replied privately Support Agent

3 weeks ago on February 4, 2025 at 12:10 pm

JG

Jonathan replied privately

3 weeks ago on February 4, 2025 at 2:58 pm

J

James replied privately Support Agent

3 weeks ago on February 4, 2025 at 3:23 pm

JG

Jonathan replied privately

3 weeks ago on February 4, 2025 at 3:31 pm

J

James replied privately Support Agent

3 weeks ago on February 4, 2025 at 3:36 pm

J

James replied Support Agent

3 weeks ago on February 4, 2025 at 3:44 pm

With the update sorted, now for the creation of new products.

The main issue with the old importer was that the product name, and product parent name were using the same column in the csv field "{2}", how should a parent product be found in the csv file?

JG

Jonathan replied

2 weeks ago on February 6, 2025 at 3:41 pm

I found a solution. 

That worked, thank you. 

You can close the ticket.