Invalid or Duplicated SKU on importing Product csv
-
Hi
The Invalid or Duplicated SKU when Importing Product Updates via csv has been discussed. However, none of the solutions offered have worked so far as I have variable products also.On import:
- Disabling mapping for the field “ID” by setting it to “Do not import” doesn’t work.
- Enabling mapping as above, doesn’t work
- Deleting orphans doesn’t work
- 26 variations no longer display on import
- products display as out of Stock
- shop page no longer displays any products
Also:
- This topic was modified 3 years, 10 months ago by nillamary.
-
Staging site: Shop
Hi @nillamary!
This could be happening due to some orphaned variations. You can try the following steps to attempt to fix any orphaned variations:
From your dashboard go to “Woocommerce > Status > Tools” and click on Delete orphaned variations, to see if that helps.
Cheers!
Hi @rynald0s
Thanks for the advise but as mentioned above, I’ve already tried this fix and it doesn’t work, so not sure what else I can try?
Cheers ??
Hi @nillamary!
Are you using any translation plugins, such as WPML?
Could you please paste your sites’ status report back here so we can take a closer look at that? You’ll find that under “WooCommerce > Status” page.
Cheers!
Hi @rynald0s
I’m not using WPML or other translation plugins.No problem and thanks!
### WordPress Environment ### WordPress address (URL): https://test.nillasphotography.com Site address (URL): https://test.nillasphotography.com WC Version: 4.8.0 REST API Version: ? 4.8.0 WC Blocks Version: ? 3.8.1 Action Scheduler Version: ? 3.1.6 WC Admin Version: ? 1.8.2 Log Directory Writable: ? WP Version: 5.6 WP Multisite: – WP Memory Limit: 512 MB WP Debug Mode: – WP Cron: ? Language: en_GB External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.0.33 - We recommend using PHP version 7.2 or above for greater performance and security. How to update your PHP version PHP Post Max Size: 256 MB PHP Time Limit: 300 PHP Max Input Vars: 4000 cURL Version: 7.72.0 OpenSSL/1.1.1h SUHOSIN Installed: – MySQL Version: 5.5.5-10.2.36-MariaDB-log Max Upload Size: 256 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 4.8.0 WC Database Prefix: wp3wuf_ Total Database Size: 25.48MB Database Data Size: 23.67MB Database Index Size: 1.81MB wp3wuf_woocommerce_sessions: Data: 0.07MB + Index: 0.01MB + Engine MyISAM wp3wuf_woocommerce_api_keys: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp3wuf_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp3wuf_woocommerce_downloadable_product_permissions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_woocommerce_order_items: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_woocommerce_order_itemmeta: Data: 0.01MB + Index: 0.02MB + Engine MyISAM wp3wuf_woocommerce_tax_rates: Data: 0.10MB + Index: 0.09MB + Engine MyISAM wp3wuf_woocommerce_tax_rate_locations: Data: 0.07MB + Index: 0.09MB + Engine MyISAM wp3wuf_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp3wuf_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_woocommerce_payment_tokens: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_woocommerce_payment_tokenmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_woocommerce_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_actionscheduler_actions: Data: 0.01MB + Index: 0.02MB + Engine MyISAM wp3wuf_actionscheduler_claims: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_actionscheduler_groups: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp3wuf_actionscheduler_logs: Data: 0.01MB + Index: 0.01MB + Engine MyISAM wp3wuf_blogs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_blog_versions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_bwg_album: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_bwg_album_gallery: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_bwg_gallery: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_bwg_image: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_bwg_image_comment: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_bwg_image_rate: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_bwg_image_tag: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_bwg_shortcode: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_bwg_theme: Data: 0.04MB + Index: 0.00MB + Engine MyISAM wp3wuf_cf7dbplugin_st: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp3wuf_cf7dbplugin_submits: Data: 0.02MB + Index: 0.01MB + Engine MyISAM wp3wuf_commentmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_comments: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp3wuf_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_loginizer_logs: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp3wuf_ngg_album: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_ngg_gallery: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_ngg_pictures: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_options: Data: 2.11MB + Index: 0.09MB + Engine MyISAM wp3wuf_postmeta: Data: 14.79MB + Index: 0.65MB + Engine MyISAM wp3wuf_posts: Data: 6.02MB + Index: 0.18MB + Engine MyISAM wp3wuf_registration_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_revslider_css: Data: 0.09MB + Index: 0.00MB + Engine MyISAM wp3wuf_revslider_layer_animations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_revslider_navigations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_revslider_sliders: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_revslider_slides: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_revslider_static_slides: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_signups: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_site: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp3wuf_sitemeta: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp3wuf_termmeta: Data: 0.01MB + Index: 0.02MB + Engine MyISAM wp3wuf_terms: Data: 0.01MB + Index: 0.02MB + Engine MyISAM wp3wuf_term_relationships: Data: 0.16MB + Index: 0.34MB + Engine MyISAM wp3wuf_term_taxonomy: Data: 0.01MB + Index: 0.02MB + Engine MyISAM wp3wuf_usermeta: Data: 0.08MB + Index: 0.03MB + Engine MyISAM wp3wuf_users: Data: 0.01MB + Index: 0.01MB + Engine MyISAM wp3wuf_wc_admin_notes: Data: 0.01MB + Index: 0.00MB + Engine MyISAM wp3wuf_wc_admin_note_actions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_wc_category_lookup: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp3wuf_wc_customer_lookup: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp3wuf_wc_download_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_wc_order_coupon_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_wc_order_product_lookup: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp3wuf_wc_order_stats: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp3wuf_wc_order_tax_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_wc_product_meta_lookup: Data: 0.04MB + Index: 0.06MB + Engine MyISAM wp3wuf_wc_reserved_stock: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_wc_tax_rate_classes: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp3wuf_wc_webhooks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_wdslayer: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_wdsslide: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_wdsslider: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_wpeditor_settings: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp3wuf_wpmm_subscribers: Data: 0.00MB + Index: 0.00MB + Engine MyISAM ### Post Type Counts ### attachment: 650 customize_changeset: 3 ft_gallery: 1 nav_menu_item: 63 page: 21 portfolio: 37 post: 1 product: 12 product_variation: 302 revision: 875 rvm: 1 shop_order: 11 wpcf7_contact_form: 1 x-email-forms: 1 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (19) ### Akismet Anti-Spam: by Automattic – 4.1.7 Builder Image Pro: by Themify – 2.0.6 Contact Form DB: by Michael Simpson – 2.10.29 Contact Form 7: by Takayuki Miyoshi – 5.3.2 Feed Them Gallery Premium: by – 1.1.6 Feed Them Gallery: by SlickRemix – 1.3.6 Jetpack by WordPress.com: by Automattic – 9.2.1 Loginizer: by Softaculous – 1.6.5 Regenerate Thumbnails: by Alex Mills (Viper007Bond) – 3.1.4 RVM - Responsive Vector Maps: by Enrico Urbinati – 6.4.0 Tax Rate Upload: by Adam Bowen – 2.4.5 – Installed version not tested with active version of WooCommerce 4.0 Themify Portfolio Post: by Themify – 1.1.6 Themify Updater: by Themify – 1.2.9 WooCommerce Admin: by WooCommerce – 1.8.2 WooCommerce eWAY Payment Gateway: by WooCommerce – 3.1.25 WooCommerce PayPal Checkout Gateway: by WooCommerce – 2.1.1 WooCommerce Stripe Gateway: by WooCommerce – 4.7.0 WooCommerce Shipping & Tax: by Automattic – 1.25.4 WooCommerce: by Automattic – 4.8.0 ### Inactive Plugins (1) ### WP Maintenance Mode: by Designmodo – 2.3.0 ### Settings ### API Enabled: ? Force SSL: ? Currency: USD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – ### WC Pages ### Shop base: #11 - /shop/ Basket: #12 - /cart/ Checkout: #13 - /checkout/ My account: #14 - /my-account/ Terms and conditions: #13157 - /faq/ ### Theme ### Name: Themify Ultra Child Version: (update to version 0 is available) Author URL: Child Theme: ? Parent Theme Name: Themify Ultra Parent Theme Version: 5.1.6 Parent Theme Author URL: https://www.themify.me WooCommerce Support: ? ### Templates ### Overrides: themify-ultra/woocommerce/loop/loop-end.php themify-ultra/woocommerce/loop/loop-start.php ### Action Scheduler ### Complete: 32 Oldest: 2020-12-12 17:31:58 +1000 Newest: 2021-01-04 10:40:25 +1000
Hi there,
Going back to your initial post:
The Invalid or Duplicated SKU when Importing Product Updates via csv has been discussed. However, none of the solutions offered have worked so far as I have variable products also.
To clarify, have you made sure you have unique SKUs on each variation as well? If you don’t want to have unique SKUs for each variation, you can just set the SKU on the parent product and leave the variation SKUs blank — either way though, the SKUs will need to be unique (can’t have same SKU for each variation).
If you are still having trouble, please provide a copy of the CSV file you are using on the site so we can take a look (you can remove any sensitive information, but please leave the main things that we would need to investigate here like SKU, etc). You can upload it to your site’s media library and share the URL, or via a service like Dropbox or Google Drive.
Hi,
Thanks for the reply and help.I’ve tried both methods, unique SKUs in parent product for 26 variations, which when populated across 5 products, increments the “-1, -2, -3” at the end of the SKU. This is a problem with the print lab as the automated pwinty platform only recognises its own SKUs, not the incremented add-on number.
Also tried, no SKUs in parent product then manually entering SKUs into the 26 variations populated for one product (image) – these are pwinty’s SKUs. The 1st product is accepted correctly. However, even though the 2nd product (image) has a unique WC identifier, entering the same SKUs as the 1st product in the 2nd product doesn’t accept the SKUs and throws the “Invalid/Duplicated SKU) error.
I would have thought that WC uses its own unique IDs it populates within the database for each product and variation, and disregards the SKU field. Particularly, as SKUs are unique to each business, but this isn’t the case.
I’ve saved the .csv file in my media library: https://test.nillasphotography.com/wp-content/uploads/wc-product-export-14-1-2021-1610626019898.csvThe Model (parent) product contains my SKUs. The product “Forgotten Doorway” contains SKUs I’ve manually entered after the auto-population. Ideally, I need to use the same SKUs in “Forgotten Doorway” for all of my other products. I’ve only created 5 so far for this test.
Thanks again ??
@kellymetal please see previous entry ??
Hi there @nillamary,
Thank you for providing the link to your sample CSV, and the info about what you have tried so far.
I just did a test import with your CSV file on my personal site, and it went through without issue:
Link to image: https://d.pr/i/h7oz2aChecking the products, they appear to have imported correctly as Variable products with all their variations created:
Link to image: https://d.pr/i/NXUyeJIn the CSV, it appears the variations and products all have their own unique SKUs as required, so things are looking ok there.
As you mention, products do also have a unique identifier (the
ID
— products are stored in thewp_posts
table), however the SKUs are also required to be unique as well.If you completely delete all existing products and do a fresh import, do you see the same issue?
Also, if the issue seems to be related to how it’s importing SKUs from the “pwinty” platform, it might be worth reaching out to their team to ask about this.
Hi @kellymetal
Appreciate all your help with this!
If I have 5 products (images) and each product has 26 variations, do I need to use 130 unique SKUs? Or, can I use the same 26 variations’ SKUs, but for each 5 different products?
This will be a problem in the future as I’ll be loading around 60 countries with a maximum of 20 images each becoming products, then 26 variations for each product (31,200 variations).My problem is that I can only use the same print lab’s SKUs for the 26 variations each time to auto-fulfill an order for a product, otherwise, pwinty dosn’t recognise the SKU.
Pwinty/prodigi is not interfacing with woocommerce just yet (only shopify), so I’m working on new ground. ??
This is what I’ve tested:
- Deleted 5 products and variations.
- Auto-populated the 5 products with 26 variations for each product (no SKUs at this stage: https://snipboard.io/rT0Mya.jpg)
- Deleted WC transients, expired transients, orphaned variations
- Exported csv
- Added pwinty SKUS in csv file
- Imported .csv file
- Returns error please see screenshot: https://snipboard.io/WGHLsq.jpg
On viewing the import log, then the “Invalid or duplicated SKU.” error displays.
It’s the issue with pwinty SKUs i.e. 5 different products but with the same 26 SKUs for the 26 variations.
Also, I asked about the SKUs for the canvas products as each wrap uses the same attribute, so can’t be done through WC.I now have a functions.php file that integrates the canvas wraps and have tested an order. Waiting on Monday for pwinty to see whether a canvas product order is successful in the sandbox, from WC to pwinty.
Further to the above:
- Deleted all the products except for the Model product.
- Deleted WC transients, expired transients, orphaned variations
- Ran the importer
- Returned error “No matching product exists to update.” as expected: https://snipboard.io/opnHxI.jpg
The issue is that WC needs every product’s variant SKU to be unique, regardless whether each product has has a unique ID assigned by WC.
I don’t know how to get around this issue as I have to use the same pwinty SKUs for each variant.Not sure why your import worked and mine keeps returning errors.
When you imported the .csv, what did you select for the import?
Once imported, did you check the SKUs for variants? If so, did SKUs contain increments “-1,-2,-3”?- This reply was modified 3 years, 10 months ago by nillamary.
This has been resolved by adding one line of code in the functions.php file.
For anyone that’s interested, check this thread: https://www.ads-software.com/support/topic/woocommerce-increments-skus-api-issues/
Thank you so much for all the help @kellymetal @rynald0s ??
- The topic ‘Invalid or Duplicated SKU on importing Product csv’ is closed to new replies.