Download the PHP package magenit/magento2-customers-import without Composer

On this page you can find all versions of the php package magenit/magento2-customers-import. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package magento2-customers-import

Customer Import Module

Requirement :

We want you to write code that supports importing customers and their addresses. The requirement is to import from a sample CSV or JSON at present however the code should be written to support importing from other sources in future. We've intentionally used a slightly ambiguous term of "profiles" to allow for future scope e.g. two CSVs but with differing columns, hence two profiles.

The two sample files which you need to accomodate are provided.

The user interface to the code should be via a CLI command as below:

bin/magento customer:import <profile-name> <source>

So to import from the CSV and the JSON respectively the user would execute either one of the following (you can vary the command format slightly if you wish):

Module To Consider :

Dev Solution

Command has been modified, So we can get rid of passing 1 additional parameter "profile". Expecting the key=>values in json and cav or any file furture extend must follow minimum requirement columns.

bin/magento customer:import <source path>

How to test

composer require magenit/magento2-customers-import php bin/magento setup:upgrade php bin/magento cache:clean store csv and json file in val/ImportExport directory (recommended and good approach)

execute command :

php bin/magento ng:customers:import --profile-file=var/importExport/sample.csv

Or/And

php bin/magento ng:customers:import --profile-file=var/importExport/sample.json

Verify Admin.

Achieved Target in Requirement implementation(Module To Consider)

How To extend this module to support for additional profile whithout modifying code :

Create custom module and command. extends MageNit\CustomersImport\Model\CustomerImport Major function to override

  1. setAllowedFileExtension
  2. prepareDataFromFile
  3. prepareDataForProcessing (please follow customerInterface)

What not Done

Unit testing not done, it takes more time and efforts, so due to time constraints it difficult to achieve in this test.


All versions of magento2-customers-import with dependencies

PHP Build Version
Package Version
Requires php Version ~7.2.0||~8.1.0||~8.2.0||~8.3.0
magento/framework Version 102.0.*|103.0.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package magenit/magento2-customers-import contains the following files

Loading the files please wait ....