Magento-import product from CSV

Working with Product CSV Files

A comma-separated value file is a text data file with each field separated by a comma.  Magento Go uses the CSV file format to import and export product and customer information.  The basic steps include:

  • Step 1: Optimize Your Attributes
  • Step 2: Export and Edit
  • Step 3: Import and Refresh Index

Step 1: Optimize Your Attributes

To optimize the selection of attributes, include only those which contain data that you need to import or export.

System Attributes

System attributes are product attributes that are required by Magento Go for functionality and product management. These attributes cannot be deleted. They include the following:

General Attributes

Attribute Code Description Value Required
name The name of the product. This name is visible on your product description page as well as anywhere this product is listed. It is used by customers to identify the product. text Yes
description Description of the product. This is an important field, especially as a selling tool, because it is the main way customers learn about the product. String Yes
short_description A shorter description of the product that customers will immediately see when viewing the product description page. text Yes
sku The Stock-Keeping Unit. This is the unique alphanumeric identifier that you use to track this product and its quantity in your inventory system.

Note: SKU supports up to 64 alphanumeric characters. Import will fail if it encounters SKU values that are more than 64 characters.

Alphanumeric (A-Z,0-9) Yes
_type Specifies the type of product. This field indicates whether this product is a simple or complex product—complex products being those that require additional configuration. Product types include: 

  • simple - Physical items that are generally sold as single units or in fixed quantities.
  • grouped - A set of products that are related in some way that can logically be sold as a set.
  • configurable - A product with variations that the customer has the option to select.
  • virtual - A non-physical product that does not require shipping or inventory.
  • bundle - A product set composed of simple products sold together.
  • giftcard - Gift cards are products that are redeemable in your store for products—can be virtual, physical, or both.
simple
grouped
configurable
virtual
bundle
giftcard
Yes
weight The product weight in determined by the shipping provider selected. Numeric value Yes
news_from_date This field specifies the “from” date that the product is considered new, and would be featured in your “new products” listings. Date and Time No
news_to_date This field specifies the “to” date that the product is considered new, and would be featured in your “new products” listings. Date and Time No
_product_websites Refers to the Main Website in the Manage Stores section. base Yes
status If set to “enabled (1),” the product will be available for sale in your store. If set to “disabled (2),” the product will not appear in your catalog. 1, 2 Yes
url_key The URL key (or the product identifying portion) of the product’s web address. For example, if the URL key is “my-sample-product,“ then the address might be: “example.gostorego.com/category/my-sample-product.html” text No
visibility Specify whether this product is visible from the catalog, search, both, or neither. 1 = Not visible individually
2 = Catalog
3 = Search
4 = Catalog, Search
Yes
gift_message_available This field specifies if a message can be included with this product purchase. If left blank, will use the default configuration. Options include 0=Yes / 1=No. (See: System > Configuration > Sales > Gift Option ) Yes/No
(0,1)
[blank]= (uses default)
No
is_imported Determines if this product can be included in RSS feeds. Options include 0=Yes / 1=No. Yes/No
(0,1)
No

Price Attributes

Attribute Code Description Value Required
price The price that the product is offered for sale. Numeric value Yes
special_price The special sale price for the product during the special sale period. Numeric value No
special_from_date Specifies the beginning date that the product is available at the special sale price. The date can be entered in either a 12- or 24-hour format, and can optionally include the time. 
Click the calendar button to select the date, or enter the date and time using one of the available formats.
Date and Time formats:
MM/DD/YYYY
hour:minute:seconds 
AM or PM 

Examples:
8/21/2012 12:00:00 AM (midnight)
8/21/2012 24:00:00 (midnight)
8/21/2012 12:00:00 PM (noon)
No
special_to_date Specifies the ending date that the product is available at the special sale price. The date can be entered in either a 12- or 24-hour format, and can optionally include the time. 
Click the calendar button to select the date, or enter the date and time using one of the available formats.
Date and Time formats:
MM/DD/YYYY
hour:minute:seconds 
AM or PM 

