Update WooCommerce prices and stock from a supplier's price list
Drop the price list your supplier sent, say which columns hold the SKU, the price and the stock, and download a file that WooCommerce's own importer applies to the products with those SKUs. Free, with no sign-up. Your file stays on your computer.
Drop the supplier's price list
This tool needs JavaScript, which is switched off in this browser. It runs on this page only and sends nothing.
No price list at hand? See what the tool does with one:
The sample is made up: a supplier's list of 17 products under two title lines, with pound signs, a price of "POA", an empty stock cell and SKUs written a little differently from the shop's. The button fetches it from this site and reads it here, as it would read your own file.
Your shop's product export, for a safer file
With it, the file holds only products your shop has, each SKU written as your shop writes it, and only the values that change. A forgotten tick at the import then changes nothing. How to make the export.
Your file for WooCommerce's importer
Without your shop's export, the file holds every SKU of the list. Tick Update existing products when you import it. Without the tick, WooCommerce makes a new, published product of each SKU your shop doesn't have: in our test shop it made three, each named "Product". Add your export in the tool above, under your shop's product export, and the file holds only your shop's SKUs.
No row goes into the file with these choices, so there is no file to import.
Rows it could not use
These rows stay out of the file. Each says why. Fix them in the list and drop it again, or change those products by hand.
What goes into the file
Import the file into WooCommerce
- Back up your shop first. With your export dropped above, keep it: it is your record of the old prices and stock.
- Try one product first. Open the file in a plain text editor, not a spreadsheet, keep the first line and one product's line, and save it under a new name. Import that as the next steps say, and check that product. Then import the whole file.
- In your WordPress admin, go to Products → All Products and select Import at the top.
- Choose the file, whose name is
woocommerce-supplier-update.csv. Tick Update existing products: the box is empty at every import. Then select Continue. - On the Column mapping screen, each column of the file stands at the field of the same name:
SKUat SKU, and the others at Regular price, Sale price or Stock. Leave them so, and select Run the importer. Keep the page open until it has finished. - The screen must then say Import complete! and how many products updated. With your export dropped, that is the number of rows in the file. Without it, rows whose SKU your shop doesn't have are counted as skipped. If it says that a product was imported, the box was not ticked: see what to do then.
How it works: Drop the supplier's price list as it came, a CSV file or an Excel workbook. The tool finds the row with the column names and guesses which columns hold the SKU, the prices and the stock. Check its choices, set a markup and a rounding if the list holds your costs, and add your shop's product export for a safer file. Then check every row it could not use, and download a file that WooCommerce's own importer applies to the products with those SKUs.
Your file stays on your computer. This page reads it in your browser, with your shop's export if you add one, and makes the new file there. The file is not uploaded, stored or counted, and neither is the export: the page sends nothing of yours anywhere while you use it. Once the page has loaded, it works with your internet connection switched off. Only the sample buttons need the connection, to fetch their made-up files from this site.
How to export your products from WooCommerce
The export tells the tool which SKUs your shop has. It is the same file the shop makes for any export.
- In your WordPress admin, go to Products → All Products and select Export at the top.
- Leave Which columns should be exported? empty to export all columns. Or choose at least ID, Type, SKU, Name, Parent, Regular price, Sale price and Stock.
- Leave Which product types should be exported? empty, so that variations come too.
- Select Generate CSV. Your browser downloads a CSV file whose name starts with
wc-product-export-. Drop it in the tool above, under your shop's product export, once the price list is read.
What the tool does with each row
- Where the list starts
- The row with the column names is the one, among the first 30, whose names read most like a SKU, a price and a stock column. Lines above it are left out. Below it, blank rows are left out, and so is a row that repeats the column names. A row with one value alone, such as a range's heading, is listed as a heading. If the list has no column names at all, choose that under "Where the list starts": the columns are then named by their letters.
- SKUs
- The SKU ties a row of the list to a product of your shop, so it has to be the SKU your shop uses. Spaces around it are taken off, and a value a spreadsheet wrote as
="00123"is read as 00123. A SKU that a spreadsheet turned into a number such as1.23E+11has lost its digits: that row is listed and stays out. With your export, a SKU of the list that differs from your shop's only in letter case, in spaces, or in the zeros a spreadsheet took off its front, such as 457 for 00457, is matched to that product and written as your shop writes it, if no other product matches it too. Without your export the file holds each SKU as the list writes it. WooCommerce then finds a product whatever the letter case, and writes the list's way onto the product: in our test shop, ap-130-ch renamed AP-130-CH. - Prices
- Currency signs and codes, spaces and thousands marks are taken off:
£1,250.00,1.250,00 €andCHF 1'250.00are all 1250.00. Whether the list writes decimals with a point or a comma is found from all its prices, and the page says which cell showed it. Where the prices show none, the page names a cell of another column that shows one, but that settles nothing, since such a column may hold codes or dates, such as4711.10. A price that could be read both ways, such as1,250in a list whose prices show no other decimals, is listed, and choosing the list's way under "Match the columns" settles it. So is a price that the list's way would read with three decimals, such as1,299in a list that writes12,50, unless you chose the way yourself: prices in cents never have three. And where the way shows in one cell alone, every price such as1,250or1.250is listed, since that one cell may be a slip. A price that is not a number, such asPOA, or that is 0, is listed and stays out. The file writes every price with a point, such as12.50: WooCommerce's importer reads a point as the decimal mark in every shop, and our test run of decimal commas showed what a comma does in a shop set to a point: 21,99 became 2199. - Markup and rounding
- The markup is added to the regular and the sale price alike: 5.20 with a markup of 150% is 13.00. The rounding then goes up, to the next amount that ends in .99, .95 or a whole, so 13.00 becomes 13.99 with .99. A negative markup lowers the prices, and the rounding then goes down. Other prices with more than two decimals, such as
0.995, come out with two: the tool is made for currencies in cents. - Stock
- Stock must be a whole number of 0 or more. It is read by the list's way of writing decimals, as the prices are: in a list that writes
12,50,1.250is 1250 and12,000is 12; in a list that writes12.50,1,250is 1250 and12.000is 12. Where the prices show no way, or show it in one cell alone, such a stock is listed, and choosing the way settles it. With your export, a stock ten times your shop's or more is marked, and so is one of a tenth or less, other than 0. Text such asIn stockor100+is listed and stays out. A number in the file's Stock column also switches stock management on for that product, if it was off, and gives a variation a stock count of its own where it shared its product's. - Empty cells
- An empty cell is a value for WooCommerce's importer, so the tool treats each with care. An empty stock cell would switch stock management off for that product: the row stays out, unless you say under Stock that an empty cell means 0. An empty regular price would take the product's price away: that row stays out. An empty sale price ends the product's sale, if it has one: the page says how many sales would end, so you can leave the sale price column out if the list says nothing about sales.
- The same SKU twice
- Where two rows name the same product with the same values, the first goes into the file. With other values, both stay out and are listed: the importer would take the later row's values.
- Variable products
- A variable product's prices and stock are on its variations, each with a SKU of its own. With your export, a row with the variable product's own SKU is listed and stays out. Without it, the tool can't tell such a SKU from others. In our test the importer then counted that row as updated, set no price, and gave the product itself a stock count.
- What the file holds
- A column
SKU, and only the columns you matched:Regular price,Sale priceandStock. WooCommerce's importer matches these English names in every admin language, and changes only the columns the file has: names, descriptions, categories and everything else stay as they are. With your export, a row whose product has these values already stays out. We tried these files in the Import screen of WooCommerce 11.3.1 in a test shop: with the tick, every product of the file had the file's values and no other product changed; without the tick, a file made with the export changed nothing.
Questions
The import made new products called "Product"
The box Update existing products was not ticked, and the file held SKUs your shop doesn't have. Without the tick, WooCommerce skips each row whose SKU a product has, and makes a new, published product of each other row, with no name of its own. Go to Products → All Products, find the newest products named "Product", and move them to the Trash. Then import the file again with the box ticked. What to do when an import made products you didn't want has more.
The import says products were skipped
With the box ticked, a row is skipped when no product of the shop has its SKU: "No matching product exists to update". With your export dropped, the file holds no such rows. See what each message of the import log means and what to check when an import does not update products.
The import says "Invalid or duplicated SKU"
Two products of the shop share a SKU, or the file's SKU stands on another product. See "Invalid or duplicated SKU" after an import.
My supplier's codes are not my SKUs
Then the list needs a column with your SKU for each row before the tool can use it. A lookup in a spreadsheet adds it: our guide to supplier price lists shows how, with the other checks worth making before an import.
Can it read a PDF, or an old .xls file?
No. Open an .xls or .ods file in a spreadsheet and save it as .xlsx or as CSV UTF-8. A price list that came as a PDF has to be turned into a spreadsheet first: ask the supplier for one. For an Excel workbook with several sheets, the tool lets you choose the sheet.
Can I check the file before I import it?
Yes: our free CSV import checker reads it the way WooCommerce's importer does and says, row by row, what the importer would do.
See a bulk price change work first, with nothing to install. One button opens a throwaway WooCommerce shop in your own browser, on our free plugin's Change prices page: raise a category's prices by a percentage, see every new price, save, and undo. It opens in about 20 seconds. No sign-up, no keys.
It opens in a new tab on WordPress Playground, WordPress.org's sandbox.