Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Tim Wagner
    @wagnert
    You mean attribute groups, right?
    sasarai69
    @sasarai69
    @wagnert Sorry I mean Customer Group
    Tim Wagner
    @wagnert
    Ok, we actually don’t have a customer group chat import, but it should not be too complicate to implement it 🙂
    sasarai69
    @sasarai69
    Thanks @wagnert
    Tim Wagner
    @wagnert
    @sasarai69 You're welcome :) If you add an issue to our Github Repository https://github.com/techdivision/import-cli-simple, I'll have a look at it. Probably we can add it to one of our next versions :)
    sasarai69
    @sasarai69
    @wagnert It will be great :)
    Tim Wagner
    @wagnert
    :-)
    prakashdevelopers
    @prakashdevelopers
    Hai
    I want to create custom magento 2 module that will create product attribute value through import csv? Is this possible and i am new to magento and Is this possible to create import module using magento import framework that create/update product attribute value through csv ?
    Tim Wagner
    @wagnert
    You don't have to, the module is already available, see https://docs.m2if.com/file-structure/attributes :)
    QueenLinux
    @QueenLinux
    Hey, @wagnert , Magento Version is 2.2.5, for reasons,
    Can't seem to get M2IF phar to work correctly
    bin/import-cli-simple.phar
    PHP Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in phar:///opt/bitnami/apps/magento/htdocs/bin/import-cli-simple.phar/vendor/symfony/dependency-injection/ContainerBuilder.php on line 336
    bitnami@ip-172-31-15-184:~/apps/magento/htdocs$ php --version
    PHP 7.0.31 (cli) (built: Aug 21 2018 11:28:43) ( NTS )
    Copyright (c) 1997-2017 The PHP Group
    Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.31, Copyright (c) 1999-2017, by Zend Technologies
    Tim Wagner
    @wagnert
    Hm, what version of M2IF are you using?
    QueenLinux
    @QueenLinux
    Latest PHAR from m2if.com, downloaded today
    Tim Wagner
    @wagnert
    ok, what command are you invoking?
    QueenLinux
    @QueenLinux
    from cli: {Magento Root} bin/import-cli-simple.phar import:categories
    Tim Wagner
    @wagnert
    ok and the CSV files are under var/import, right? I‘ll test it tomorrow and come back to you here!
    QueenLinux
    @QueenLinux
    Well, the part that concerns me is it doesn't even seem to get to a point where it cares at all about the csvs, it crashes when i just run the base command so i can see parameters
    Tim Wagner
    @wagnert
    Yeah, seems to be a dependency injection error during initialization. You can test the composer installation until i‘ce found the issue tomorrow 🙂
    Tim Wagner
    @wagnert

    @QueenLinux Had a look at it and it seems, that this is a PHP version topic. I've created the PHAR with PHP 7.1 and you're using PHP 7.0. Can you create the phar by yourself by

    git clone https://github.com/techdivision/import-cli-simple.git && cd import-cli-simple && composer update && vendor/bin/robo create:phar

    Should work and should solve the problems.

    QueenLinux
    @QueenLinux
    still looked for php 7.1.3 for symfony
    Tim Wagner
    @wagnert
    Perfect 👌
    QueenLinux
    @QueenLinux
    no, i needed to work within 7.0, that still looked for php7.1
    Tim Wagner
    @wagnert
    Sorry, i misunderstand 🙁 i’ll see tomorrow if i can find a solution
    QueenLinux
    @QueenLinux

    php bin/import-cli-simple.phar import:categories or any other command returns In ConnectionFactory.php line 52:

    SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service
    not known

    In ConnectionFactory.php line 52:

    PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service no
    t known

    Tim Wagner
    @wagnert
    Please check your database configuration. It seems that the DB host is not reachable
    QueenLinux
    @QueenLinux
    with the .phar, how would i specify db config?
    Tim Wagner
    @wagnert
    twi options: execute the pharfrom whithin teh mage rootdir or pass a config wirh the —congiuration= param
    QueenLinux
    @QueenLinux

    daemon@*:~$ /opt/bitnami/php/bin/php 'bin/import-cli-simple.phar' import:categories --configuration=bin/importconfig.json

    In Configuration.php line 388:

    Can't find any plugins for operation add-update

    what is this about?
    i did the configuration file thing
    Tim Wagner
    @wagnert
    Did you have the correct configuration file copied from the techdivision/import-sample-data repo? Make sure you use the one thst matches your Magento Edition.
    QueenLinux
    @QueenLinux

    In FilesystemTrait.php line 92:

    Directory target doesn't exist

    {
    "magento-edition": "CE",
    "magento-version": "2.2.6",
    "operation-name" : "add-update",
    "archive-artefacts" : true,
    "debug-mode" : false,
    "source-dir" : "var/importexport",
    "target-dir" : "var/importexport/archive",
    "entity-type-code" : "catalog_category",
    "listeners" : [
    {
    "app.set.up" : [
    "import.listener.render.ansi.art",
    "import.listener.initialize.registry"
    ]
    },
    {
    "app.tear.down" : [
    "import.listener.clear.registry"
    ]
    }
    ],
    "databases" : [
    {
    "id": "local",
    "default" : true,
    "pdo-dsn": "mysql:host=127.0.0.1;dbname=bitnami_magento;charset=utf8",
    "username": "bn_magento",
    "password": "7f92951f09"
    }
    ],
    "loggers": [
    {
    "name": "system",
    "channel-name": "logger/system",
    "type": "Monolog\Logger",
    "handlers": [
    {
    "type": "Monolog\Handler\ErrorLogHandler",
    "formatter": {
    "type": "Monolog\Formatter\LineFormatter",
    "params" : [
    {
    "format": "[%datetime%] %channel%.%level_name%: %message% %context% %extra%",
    "date-format": "Y-m-d H:i:s",
    "allow-inline-line-breaks": true,
    "ignore-empty-context-and-extra": true
    }
    ]
    }
    }
    ],
    "processors": [
    {
    "type": "Monolog\Processor\MemoryPeakUsageProcessor"
    }
    ]
    }
    ],
    "operations" : [
    {
    "name" : "delete",
    "plugins" : [
    {
    "id": "import.plugin.global.data"
    },
    {
    "id": "import.plugin.subject",
    "subjects" : [
    {
    "id": "import.subject.move.files",
    "identifier": "move-files",
    "file-resolver": {
    "prefix": "category-import"
    },
    "ok-file-needed": true
    },
    {
    "id": "import_category.subject.bunch",
    "identifier": "files",
    "file-resolver": {
    "prefix": "category-import"
    },
    "observers": [
    {
    "import": [
    "import_category.observer.clear.category"
    ]
    }
    ]
    }
    ]
    },
    {
    "id": "import.plugin.archive"
    }
    ]
    },
    {
    "name" : "replace",
    "plugins" : [
    {
    "id": "import.plugin.global.data"
    },
    {
    "id": "import.plugin.subject",
    "subjects": [
    {
    "id": "import.subject.move.files",
    "identifier": "move-files",
    "file-resolver": {
    "prefix": "category-import"
    },
    "ok-file-needed": true
    },
    {
    "id": "import_category.subject.bunch",
    "identifier": "files",
    "file-resolver": {
    "prefix": "category-import"
    },
    "observers": [
    {
    "import": [
    "import_category.observer.composite.replace"
    ]
    }
    ]
    },
    {
    "id": "import_category.subject.bunch",
    "identifier": "files",
    "file-resolver": {
    "prefix": "category-create"
    },
    "filesystem-adapter" : {
    "id" : "import.adapter.filesystem.factory.league",
    "adapter" : {
    "type" : "League\Flysystem\Adapter\Local"
    }
    },
    "params" : [
    {
    "copy-images" : true,
    "media-directory" : "target",
    "images-file-directory" : "vendor/techdivision/import-sample-data/generic/media/wysiwyg"
    }
    ],
    "observers": [
    {
    "import": [
    Tim Wagner
    @wagnert
    Deactivate the image copy functionality by setting “copy-images” : true or specify a valid value for “media-directory” : “target” should help 🙂
    QueenLinux
    @QueenLinux
    Now start import with serial ad0ad053-0f7c-4541-b53c-3133dc6fb485 [catalog_category => add-update]
    [2019-08-23 08:21:35] logger/system.INFO: Now start import with serial ad0ad053-0f7c-4541-b53c-3133dc6fb485 [catalog_category => add-update] {"memory_peak_usage":"8 MB"}
    Operation add-update has been stopped by TechDivision\Import\Plugins\SubjectPlugin, because no import files can be found in directory var/importexport
    [2019-08-23 08:21:36] logger/system.INFO: Operation add-update has been stopped by TechDivision\Import\Plugins\SubjectPlugin, because no import files can be found in directory var/importexport {"memory_peak_usage":"12 MB"}
    Successfully finished import with serial ad0ad053-0f7c-4541-b53c-3133dc6fb485 in 0.566772 s
    [2019-08-23 08:21:36] logger/system.INFO: Successfully finished import with serial ad0ad053-0f7c-4541-b53c-3133dc6fb485 in 0.566772 s {"memory_peak_usage":"12 MB"}
    ls
    archive category-import.csv category-import.ok
    creates ok file now, but why does it think there are no import files?
    Tim Wagner
    @wagnert
    the filenames must follow a pattern like import-category_20190823_123056_01.csv 🙂
    QueenLinux
    @QueenLinux
    now have file pattern, now it says directory target doesnt exist, have set false to copy images in both the add-update and replace methods
    QueenLinux
    @QueenLinux
    ~/apps/magento/htdocs$ ls var/importexport/
    archive category-import_20190808-181904_01.csv category-import.ok
    QueenLinux
    @QueenLinux
    [2019-08-23 08:57:17] logger/system.INFO: Operation add-update has been stopped by TechDivision\Import\Plugins\SubjectPlugin, because no import files can be found in directory var/importexport {"memory_peak_usage":"12 MB"}
    Successfully finished import with serial 558f802c-a0a1-4f15-9ab3-be0edf83e9fe in 0.710831 s
    [2019-08-23 08:57:17] logger/system.INFO: Successfully finished import with serial 558f802c-a0a1-4f15-9ab3-be0edf83e9fe in 0.710831 s {"memory_peak_usage":"12 MB"}
    bitnami@ip-**:~/apps/magento/htdocs$
    took the _01 off the csv file, gives this error now
    Tim Wagner
    @wagnert
    The .ok filemust have the same name as the CSV file has, but .csv has to be replaced with .ok
    QueenLinux
    @QueenLinux
    without _01, still says no import files found, with _01, get directory target doesn't exist
    this is after changin ok filename to match csv
    Tim Wagner
    @wagnert
    The message with the missing target directory results of the “media-dir”:”target” configuration value, please remove it
    QueenLinux
    @QueenLinux
    success! wonderful, will be reporting results
    Tim Wagner
    @wagnert
    Perfect 🙂