Examples:
8/21/2012 12:00:00 AM (midnight)
8/21/2012 24:00:00 (midnight)
8/21/2012 12:00:00 PM (noon)
No
tax_class_id Specify the tax class ID, which will determine which tax rules to apply to the product. integer based on id # next to each product tax class. (Admin > Sales > Tax > Product Tax Class) Yes
enable_googlecheckout Determines whether the product can be purchased using Google Checkout. Options include 0=Yes / 1=No 0=Yes / 1=No
(0,1)
No

Meta Information Attributes

Attribute Code Description Value Required
meta_title The meta title of the product. This meta title is not visible on your web store, only to search engines. text No
meta_keyword The meta keywords of the product. These keywords are not visible on your web store, only to search engines. text No
meta_description The meta description of the product . This description is not visible on your web store, only to search engines. text No

Images Attributes

Attribute Code Description Value Required
image The URL (address) of the base image, or the main image of the product that is displayed when customer clicks the image in the description page. url No
thumbnail The URL (address) of the thumbnail image, or the product image that is shown in product listings. url No
small_image The URL (address) of the small image, or the image that will be displayed in the product description page. url No

Design Attributes

Attribute Code Description Value Required
custom_design If you want to use a custom design for the product description page, specify it in this field. No No
custom_design_from The date to begin using the custom design for the product description page. Date and Time No
custom_design_to The date to stop using the custom design for the product description page. Date and Time No
custom_layout_update Use custom XML to modify the product description page layout. XML No
page_layout Specify the layout of the product description page using a predefined layout. No layout updates
Empty
1 column
2 columns with left bar
2 columns with right bar
3 columns
No
options_container If this product has options, this field specifies whether these options will be displayed in the product information column or in the block below the price. Product Info Column, Block After Info Column No

Gift Card Specific Attributes

Attribute Code Description Value Required
allow_open_amount Specify whether the dollar vale of the gift card can be specified by the customer. text Yes
open_amount_min The minimum gift card amount if the gift card allows open amounts. Numeric value No
open_amount_max The maximum gift card amount if the gift card allows open amounts. Numeric value No

Preloaded Attributes

Preloaded attributes are product attributes that are not required by Magento Go, but are included by default. These attributes can be deleted. They include the following:

Attribute Code Description Value Required
color The color of the product. This is especially useful for identification and description when you have multiple colors of the same product. Text No
cost The cost of the product. For internal purposes only. Numeric value No
manufacturer The name of the manufacturer of the product. This field can be used by customers to narrow search results to specific manufacturers. Text No

Custom Attributes

Custom attributes are any attributes that you create yourself. Attributes can be created for organization and product management, as well as to be used for comparing certain types of products. For example, a store carrying electronics, including hard drives, would certainly want to create a disk space attribute that would be used to define and compare hard drive storage sizes.

To learn more about creating attributes, read Defining Attributes.

Step 2: Export and Edit

After you have optimized your attributes, export your product information. Directions for how to do this can be found by reading Exporting Product or Customer Information. Once exported, open this file in a Microsoft Excel or a simple text editor.

If you’re editing the in a text editor, you must include each new product on a new line. The attributes that you define must be separated with commas, and must be in the same order as the first row.

If you’re editing in Excel, each product will be on a new line. The attributes that you define will fall into the column of the attribute that is listed in the first row. When saving changes to the CSV file that you edit in Excel, it is absolutely critical that when Excel asks you what format you wish to save, select Yes to leave out incompatible features.

Step 3: Import and Refresh Index

Finally, after you have defined and saved your products in the CSV file, import them back into your Magento Go store. To learn how to do this step-by-step, read Importing Product or Customer Information.

After you have imported your new products, it will be queued to import. This may take a little while, so be patient. You can check the status of this by refreshing the page. Once the Import products task has finished, you must refresh the search index. To do this, go to Catalog > Search Indexing and clickRefresh Index.

Common Issues

  • Missing or Incorrect Values
    During the import process, Magento Go checks your data to ensure that it’s correct. It will report which rows and items are missing or incorrect. Be sure to fix any issues found, and try again.
  • Duplicate Products
    If you import a product that already exists in your catalog, it will create a duplicate product record. To avoid this, you can either import to an empty catalog, or make sure that you aren’t re-importing products which already exist in the catalog.

See also:

Exporting Product or Customer Information

Importing Product or Customer Information

From: http://go.magento.com/support/kb/entry/name/working-with-product-csv-files/


你可能感兴趣的:(magento)