Class Mage_ImportExport_Model_Import_Entity_Product
Import entity product model
- Mage_ImportExport_Model_Import_Entity_Abstract
- Mage_ImportExport_Model_Import_Entity_Product
Category: Mage
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Author: Magento Core Team <core@magentocommerce.com>
Located at code/core/Mage/ImportExport/Model/Import/Entity/Product.php
public
|
|
protected
|
|
protected
boolean
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
boolean
|
|
protected
boolean
|
|
protected
array
|
#
_prepareRowForDb( array $rowData )
Set valid attribute set and product type to rows with all scopes to ensure that existing products doesn't changed. |
protected
boolean
|
|
protected
boolean
|
|
protected
boolean
|
|
protected
|
|
protected
|
#
_saveLinks( )
Gather and save information about product links. Must be called after ALL products saving done. |
protected
|
|
protected
|
|
protected
|
#
_saveProductEntity( array $entityRowsIn, array $entityRowsUp )
Update and insert data in entity table. |
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
string
|
#
_uploadMediaFiles( string $fileName )
Uploading files into the "catalog/product" media folder. Return a new file name if the same file is already exists. |
protected
|
|
protected
|
|
protected
|
|
public
array
|
|
public
Varien_Db_Adapter_Pdo_Mysql
|
|
public
string
|
|
public
array
|
|
public
array|null
|
|
public
array
|
|
public
integer
|
|
public
array
|
|
public
boolean
|
|
public
array
|
string |
CONFIG_KEY_PRODUCT_TYPES
|
'global/importexport/import_product_types' |
|
integer |
BUNCH_SIZE
|
20 |
#
Size of bunch - part of products to save in one step. |
string |
VALUE_ALL
|
'all' |
#
Value that means all entities (e.g. websites, groups etc.) |
integer |
SCOPE_DEFAULT
|
1 |
#
Data row scopes. |
integer |
SCOPE_WEBSITE
|
2 |
|
integer |
SCOPE_STORE
|
0 |
|
integer |
SCOPE_NULL
|
-1 |
|
string |
COL_STORE
|
'_store' |
#
Permanent column names. |
string |
COL_ATTR_SET
|
'_attribute_set' |
|
string |
COL_TYPE
|
'_type' |
|
string |
COL_CATEGORY
|
'_category' |
|
string |
COL_ROOT_CATEGORY
|
'_root_category' |
|
string |
COL_SKU
|
'sku' |
|
string |
ERROR_INVALID_SCOPE
|
'invalidScope' |
#
Error codes. |
string |
ERROR_INVALID_WEBSITE
|
'invalidWebsite' |
|
string |
ERROR_INVALID_STORE
|
'invalidStore' |
|
string |
ERROR_INVALID_ATTR_SET
|
'invalidAttrSet' |
|
string |
ERROR_INVALID_TYPE
|
'invalidType' |
|
string |
ERROR_INVALID_CATEGORY
|
'invalidCategory' |
|
string |
ERROR_VALUE_IS_REQUIRED
|
'isRequired' |
|
string |
ERROR_TYPE_CHANGED
|
'typeChanged' |
|
string |
ERROR_SKU_IS_EMPTY
|
'skuEmpty' |
|
string |
ERROR_NO_DEFAULT_ROW
|
'noDefaultRow' |
|
string |
ERROR_CHANGE_TYPE
|
'changeProductType' |
|
string |
ERROR_DUPLICATE_SCOPE
|
'duplicateScope' |
|
string |
ERROR_DUPLICATE_SKU
|
'duplicateSKU' |
|
string |
ERROR_CHANGE_ATTR_SET
|
'changeAttrSet' |
|
string |
ERROR_TYPE_UNSUPPORTED
|
'productTypeUnsupported' |
|
string |
ERROR_ROW_IS_ORPHAN
|
'rowIsOrphan' |
|
string |
ERROR_INVALID_TIER_PRICE_QTY
|
'invalidTierPriceOrQty' |
|
string |
ERROR_INVALID_TIER_PRICE_SITE
|
'tierPriceWebsiteInvalid' |
|
string |
ERROR_INVALID_TIER_PRICE_GROUP
|
'tierPriceGroupInvalid' |
|
string |
ERROR_TIER_DATA_INCOMPLETE
|
'tierPriceDataIsIncomplete' |
|
string |
ERROR_INVALID_GROUP_PRICE_SITE
|
'groupPriceWebsiteInvalid' |
|
string |
ERROR_INVALID_GROUP_PRICE_GROUP
|
'groupPriceGroupInvalid' |
|
string |
ERROR_GROUP_PRICE_DATA_INCOMPLETE
|
'groupPriceDataIsIncomplete' |
|
string |
ERROR_SKU_NOT_FOUND_FOR_DELETE
|
'skuNotFoundToDelete' |
|
string |
ERROR_SUPER_PRODUCTS_SKU_NOT_FOUND
|
'superProductsSkuNotFound' |
DB_MAX_PACKET_COEFFICIENT,
DB_MAX_PACKET_DATA,
DB_MAX_TEXT_LENGTH,
DB_MAX_VARCHAR_LENGTH
|
protected
array
|
$_attrSetIdToName | array() |
#
Pairs of attribute set ID-to-name. |
protected
array
|
$_attrSetNameToId | array() |
#
Pairs of attribute set name-to-ID. |
protected
array
|
$_categories | array() |
#
Categories text-path to ID hash. |
protected
array
|
$_categoriesWithRoots | array() |
#
Categories text-path to ID hash with roots checking. |
protected
array
|
$_customerGroups | array() |
#
Customer groups ID-to-name. |
protected
array
|
$_indexValueAttributes | array(
'status',
'tax_class_id',
'visibility',
'enable_googlecheckout',
'gift_message_available',
'custom_design'
) |
#
Attributes with index (not label) value. |
protected
array
|
$_linkNameToId | array(
'_links_related_' => Mage_Catalog_Model_Product_Link::LINK_TYPE_RELATED,
'_links_crosssell_' => Mage_Catalog_Model_Product_Link::LINK_TYPE_CROSSSELL,
'_links_upsell_' => Mage_Catalog_Model_Product_Link::LINK_TYPE_UPSELL
) |
#
Links attribute name-to-link type ID. |
protected
array
|
$_messageTemplates | array(
self::ERROR_INVALID_SCOPE => 'Invalid value in Scope column',
self::ERROR_INVALID_WEBSITE => 'Invalid value in Website column (website does not exists?)',
self::ERROR_INVALID_STORE => 'Invalid value in Store column (store does not exists?)',
self::ERROR_INVALID_ATTR_SET => 'Invalid value for Attribute Set column (set does not exists?)',
self::ERROR_INVALID_TYPE => 'Product Type is invalid or not supported',
self::ERROR_INVALID_CATEGORY => 'Category does not exists',
self::ERROR_VALUE_IS_REQUIRED => "Required attribute '%s' has an empty value",
self::ERROR_TYPE_CHANGED => 'Trying to change type of existing products',
self::ERROR_SKU_IS_EMPTY => 'SKU is empty',
self::ERROR_NO_DEFAULT_ROW => 'Default values row does not exists',
self::ERROR_CHANGE_TYPE => 'Product type change is not allowed',
self::ERROR_DUPLICATE_SCOPE => 'Duplicate scope',
self::ERROR_DUPLICATE_SKU => 'Duplicate SKU',
self::ERROR_CHANGE_ATTR_SET => 'Product attribute set change is not allowed',
self::ERROR_TYPE_UNSUPPORTED => 'Product type is not supported',
self::ERROR_ROW_IS_ORPHAN => 'Orphan rows that will be skipped due default row errors',
self::ERROR_INVALID_TIER_PRICE_QTY => 'Tier Price data price or quantity value is invalid',
self::ERROR_INVALID_TIER_PRICE_SITE => 'Tier Price data website is invalid',
self::ERROR_INVALID_TIER_PRICE_GROUP => 'Tier Price customer group ID is invalid',
self::ERROR_TIER_DATA_INCOMPLETE => 'Tier Price data is incomplete',
self::ERROR_SKU_NOT_FOUND_FOR_DELETE => 'Product with specified SKU not found',
self::ERROR_SUPER_PRODUCTS_SKU_NOT_FOUND => 'Product with specified super products SKU not found'
) |
#
Validation failure message template definitions |
protected
array
|
$_newSku | array() |
#
Dry-runned products information from import file. |
protected
array
|
$_oldSku | array() |
#
Existing products SKU-related information in form of array: |
protected
array
|
$_particularAttributes | array(
'_store', '_attribute_set', '_type', self::COL_CATEGORY, self::COL_ROOT_CATEGORY, '_product_websites',
'_tier_price_website', '_tier_price_customer_group', '_tier_price_qty', '_tier_price_price',
'_links_related_sku', '_group_price_website', '_group_price_customer_group', '_group_price_price',
'_links_related_position', '_links_crosssell_sku', '_links_crosssell_position', '_links_upsell_sku',
'_links_upsell_position', '_custom_option_store', '_custom_option_type', '_custom_option_title',
'_custom_option_is_required', '_custom_option_price', '_custom_option_sku', '_custom_option_max_characters',
'_custom_option_sort_order', '_custom_option_file_extension', '_custom_option_image_size_x',
'_custom_option_image_size_y', '_custom_option_row_title', '_custom_option_row_price',
'_custom_option_row_sku', '_custom_option_row_sort', '_media_attribute_id', '_media_image', '_media_lable',
'_media_position', '_media_is_disabled'
) |
#
Column names that holds values with particular meaning. |
protected
array
|
$_imagesArrayKeys | array(
'_media_image', 'image', 'small_image', 'thumbnail'
) |
#
Column names that holds images files names |
protected
array
|
$_permanentAttributes | array(self::COL_SKU) |
#
Permanent entity columns. |
protected
array
|
$_productTypeModels | array() |
#
Array of supported product types as keys with appropriate model object as value. |
protected
array
|
$_storeCodeToId | array() |
#
All stores code-ID pairs. |
protected
array
|
$_storeIdToWebsiteStoreIds | array() |
#
Store ID to its website stores IDs. |
protected
array
|
$_websiteCodeToId | array() |
#
Website code-to-ID |
protected
array
|
$_websiteCodeToStoreIds | array() |
#
Website code to store code-to-ID pairs which it consists. |
protected
|
$_fileUploader |
|
#
Media files uploader |