
內容簡介
該 WordPress 外掛可匯入符合範本的 CSV 文件的所有行作為 Woocommerce 產品。由 Simplistics Web Design 建立。
操作方式
在 WordPress 管理員選單中,導覽至「產品匯入工具」鏈結。
點擊「選擇檔案」上傳所需產品文件(只支援 .csv 文件類型。有關 .csv 格式的詳細資訊,請參閱下方的「CSV 範本格式」)。
點擊「提交」以執行匯入。請等待匯入完成時顯示的載入畫面。
匯入工具將顯示成功匯入的記錄數。您可以在「產品」選項卡中查看這些記錄。
必要外掛
必須下載 [Woocommerce] 外掛,才能使用此外掛。請至此下載(https://en-ca.wordpress.org/plugins/woocommerce/)
CSV 範本格式
該外掛附帶了一個名為「products_template.csv」的範本檔案,用於格式化您要上傳的產品。該 CSV 中的列需要以下數據:
A:用於您的產品的唯一參考 ID。這必須是一個整數 - 它用於將您的產品連結到正確的文章 ID。
B:此產品的類別。它應該格式化為以下方式:
每個類別名稱之間必須以「|」分隔。
如果字串如此編寫,則不需要存在這些類別,並且如果是這樣,則會為您創建這些類別。該外掛目前不支援階層式類別,您將需要自行從 Woocommerce 管理面板分配父類別。或者,事先創建類別,並且只引用子類別,即可將您的產品連結到正確的類別。
C:產品重量(作為數字)
D:產品名稱。產品名稱用於確定可變產品 - 因此,任何要變化的產品都應具有相同的產品名稱作為其父產品。其名稱的第一個產品將創建父產品以及具有所需屬性的變型 - 不需要指定父行。
E:產品 SKU
F:產品描述
G:產品圖片。如果這些圖片已經存在於資料庫中,將會搜尋圖片並將其附加到產品。多張圖片應以「|」分隔,這些字串中的第一張圖片為產品縮略圖。其他圖片將添加到產品的畫廊中。圖片可能包含或不包含檔案擴展名。
H:庫存。請注意,如果您不希望以這種方式更新產品庫存,則可以在外掛程式的選項頁面中取消選擇「更新庫存」選項。
I:產品常規價格
J:如適用,產品特價價格
K-之後:來自 K 之後的所有列都將被解析為產品屬性。如果這些屬性尚不存在,則將創建列名作為新屬性。如果產品不使用該屬性,只需將該字段留空。可變產品的屬性將自動設置為「用於變形」
將自訂元素添加到您的產品中
可能需要出於某種原因將額外資訊添加到產品中。如果需要此操作,您可以在產品屬性後留空列,然後添加任何自訂元素值。所有自訂元素列的標題都會轉換為 meta_key,並存儲在與產品或變型相關聯的 postmeta 表格中。
自定義鉤子
動作 'wpci_importer_finished' - 此鉤子會在匯入完成後立即觸發,並且在頁面重新導向之前觸發。
外掛標籤
開發者團隊
② 後台搜尋「Products CSV Importer for Woocommerce」→ 直接安裝(推薦)
原文外掛簡介
Given a CSV document of the proper template, imports all rows as Woocommerce products. Created by Simplistics Web Design.
Operation
Navigate to the ‘Products Importer’ Link in the wordpress administrator menu.
Click ‘choose file’ to upload the desired products document (only .csv file type is supported. For details on .csv formatting see ‘csv template format’ below)
Click ‘submit’ to run the import. The loading screen will appear, please wait while the import finished.
The importer will display the number of records successfully imported. You can view these in the ‘Products’ tab.
Required Plugins
[Woocommerce] is required to use this plugin, downloadable here (https://en-ca.wordpress.org/plugins/woocommerce/)
CSV Template Format
Included with this plugin is a template file entitled ‘products_template.csv’ to be used to format your products for upload. The Columns in that CSV expect the following data:
A: A unique reference ID used for your products. This must be an integer – it is used to link your products to the proper post ID.
B: Categories for this product. This should be formatted as follows:
Each Category Name must be separated with a ‘|’
The Categories need not exist and will be created for you if the string is written in this way. This plugin does not currently support heirarchical categories – you will have to assign categories to parents from the Woocommerce admin panel yourself. Alternatively, creating the categories ahead of time and only referencing the child category will link your product to the correct category.
C: Product Weight (as a number)
D: Product Name. The product’s name is used to determine variable products – so any product you wish to be a variation should have the same product name as its parent. The first product of its name will create the parent product as well as a variation with the given attributes – indicating a parent row is not necessary.
E: Product SKU
F: Product Description
G: Product Images. Images will be searched for in the database and attached to the product if they already exist. Multiple images should be separated by a ‘|’, the first image in the string being the product thumbnail. The other images will be added to the product’s gallery. Images may include or disclude the file extension.
H: Inventory. Please note that if you don’t wish to update the product inventory in this way, you can deselect the ‘update stock’ option in the plugin’s options page.
I: Product Regular Price
J: Product Sale Price, if applicable
K-onwards: All columns from K onwards are parsed as product attributes. The column names will be created as new attributes if they do not already exist. If a product does not use that attribute, simply leave the field blank. Attributes of a Variable Product will automatically be set to ‘use for variation’
Adding Custom Meta To Your Products
It may be necessary to add extra information to your product for some reason. If you require this, you can do so by leaving an empty column after your product attributes, followed by any custom meta values you require. The titles of any custom meta columns will be translated into a meta_key and stored in the postmeta table associated with the product or variation.
Customization Hooks
action ’wpci_importer_finished’ – This hook fires immediately after the import finishes, and before the page is redirected.
