AvS_FastSimpleImport icon indicating copy to clipboard operation
AvS_FastSimpleImport copied to clipboard

store view specific values not working on 0.7.0

Open hbrandl opened this issue 9 years ago • 5 comments

The code below is expected to write 'test en_ww' to the default store view en_ww and 'test de_de' to the store view de_de.

This works as expected on 0.6.4 however on 0.7.0 only the en_ww value is written (I guess since en_ww is the default store view).

Has the format changed? Am I doing something else wrong?

<?php

require_once ("../../html/app/Mage.php");
Mage::init();

$data = array(array(
            '_store' => ['en_ww', 'de_de'],
            'sku' => 'test-1',
            '_type' => 'simple',
            '_attribute_set' => 'Default',
            'description' => ['test en_ww', 'test de_de'],
            'short_description' => ['test en_ww', 'test de_de'],
            '_product_websites' => 'base',
            'price' => 99999,
            'name' => ['test en_ww', 'test de_de'],
            'qty' => 0,
        ));

var_dump($data);

$import = Mage::getModel('fastsimpleimport/import');
try {
    $import->setUseNestedArrays(true)
    ->processProductImport($data);
} catch (Exception $e) {
    echo "error data products\r\n";
    print_r($import->getErrorMessages());
} 

my comoposer lock entry

        {
            "name": "avstudnitz/fast-simple-import",
            "version": "0.7.0",
            "source": {
                "type": "git",
                "url": "https://github.com/avstudnitz/AvS_FastSimpleImport.git",
                "reference": "c2855dc4a3caefa43d769721fdbdbedca8782748"
            },

hbrandl avatar Feb 16 '16 20:02 hbrandl

I have the same problem...

    $product_data_config['_type'] = 'configurable';
    $product_data_config['_store'] = array('base', 'eu', 'en');
    $product_data_config['_attribute_set'] = 'Default';
    $product_data_config['_product_websites'] = 'base';

Throws error:

...Warning: trim() expects parameter 1 to be string, array given...

pabloblazquez avatar Mar 07 '16 22:03 pabloblazquez

I have the same problem seems to be the version 0.7

Warning: trim() expects parameter 1 to be string, array given in /app/code/community/AvS/FastSimpleImport/Model/Import/Entity/Product.php on line 1394

mbernabeu avatar Jun 06 '16 14:06 mbernabeu

I solved this by adding the linenumber to the lookup of stores.

stefanskotte avatar Jun 28 '16 22:06 stefanskotte

@stefanskotte Could you please explain in detail.How you have fixed this issue?

somat211 avatar Nov 17 '16 12:11 somat211

I just did this quick fix:

https://github.com/avstudnitz/AvS_FastSimpleImport/pull/326/commits/5c4f4eccdfee8b9365a8a44027343003a651b351

stefanskotte avatar Nov 17 '16 14:11 stefanskotte