Как исправить ошибку при импорте

Главные вкладки

Аватар пользователя Marfey Marfey 23 марта 2017 в 12:53

SQLSTATE[HY000]: General error: 1366 Incorrect decimal value: '' for column 'sell_price' at row 1

Перерыл все что мог но решения так и не нашел. Импортер сделал такой:

$feeds_importer = new stdClass();
$feeds_importer->disabled = FALSE; /* Edit this to true to make a default feeds_importer disabled initially */
$feeds_importer->api_version = 1;
$feeds_importer->id = 'uc_feeds_videocamera_importer';
$feeds_importer->config = array(
'name' => 'Імпорт камер відеонагляду',
'description' => 'Import Ubercart products from csv. Attempts to create all fields (including attributes) automatically.',
'fetcher' => array(
'plugin_key' => 'FeedsFileFetcher',
'config' => array(
'allowed_extensions' => 'txt csv tsv xml opml',
'direct' => 0,
'directory' => 'public://feeds',
'allowed_schemes' => array(
'public' => 'public',
),
),
),
'parser' => array(
'plugin_key' => 'FeedsCSVParser',
'config' => array(
'delimiter' => 'TAB',
'no_headers' => 0,
),
),
'processor' => array(
'plugin_key' => 'FeedsNodeProcessor',
'config' => array(
'expire' => '-1',
'author' => '1',
'mappings' => array(
0 => array(
'source' => 'ID.товару',
'target' => 'guid',
'unique' => 1,
),
1 => array(
'source' => 'Назва товару',
'target' => 'title',
'unique' => FALSE,
),
2 => array(
'source' => 'Опис',
'target' => 'body',
'unique' => FALSE,
),
3 => array(
'source' => 'Изображение',
'target' => 'uc_product_image',
'unique' => FALSE,
),
4 => array(
'source' => 'Розділ',
'target' => 'taxonomy_catalog',
'term_search' => '2',
'autocreate' => 0,
),
5 => array(
'source' => 'Наявність',
'target' => 'field_pcount',
'unique' => FALSE,
),
6 => array(
'source' => 'Виробник',
'target' => 'field_product_vendor',
'unique' => FALSE,
),
7 => array(
'source' => 'Артикул',
'target' => 'model',
'unique' => FALSE,
),
8 => array(
'source' => 'Ціна',
'target' => 'sell_price',
'unique' => FALSE,
),
9 => array(
'source' => 'Тип встановлення',
'target' => 'field_tip_vstanovlenya',
'unique' => FALSE,
),
10 => array(
'source' => 'Форм-фактор',
'target' => 'field_form_ractor',
'unique' => FALSE,
),
11 => array(
'source' => 'Розширення',
'target' => 'field_rozshirenya',
'unique' => FALSE,
),
12 => array(
'source' => 'Фокусна відстань',
'target' => 'field_focus_weight',
'unique' => FALSE,
),
13 => array(
'source' => 'ІЧ-підсвітка',
'target' => 'field_ich',
'unique' => FALSE,
),
),
'update_existing' => '2',
'input_format' => 'full_html',
'authorize' => 1,
'skip_hash_check' => 0,
'bundle' => 'product',
),
),
'content_type' => '',
'update' => 0,
'import_period' => '-1',
'expire_period' => 3600,
'import_on_create' => 1,
'process_in_background' => 0,
);
Уже все перепробывал.

Комментарии

Аватар пользователя Marfey Marfey 13 мая 2017 в 11:39

Чото наковырял и стало так
SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect decimal value: '' for column 'sell_price' at row 1
Подскажите что к чему. Как исправить?

Аватар пользователя BatKor BatKor 13 мая 2017 в 12:20

Это csv? Скорее всего ошибка в разделителях и знаке дробной части. Как вариант. Заверни пожалуйста в теги код.