avstudnitz / avs_fastsimpleimport Goto Github PK
View Code? Open in Web Editor NEWWrapper for Magento ImportExport functionality, which imports products and customers from arrays
Wrapper for Magento ImportExport functionality, which imports products and customers from arrays
I think currently it is not possible to specific the _root_category - as this can / should be contained in the _category field.
Not sure if that is an important fix - but it might be useful to improve compatibly when people migrate from standard-formated import files
The following query needs (or a variant hereof) needs to be ran:
DROP TABLE IF EXISTS `catalog_category_entity_tmp`;
CREATE TABLE catalog_category_entity_tmp LIKE catalog_category_entity;
INSERT INTO catalog_category_entity_tmp SELECT * FROM catalog_category_entity;
UPDATE catalog_category_entity cce
SET children_count =
(
SELECT count(cce2.entity_id) - 1 as children_county
FROM catalog_category_entity_tmp cce2
WHERE PATH LIKE CONCAT(cce.path,'%')
);
DROP TABLE catalog_category_entity_tmp;
Ich muss etliche tausend Produkte importieren, alles Simple Products zum Glück. Ich bin mit der Performance der Importers nicht zufrieden. Derzeit benötigen 1000 Produkte ca. 7-8 Sekunden.
Mein Skript lädt eine Datei mit ca. 30.000 Produkten und generiert das Array. Alle 1.000 Produkte starte ich einen Importvorgang. Dabei ist mir aufgefallen, dass der Speicherverbrauch im Laufe der Zeit immer weiter zunimmt. Besonders krass ist ein Sprung nach dem ersten Importvorgang:
Imported 1000 products in: 11.30s, mem: 334495720
Imported 2000 products in: 11.17s, mem: 398379776
Imported 3000 products in: 4.89s, mem: 399427656
Alle weiteren Durchläufe erhöhen den Speicherverbrauch nicht mehr so stark, aber dennoch messbar.
Wenn am Anfang eines Strings ein Umlaut bzw Sonderzeichen ist.
Wird dieses Zeichen nicht mit Importiert und "Überschutz" wird zu "berschutz".
Der Fehler kommt Original aus dem Core von PHP:
https://bugs.php.net/bug.php?id=31740
fputcsv wird hier gemacht:
Mage_ImportExport_Model_Export_Adapter_Csv::writeRow
bin gerade am Suchen nach einer Lösung, was gar nicht so einfach ist.
Hallo,
ich benutze FastSimpleImport für Produktimporte. Sowohl für neue Produkte, als auch Produktupdates. Diese werden pro Produktkategorie in einem Importvorgang vorgenommen. In Summe ist ein Import nicht mehr als 900 Produkte.
Lokal funktioniert alles bestens. Aber auf dem Liveserver scheint die Updatevariante nicht zu funktionieren. So werden zum Beispiel Produkte, die deaktiviert werden sollen, leider nicht deaktiviert. Der Import läuft aber durch und bricht nicht irgendwo ab, soweit ich das sehen kann.
Hab das auf dem gleichen Datenbankstand lokal und live getestet. Was könnte hier das Importmodul stören?
Ich verwende die aktuelle FastSimpleImport-Version.
Edit:
Es wird kein Behavior gesetzt. Sollte also mit default Replace arbeiten. Bzw mit Append der gleiche Effekt.
I'm trying to delete products during import. For this purpose I have an array that looks like this:
$data = array(
array('sku' => 'sku1234'),
array('sku' => 'sku2345'),
array('sku' => 'sku3456'),
array('sku' => 'sku4567'),
)
When I try to process this array in this way
$import = Mage::getSingleton('fastsimpleimport/import');
$import
->setContinueAfterErrors(true)
->setBehaviour(Mage_ImportExport_Model_Import::BEHAVIOR_DELETE)
->processProductImport($data);
I'm sometimes (not always) receiving the error Error in data structure: entity codes are mixed
. I tried to analyze this behavior and came across the file app/code/core/Mage/ImportExport/Model/Resource/Import/Data.php
and noticed, that the variable entityCodes
in line 114 was empty. I tried removing possible duplicates from the file, but this had no effect. Since I can't find any good example for this case (product deletion) I'll be thankful for any hints.
Hello, while using your module I have found the issue with the product category import, I changed the AvS/FastSimpleImport/Model/Import/Entity/Product.php to make it work:
protected function _initCategories()
{
$transportObject = new Varien_Object();
Mage::dispatchEvent( 'avs_fastsimpleimport_entity_product_init_categories', array('transport' => $transportObject) );
if ( $transportObject->getCategories() ) {
$this->_categories = $transportObject->getCategories();
} else {
$collection = Mage::getResourceModel('catalog/category_collection')->addNameToResult();
/* @var $collection Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection */
foreach ($collection as $category) {
$structure = explode('/', $category->getPath());
$pathSize = count($structure);
if ($pathSize > 2) {
$path = array();
$this->_categories[implode('/', $path)] = $category->getId();
for ($i = 1; $i < $pathSize; $i++) {
$path[] = $collection->getItemById($structure[$i])->getName();
}
// additional options for category referencing: name starting from base category, or category id
$this->_categories[implode('/', $path)] = $category->getId();
$rootCategoryName = array_shift($path);
if (!isset($this->_categoriesWithRoots[$rootCategoryName])) {
$this->_categoriesWithRoots[$rootCategoryName] = array();
}
$index = implode('/', $path);
$this->_categoriesWithRoots[$rootCategoryName][$index] = $category->getId();
$this->_categories[$index] = $category->getId();
$this->_categories[$category->getId()] = $category->getId();
}
}
}
return $this;
}
Array
(
[Invalid value for 'include_in_menu'. Possible options are: ja, nein] => Array
(
[0] => 1
[1] => 2
)
[Invalid value for 'is_active'. Possible options are: ja, nein] => Array
(
[0] => 1
[1] => 2
)
[Invalid value for 'is_anchor'. Possible options are: ja, nein] => Array
(
[0] => 1
[1] => 2
)
)
First line of my script is Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
Can i switch the API-Language to English? So i can use
$data[] = array(
'_root' => 'Default Category',
'_category' => $subpath,
'name' => $lastpiece,
'_store' => 'admin',
'is_anchor' => 'yes',
'available_sort_by' => 'position',
'default_sort_by' => 'position',
'use_config' => array(
'available_sort_by',
'default_sort_by', //not working too
'filter_price_range'
),
);
We should consider to auto fill the _media_attribute_id
'_media_attribute_id' => Mage::getSingleton('catalog/product')->getResource()->getAttribute('media_gallery')->getId(),
In addition we could auto-set image, small_image and thumbnail to the first image in the list, if nothing else is specified
when we start a import with ~1000 Products with an Value for the select attribute "size" and "XL" is not set, so the importer set XL for every product.
So have many select attribute value with the same value.
Hi Andreas,
thanik you for you work. Maybe you can add versioning to the project?
So try to use git Tags and change the number in config.xml.
Thx, millejano
Hello,
I want to import category using this module.
Its working fine now problem with when string contain quotes.
Example category name is : test's
if i have tried to add slash but not working.
Thanks,
Sunil
If i try to import Productdata with some decimal values there are sometime error:
Uncaught exception 'Mage_Core_Exception' with message 'Input Data contains 1 corrupt records (from a total of 1) :::: Invalid value for 'reifen_breite'. Possible options are: 10, 10.4, 10.5, 100, 1000, 105, 11, 11., 1100, 114, 21, 215, 225, 235, 245, 255, 275, 285, 295, 305, 32, 35, 85, 90 :::: In Line(s) 1
You can reproduce the problem if you fill an dropdown attribute with "10" and then try to auto-create "10.0".
In my opinion, this can be fixed by changing line 115 in AvS_FastSimpleImport_Model_Import_Entity_Product from
if (!in_array(trim($rowData[$attributeCode]), $options)) {
to
if (!in_array(trim($rowData[$attributeCode]), $options,true)) {
what do you think about it?
For a current project I need to import categories as wel as the descriptions (store view translations, etc.).
Is there a known Category adapter to import the categories with the Mage_ImportExport so it can be extended to work with the Avs import?
I wanted to use this module in Magento CE 1.5.0.1 and I had to make some changes to core classes and some default values within the module itself.
In AvS_FastSimpleImport_Model_Import_Entity_Product_Type_Bundle
I changed line 55 from:
$attribute = Mage::getResourceModel('catalog/eav_attribute')->load('price_type', 'attribute_code');
to:
$attribute = Mage::getModel('catalog/resource_eav_attribute')->load('price_type', 'attribute_code');
In Mage_ImportExport_Model_Import_Entity_Product
I added the method _getUploader()
from Magento CE 1.7.0.2 because it was missing:
protected function _getUploader()
{
if (is_null($this->_fileUploader)) {
$this->_fileUploader = new Mage_ImportExport_Model_Import_Uploader();
$this->_fileUploader->init();
$tmpDir = Mage::getConfig()->getOptions()->getMediaDir() . '/import';
$destDir = Mage::getConfig()->getOptions()->getMediaDir() . '/catalog/product';
if (!is_writable($destDir)) {
@mkdir($destDir, 0777, true);
}
if (!$this->_fileUploader->setTmpDir($tmpDir)) {
Mage::throwException("File directory '{$tmpDir}' is not readable.");
}
if (!$this->_fileUploader->setDestDir($destDir)) {
Mage::throwException("File directory '{$destDir}' is not writable.");
}
}
return $this->_fileUploader;
}
(Please note: I modified the core class directly. If I ever get around to do the update the method will be there anyway.)
In AvS_FastSimpleImport_Model_Import_Entity_Product
I deleted the values use_config_enable_qty_inc
and stock_status_changed_auto
:
$defaultStockData = array(
'manage_stock' => 1,
'use_config_manage_stock' => 1,
'qty' => 0,
'min_qty' => 0,
'use_config_min_qty' => 1,
'min_sale_qty' => 1,
'use_config_min_sale_qty' => 1,
'max_sale_qty' => 10000,
'use_config_max_sale_qty' => 1,
'is_qty_decimal' => 0,
'backorders' => 0,
'use_config_backorders' => 1,
'notify_stock_qty' => 1,
'use_config_notify_stock_qty' => 1,
'enable_qty_increments' => 0,
//~ 'use_config_enable_qty_inc' => 1,
'qty_increments' => 0,
'use_config_qty_increments' => 1,
'is_in_stock' => 0,
'low_stock_date' => null,
//~ 'stock_status_changed_auto' => 0,
);
With these values in place the importer throws an SQL error stating that these columns would not exist.
Finally I had to upload the file Mage_ImportExport_Model_Import_Uploader
to the respective core folder. To make it all work.
Maybe this helps somebody.
Update AvS_FastSimpleImport_Model_Import_Entity_Product::_initCategories with regard to Mage_ImportExport_Model_Import_Entity_Product::_initCategories. New class variable $_categoriesWithRoots.
Hello,
if an error occurs during the product import Magento throws a Mage_Core_Exception like:
Mage_Core_Exception Input Data contains 2 corrupt records (from a total of 20)
:::: Invalid value for 'meta_description' ::::
In Line(s) 18, 19
Have you found a good way to extract the lines to create a good debugging? For example to log the lines 18 and 19 of the input $data:
age::getSingleton('fastsimpleimport/import')
->processProductImport($data)
I'm having some trouble importing my products.
Items | Rows | Indexing | EcomDev | Seconds | Product/s |
---|---|---|---|---|---|
10 | 72 | Disabled | Enabled | 2 | 6.39 |
10 | 72 | Per Product | Enabled | 132 | 0.11 |
10 | 72 | Per Product | Disabled | 108 | 0.13 |
1000 | 3655 | Per Product | Enabled | 4000+ | DNF |
10 | 72 | Mass | Enabled | 37 | 0.38 |
100 | 431 | Mass | Enabled | 43.55 | 2.92 |
1000 | 3655 | Mass | Enabled | 122.25 | 10.04 |
10 | 72 | Mass | Disabled | Not yet implemented | Not yet implemented |
Running a full reindex is also impossible, since that will take almost 12 hours to complete, not what we're looking for.
There is also the the Aoe_Index module but that doesn't solve the problem, the indexes need to be updated faster.
The reason the indexes take so long to finish is because it uses the event system and indexing each product seperately. In the ApiImport module from @danslo he solves this problem by implementing a fake massupdate: https://github.com/danslo/ApiImport/blob/master/code/Model/Observer.php
I'll try and implement the same method here, i'll let you know what the results are. Implemented the fast indexing mode: https://github.com/ho-nl/AvS_FastSimpleImport/commit/c1816ca355900b4f4490cb5d39bf2f64fe75c9f3
Ich konnte erfolgreich einfache und konfigurierbare Produkte mit dem Modul anlegen. Thx @ test.php - Beispiel. Leider kann ich Werte wie: price, special_price, cost und meta_title nicht mit dem Wert null zurücksetzen.
Probiert habe ich null (mit und ohne Anführungszeichen), false, Leerstring und ein Weglassen der Spalte.
CE 1.6.2.0
Wenn ich Werte wie 5, bzw. "test" nehme, werden die Spalten korrekt aktualisiert.
Das Behavior ist noch default: self::BEHAVIOR_REPLACE
Moin,
irgendwie klappt das hier nicht richtig, ich erhalte immer, dass die Kategorien nicht importiert wurden.
Fehlermeldung: :::: Category does not exists ::::
Aber alle Kategorie gibt es, habe auch mal Probiert, mit Kommata getrennt brachte aber auch nichts
array(2) {
["sku"]=>
string(19) "A750009990203111816"
["_category"]=>
array(2) {
[0]=>
string(4) "9193"
[1]=>
string(4) "1035"
}
}
Hi there,
i know that this is not a bug from fastsimpleimport, but when u import the hole data more then one, magento will always create a new url...
like
/product-page.html will be next time /product-page-1.html
and so on
I've created a little shell script for importing my data. The source of the data is another database and the images are loaded over the web, works great when I test it but doesn't so much when I try to import 10k rows at once:
2013-01-11 17:23:30 - 82 mb Rows prepared, importing 10888 rows...
PHP Fatal error: Allowed memory size of 4294967296 bytes exhausted (tried to allocate 2444 bytes) in /lib/Varien/Image/Adapter/Gd2.php on line 51
This is not because of the image-downloads (that worked just fine), but it is because of the actual move action of the image. As shown in the class above
Without the images I can ruk 80k rows within 1,2G of ram, so that's no problem (it still uses 1,2G because there is a list loaded with all SKU's and there are 500k of them).
During initial import, the products will be created correct. But if i want to update products during a second import, the configurable products won't be updated. I noticed this behavior when i tried to disable some products.
Here is my import data:
sku | _attribute_set | _type | _product_websites | has_options | status | name | price | required_options | _super_products_sku | _super_attribute_code | _super_attribute_option | test_option |
S1 | Default | simple | base | 0 | 2 | Product 1 option 1 | 1,99 | 0 | ||||
C1 | Default | configurable | base | 1 | 2 | Product 1 | 1,99 | 1 | S1 | test_option | Option 1 | Option 1 |
The simple product is disabled as aspected but the the configurable product has not changed its status. Other attributes, like manufacturer etc., were also not changed.
I'm always getting the error "E-mail and website combination is not found" when trying to delete a customer. My code is this:
$data = array(
array(
'email' => '[email protected]',
'_website' => 'base'
)
);
$i = Mage::getSingleton('fastsimpleimport/import');
$i
->setBehavior(Mage_ImportExport_Model_Import::BEHAVIOR_DELETE)
->processCustomerImport($data);
echo $i->getErrorMessage();
I double checked that the email address is correct and that the customer is on website "base" (anyway the only one i have).
I also have the problem, that existing customers don't get updated, but are created again with the same email address and website – I tried with BEHAVIOR_REPLACE and BEHAVIOR_APPEND.
Is there something I completely missunderstood?
When importing categories it's possible to escape a category with a slash. ex: Books/Children \/ Adults
. This works great :)
Now when importing products the category path that is required isn't the above but actually is Books/Children / Adults
.
This could be considered a bug. I'm currently not fixing this bug but I'm leaving it here in case someone else runs into it.
I've got a dataset with multiple category assignments per product. I break out the category assignments as per the import specification:
array(
array(
'sku' => '1234',
'_category' => 'Cat A',
...
),
array(
'_category' => 'Cat B'
)
)
A single category works fine in this way.
Here is the stack trace:
magento/app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php(1752): mageCoreErrorHandler(8, 'Undefined index...', '/Library/WebSer...', 1752, Array)
#1 magento/app/code/core/Mage/ImportExport/Model/Import/Entity/Abstract.php(297): Mage_ImportExport_Model_Import_Entity_Product->validateRow(Array, 6)
#2 magento/app/code/core/Mage/ImportExport/Model/Import/Entity/Abstract.php(691): Mage_ImportExport_Model_Import_Entity_Abstract->_saveValidatedBunches()
#3 magento/.modman/AvS_FastSimpleImport/src/app/code/community/AvS/FastSimpleImport/Model/Import/Entity/Product.php(73): Mage_ImportExport_Model_Import_Entity_Abstract->validateData()
#4 magento/app/code/core/Mage/ImportExport/Model/Import/Entity/Abstract.php(597): AvS_FastSimpleImport_Model_Import_Entity_Product->validateData()
#5 magento/.modman/AvS_FastSimpleImport/src/app/code/community/AvS/FastSimpleImport/Model/Import.php(236): Mage_ImportExport_Model_Import_Entity_Abstract->isDataValid()
#6 magento/.modman/AvS_FastSimpleImport/src/app/code/community/AvS/FastSimpleImport/Model/Import.php(51): AvS_FastSimpleImport_Model_Import->validateSource(Array)
I've already tried using the patch in pull request #23 and it doesn't seem to solve this particular issue.
Note this is distinct from what I was asking in #9
Es gibt ja leider noch keine Option zum Importieren von Bundle Products über den Standard weg.
Dazu habe ich das hier gefunden:
https://github.com/danslo/ApiImport/blob/master/code/Model/Import/Entity/Product/Type/Bundle.php
Schaue es mir aber noch genau an...
[28] => Array
(
[sku] => A341111501027340000-pfand
[sku2] => A34111150102
[_type] => bundle
[_attribute_set] => Default
[_product_websites] => base
[position_number] => 34/00/00
[_category] => 183
[description] => somehting
[short_description] => somehting
[meta_description] => somehting
[catalog_number] => 7
[visibility] => 4
[is_in_stock] => 1
[is_deposit] => no
[fits_for] => somehting
[name] => somehting
[meta_title] => somehting
[url_key] => somehting
[status] => 1
[price] => 329
[cost] => 276.47
[image] => /artikelbilder/34111150102.jpg
[small_image] => /artikelbilder/34111150102.jpg
[thumbnail] => /artikelbilder/34111150102.jpg
[weight] => 0.001
[tax_class_id] => 1
[is_bulky_good] => no
[special_price] =>
[offer_type] =>
[special_from_date] =>
[special_to_date] =>
[sku_bundle] => A341111501027340000
[bundle_price] =>
[has_options] => 1
[price_type] => 0
[price_view] => Price Range
[shipment_type] => 0
[deposit_id] => 7
[_bundle_option_required] => 1
[_bundle_option_position] => 1
[_bundle_option_type] => checkbox
[_bundle_option_title] => #2
[_bundle_product_sku] => A34111150100
[_bundle_product_position] => 20
[_bundle_product_is_default] => 1
[_bundle_product_qty] => 1
[_bundle_product_can_change_qty] => 0
)
[29] => Array
(
[_bundle_option_title] => #1
[_bundle_product_sku] => A341111501027340000
[_bundle_product_position] => 10
[_bundle_product_is_default] => 1
[_bundle_product_qty] => 1
[_bundle_product_can_change_qty] => 0
)
When i try to import those array i got an mysql error:
PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`catalog_product_bundle_selection`, CONSTRAINT `FK_CAT_PRD_BNDL_SELECTION_OPT_ID_CAT_PRD_BNDL_OPT_OPT_ID` FOREIGN KEY (`option_id`) REFERENCES `catalog_product_bundle_option)'
Both Articles (Sku's: A341111501027340000, A34111150100) exists.
has anyone an hint for me :)
Code based on this tut for bundle articles (german):
http://www.integer-net.de/magento-import-von-bundle-produkten-mit-avs_fastsimpleimport/
I'm currently in the process of building our own field-mapper for the import and one of the requirements was that is should be able to run in a relatively low memory environment. One of the problems with the AvS import that normal import doesn't have, is that the current AvS import parses an array instead of reading directly from disk (csv file) or database (table rows)
To add additional functionality that allows you to use normal CSV's i've created a patch:
https://github.com/ho-nl/AvS_FastSimpleImport/commit/ff9a27fa40240e1e7dea22bb4ec1b6e6aca9c818
Row to be imported
sku | _attribute_set | _type | _category | _product_websites | entry_date | show_in_subview | is_in_stock | is_in_stock_on_location | cost | image | image_label | country | name | options_container | price | year | small_image | small_image_label | status | tax_class_id | thumbnail | thumbnail_label | url_key | url_path | visibility | weight | qty | min_qty | use_config_min_qty | min_sale_qty | use_config_min_sale_qty | max_sale_qty | use_config_max_sale_qty | notify_stock_qty | manage_stock | use_config_manage_stock | use_config_qty_increments | qty_increments | use_config_enable_qty_inc | _media_attribute_id | _media_image | _media_lable | show_list_sale | show_list_trade | nr_fsc | condition | condition_label | _store | nr_michel | _associated_sku | _associated_default_qty | _associated_position | nr_ov | nr_yvert |
slu0710 | Stamps Series | grouped | pb | 2013-09-04 19:44:08 | pb_de_fsc | 1 | lup0710.jpg | Definitives 4v, normal paper | lu | Definitives 4v, normal paper | Block After Info Column | 1965 | lup0710.jpg | Definitives 4v, normal paper | 1 | 4 | lup0710.jpg | Definitives 4v, normal paper | slu0710-definitives-4v-normal-paper | slu0710-definitives-4v-normal-paper.html | 4 | 0 | 14 | 1 | 1 | 1 | 1 | 10000 | 1 | 2 | 1 | 1 | 1 | 1 | 1 | 48 | http://www.postbeeld.com/media/series/lup/lup0710.jpg | Definitives 4v, normal paper | Yes | Yes | p | 710/3X | slug0710 | 1 | 1 | |||||||||
pb_en_fsc | slup0710 | 1 | 2 | |||||||||||||||||||||||||||||||||||||||||||||||||||
pb_es_fsc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
pb_fr_fsc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
pb_it_fsc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
pb_nl_fsc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
pb_de_pb | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
pb_en_pb | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
pb_es_pb | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
pb_fr_pb | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
pb_it_pb | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
pb_nl_pb | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
pb_de_delcampe | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
pb_en_delcampe | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
pb_es_delcampe | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
pb_fr_delcampe | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
pb_it_delcampe | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
pb_nl_delcampe | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
pb_nl_winkel_hl | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
pb_nl_winkel_rd |
show_in_subview
First run:
pb_de_fsc
pb_en_fsc
pb_es_fsc
pb_fr_fsc
Second, third and consecutive runs:
pb_it_fsc
pb_nl_fsc
pb_de_pb
pb_en_pb
pb_es_pb
pb_fr_pb
pb_it_pb
pb_nl_pb
pb_de_delcampe
pb_en_delcampe
pb_es_delcampe
pb_fr_delcampe
pb_it_delcampe
pb_nl_delcampe
pb_nl_winkel_hl
pb_nl_winkel_rd
As you can see I'm still missing values
wenn ich nur ein Paar Informationen eines Artikels Update werden einpaar andere Attribute Values oftmals mit getilgt.
Welche aber als "Required markiert" sind, bzw auch befüllt sind.
I'm currently creating a new import for a client and while developing it would be great if I could run a dryrun to see if everything would import correctly.
I don't know if it's related to your module but I cannot import values for the qty_increment feature. I have data like the following:
$data = array(
// Import data
);
$data['qty_increments'] = 40;
$data['enable_qty_increments'] = true;
$data['use_config_qty_increments '] = false;
$data['use_config_enable_qty_increments'] = false;
From my understanding the above code should set the value for qty_increments to 40, set the field "Use Qty Increments" ("Verpackungseinheiten verwenden") to TRUE
and uncheck the checkboxes for "use configuration settings" so that my custom settings take effect. Unfortunately, it doesn't, nothing happens at all.
All other fields get set properly. The PDF file from Vinai Kopp states on page 19 a list of fields, I've taken the fieldnames from there.
If i Import a product with BEHAVIOR_REPLACE it is working like expected: images get replaced.
If i Import with APPEND instead the images ares also replaced or not imported at all. The import/export method for magento appends the images to something like imagename_1.jpg and adds them to the product.
Any reason not doing it this way in with fastsimpleimport?
Is there an entity available for orders, invoices, creditmemo's and shipments somewhere? Know someone who has created such an entity adapter?
I don't REALLY need it at this point, but having a nice interface such as this is always nice and can really make the datacommunication more streamlined.
Of course, with orders etc, exporting the information is just as important as importing the information, so it should be exported as well.
I'm trying to import product relations (_links_upsell_sku + _links_upsell_position). The catalog I'm dealing with is huge (+1 mio. SKUs) and I don't know in advance which SKUs are in the shop and which are not. The importer is set to continue after error:
$import = Mage::getSingleton('fastsimpleimport/import');
$import
->setContinueAfterErrors(true)
->processProductImport($data);
But when the SKU does not exist in the catalog the import stops after 100 errors:
2013-06-27T07:28:36+00:00 ERR (3): Error Limit of 100 Errors reached, stopping import.
Input Data contains 100 corrupt records (from a total of 100)
:::: Product Type is invalid or not supported ::::
In Line(s) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100
The only quick solution I can think of is selecting the SKUs from the database first and discarding those that do not exist (yet). But I was under the impression that setContinueAfterErrors(true)
would exactly do that.
There is a Bug in _importExternalImageFiles method that will force download external images every import, even if they already exists!
if (!is_file(basename($this->_getUploader()->getTmpDir() . DS . $rowData['_media_image']))) {
$this->_copyExternalImageFile($rowData['_media_image']);
}
will always return false because if asks if !is_file('image.jpg') without the Path to the media folder...
Fix:
if (!is_file($this->_getUploader()->getTmpDir() . DS . basename($rowData['_media_image']))) {
$this->_copyExternalImageFile($rowData['_media_image']);
}
Hello,
This one good module for product import.
One issue faces in category import process
Like category name is "Santa Maria/Orcutt"
How i can import it?
Thanks,
Sunil
in Magento CE 1.7.0.2 and EE 1.2.0.2 the importer has an issues with multiselect Attributes that not setted in "_store"
Status and Availibilty, not setted in any StoreView, but on base area.
I've checked them in EE 13.0.0 here it will be work.
Magento 1.7.0.0
This bug is related to the core class: /app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php
Row 1617-1622:
$row = array_merge(
$defaultStockData,
array_intersect_key($existStockData, $defaultStockData),
array_intersect_key($rowData, $defaultStockData),
$row
);
Should be:
$row = array_merge(
$row,
$defaultStockData,
array_intersect_key($existStockData, $defaultStockData),
array_intersect_key($rowData, $defaultStockData)
);
Not really an issue with your code, but maybe helpful anyway.
I've got these error while importing products...
i know that this is a issues from the mysql server, but the hoster will not change the settings on the managed server.
so i have to rewrite the main method of AvS_FastSimpleImport_Model_Import_Entity_Product::_reindexUpdatedProducts
Mage::getResourceSingleton('catalog/product_indexer_eav')->catalogProductMassAction($event);
I think we could auto fill "_super_attribute_option" by fetching the attribute from _super_products_sku ?
Is that right? (of course there might be a performance draw-back)
Hey,
i have to handel about 150.000 products and it is not possible to store all of them in one run, so i have to call processProductImport() every 5k products but the second run will not process the data anymore, $this->getProcessedRowsCount() returns 0, $validationResults is true.
Somebody has an idee about this problem?
best regards
bernd
Can you clarify the license this is released under? Thanks!
Reference AvS_FastSimpleImport_Model_Import_Entity_Product::_reindexUpdatedProducts
so i think we have to provide some Events here for third party indexers like Firegento_Dynamiccategory
before after etc
Wenn ein Datensatz ungültig ist z.B. weil eine SKU fehlt wird ein Fehler geworfen und nicht ein einziger Artikel importiert. Ist es möglich die restlichen validen Artikel dennoch zu importieren und lediglich den fehlerhaften zu überspringen? Ich konnte dazu leider keine Dokumentation finden.
When using dry run, I get such messages:
:::: Invalid value for 'p_size'. Given: "l/xl" - Possible options are: l, m, m/l, s, s/m ::::
Even I use
->setDropdownAttributes(array('p_size', 'color'));
But when I import without dry run - everything works.
Hi,
I found an issue if AvS_FastSimpleImport_Model_Import_Entity_Product::setDropdownAttributes is called with null:
2012-12-13T16:34:30+00:00 ERR (3): Warning: Invalid argument supplied for foreach() in /var/www/[...]/app/code/community/AvS/FastSimpleImport/Model/Import/Entity/Product.php on line 411
Here is the Fix:
/**
* Set and Validate Attributes for which new Options should be created (dropdown only)
*
* @param array $attributeCodes
*/
public function setDropdownAttributes($attributeCodes = array())
{
$attributes = array();
if (is_null($attributeCodes)) {
$attributeCodes = array();
}
foreach ($attributeCodes as $attributeCode) {
/** @var $attribute Mage_Eav_Model_Entity_Attribute */
$attribute = Mage::getSingleton('catalog/product')->getResource()->getAttribute($attributeCode);
if (!is_object($attribute)) {
Mage::throwException('Attribute ' . $attributeCode . ' not found.');
}
if ($attribute->getSourceModel() != 'eav/entity_attribute_source_table') {
Mage::throwException('Attribute ' . $attributeCode . ' is no dropdown attribute.');
}
$attributes[$attributeCode] = $attribute;
}
$this->_dropdownAttributes = $attributes;
}
Die Methode _initTypeModels() in Mage_ImportExport_Model_Import_Entity_Product lädt für die Configurable-Products alle Produkte, auch wenn man keine Configurables nutzt. Deshalb habe ich diese erstmal in dieser Form überschrieben (1.6.2-Installation) und per unset diese rausgeworfen.
Ist aber noch die 0.1.0 von AvS_FastSimpleImport...
class Mage_ImportExport_Model_Import_Entity_Product extends Mage_ImportExport_Model_Import_Entity_Abstract
protected function _initTypeModels()
{
$config = Mage::getConfig()->getNode(self::CONFIG_KEY_PRODUCT_TYPES)->asCanonicalArray();
unset($config['configurable']); // unset configurable products
unset($config['grouped']); // unset grouped products
foreach ($config as $type => $typeModel) {
if (!($model = Mage::getModel($typeModel, array($this, $type)))) {
Mage::throwException("Entity type model '{$typeModel}' is not found");
}
if (! $model instanceof Mage_ImportExport_Model_Import_Entity_Product_Type_Abstract) {
Mage::throwException(
Mage::helper('importexport')->__('Entity type model must be an instance of Mage_ImportExport_Model_Import_Entity_Product_Type_Abstract')
);
}
if ($model->isSuitable()) {
$this->_productTypeModels[$type] = $model;
}
$this->_particularAttributes = array_merge(
$this->_particularAttributes,
$model->getParticularAttributes()
);
}
// remove doubles
$this->_particularAttributes = array_unique($this->_particularAttributes);
return $this;
}
Letztendlich müsste man das Import-Array prüfen und z.B. unset durchführen, wenn keine configurables gesetzt sind.
Bisher habe ich noch keine Lösung für folgendes Problem gefunden:
Es existiert ein Attribut vom Typ Multiselect. Nun möchte ich - ähnlich wie das beim Import von Dropdown-Attributen ist - dass beim Import noch nicht vorhandene Werte dem Attribut automatisch hinzugefügt werden. Bisher habe ich die Extension von amartinez (http://www.magentocommerce.com/magento-connect/amartinez-customimportexport.html) verwendet, die sehr viele Optionen beim Import bietet. Leider fehlt auch dort diese Funktionalität...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.