Skip to content

Error in data structure: entity values are mixed #109

Description

@mattiaguatta

hello, have this error when try to import with sample code, Error in data structure: entity values are mixed

why??




use Magento\Framework\App\Bootstrap;
require_once(__DIR__.'/../../app/bootstrap.php');
$bootstrap = Bootstrap::create(BP, $_SERVER);
$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); 
$obj = $bootstrap->getObjectManager();

$state = $obj->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');

$importerModel = $objectManager->create('FireGento\FastSimpleImport\Model\Importer');

$productsArray[] = array(
        
                    'sku' => 'firegento-test',
                    'attribute_set_code' => 'Default',
                    'product_type' => 'simple',
                    'product_websites' => 'base',
                    'name' => 'FireGento Test Product',
                    'price' => '14',
                );
                
                
try {
    $importerModel->processImport($productsArray);
} catch (\Exception $e) {
    echo $e->getMessage();
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions