Class Shop_Item_Import_Csv_Controller
Import Csv Controller
Доступные методы:
- encoding('UTF-8') кодировка импорта
- file('my.csv') имя импортируемого CSV-файла, который ранее был загружен во временную директорию
- seek($int) позиция в файле импорта
- time(20) ограничение времени импорта за шаг, из конфигурационного файла, по умолчанию 20
- step(100) ограничение количества импортируемых за шаг, из конфигурационного файла, по умолчанию 100
- entriesLimit(500) ограничение количества проводок в документе, из конфигурационного файла, по умолчанию 5000
- separator($str) разделитель столбцов в CSV-файле, по умолчанию ';'
- limiter() ограничитель строки в CSV-файле, по умолчанию '"'
- firstlineheader(TRUE|FALSE) первая строка - название полей
- csv_fields(array) массив соответствий полей CSV сущностям системы HostCMS
- imagesPath($str) путь к импортируемым картинкам, конкатенируется с переденными в файле
- importAction($int) действие с существующими товарами: 1 - обновить существующие товары, 2 - не обновлять существующие товары, 3 - удалить содержимое магазина до импорта. По умолчанию 1
- searchIndexation(TRUE|FALSE) индексировать импортируемые данные, по умолчанию FALSE
- deletePropertyValues(TRUE|FALSE|array()) удалять существующие значения дополнительных свойств перед импортом новых, по умолчанию TRUE
- deleteUnsentModificationsByProperties(TRUE|FALSE) удалять непереданные модификации, созданные по дополнительным свойствам, по умолчанию FALSE
- deleteImage(TRUE|FALSE) удалять основные изображения
- Core_Servant_Properties
-
Shop_Item_Import_Csv_Controller
Copyright: © 2005-2021 ООО "Хостмэйк" (Hostmake LLC), http://www.hostcms.ru
Author: Hostmake LLC
Version: 6.x
Located at shop/item/import/csv/controller.php
Methods summary
public
integer
|
|
public
integer
|
|
public
integer
|
|
public
integer
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
protected
|
|
public
|
|
public
|
|
protected
Shop_Group
|
|
protected
|
|
public
string
|
|
public
boolean
|
|
public
|
|
protected
|
#
_allowPropertyForGroup(
Allow Property For Group |
protected
|
|
protected
|
|
protected
|
#
_addItemPropertyValue(
Add property to item |
protected
|
#
_addGroupPropertyValue(
Add property to group |
protected
array
|
|
public
string
|
|
public
array
|
|
public
|
|
public
array
|
|
public
|
#
__wakeup( )
Reestablish any database connections that may have been lost during serialization and perform other reinitialization tasks |
public
|
|
protected
|
|
protected
|
|
public
|
|
public
|
|
public static
array
|
#
CorrectToEncoding( array $sLine, string $encodeTo, string $encodeFrom = 'UTF-8' )
Correct CSV-line encoding |
Methods inherited from Core_Servant_Properties
__call()
,
__get()
,
__isset()
,
__set()
,
addAllowedProperties()
,
addAllowedProperty()
,
set()
,
setUnlimitedProperties()
Properties summary
protected
array
|
$_aInsertedGroupIDs
Array of inserted groups |
#
array()
|
protected
array
|
$_aClearedItemsPropertyValues
Array of ID's and GUIDs of cleared item's properties |
#
array()
|
protected
array
|
$_aClearedGroupsPropertyValues
Array of ID's and GUIDs of cleared groups's properties |
#
array()
|
protected
array
|
$_aUpdatedGroupIDs
Array of updated groups |
#
array()
|
protected
array
|
$_aInsertedItemIDs
Array of inserted items |
#
array()
|
protected
array
|
$_aUpdatedItemIDs
Array of updated items |
#
array()
|
protected
integer
|
$_iCurrentShopId
ID of current shop |
#
0
|
protected
integer
|
$_iCurrentGroupId
ID of current group |
#
0
|
protected
|
$_oCurrentShop
Current shop |
|
protected
|
$_oCurrentGroup
Current group |
|
protected
|
$_oCurrentItem
Current item |
|
protected
|
$_oCurrentOrder
Current order |
|
protected
|
$_oCurrentOrderItem
Current order item |
|
protected
string
|
$_sCurrentTags
Current tags |
|
protected
string
|
$_sAssociatedItemMark
Mark of associated item Артикул родительского товара - признак того, что данный товар сопутствует товару с данным артикулом |
|
protected
|
$_oCurrentShopEItem
Current digital item Текущий электронный товар |
|
protected
|
$_oCurrentShopSpecialPrice
Current special price Текущая специальная цена для товара |
|
protected
array
|
$_aExternalPrices
List of external prices Вспомогательные массивы данных |
#
array()
|
protected
array
|
$_aWarehouses
List of warehouses |
#
array()
|
protected
array
|
$_aExternalProperties
List of goods' external properties |
#
array()
|
protected
array
|
$_aExternalPropertiesSmall
List of small parts of external properties |
#
array()
|
protected
array
|
$_aExternalPropertiesDesc
List of descriptions of external properties |
#
array()
|
protected
array
|
$_aGroupExternalProperties
List of group's external properties |
#
array()
|
protected
array
|
$_aModificationsByProperties
List of modification by properties |
#
array()
|
protected
array
|
$_aAdditionalGroups
List of additional group |
#
array()
|
protected
array
|
$_aBarcodes
List of barcodes |
#
array()
|
protected
array
|
$_aSets
List of items GUID in the set |
#
array()
|
protected
array
|
$_aItemTabs
List of item's tabs |
#
array()
|
protected
null|string
|
$_jsonPath
Path to the temprorary json file |
#
NULL
|
protected
array
|
$_aPropertiesTree
|
#
array()
|
protected
array
|
$_aPropertyDirsTree
|
#
array()
|
protected
array
|
$_allowedProperties
Allowed object properties |
#
array(
'encoding',
'file',
'seek',
'time',
'step',
'entriesLimit',
'separator',
'limiter',
'firstlineheader',
'csv_fields',
'imagesPath',
'importAction',
'searchIndexation',
'deletePropertyValues',
'deleteUnsentModificationsByProperties',
'deleteImage'
)
|
protected
integer
|
$_InsertedItemsCount
Count of inserted items |
|
protected
integer
|
$_UpdatedItemsCount
Count of updated items |
|
protected
integer
|
$_InsertedGroupsCount
Count of inserted groups |
|
protected
integer
|
$_UpdatedGroupsCount
Count of updated groups |
|
protected
string
|
$_sBigImageFile
Path of the big image |
#
''
|
protected
string
|
$_sSmallImageFile
Path of the small image |
#
''
|
protected
array
|
$_aCreatedItemIDs
IDs of created shop_items |
#
array()
|
protected
array
|
$_aConfig
CSV config |
#
NULL
|
protected
|
$_aTags
Array of cached tags |
#
NULL
|
public
array
|
$aEntities
|
#
array()
|
protected
integer
|
$_posted
|
#
0
|
protected
array
|
$_aShop_Warehouse_Inventory_Ids
|
#
array()
|
protected
array
|
$_aShop_Warehouse_Inventory_Counts
|
#
array()
|
protected
array
|
$_aShop_Warehouse_Inventory_Previous_Ids
|
#
array()
|
protected
|
$_oShop_Price_Setting_Id
|
#
NULL
|
protected
|
$_oShop_Price_Setting_Count
|
#
NULL
|
protected
array
|
$_oShop_Price_Setting_Previous_Ids
|
#
array()
|