Magento 2: Install JMango360 plugin with COMMAND LINE

Magento 2: Install JMango360 plugin with COMMAND LINE

To upgrade plugin from version lower than 1.8.5, please remove the current plugin before upgrading:
  1. $ php composer.phar remove jmango360/japi
Compatibility: JMango360 plugin supports all product types, except virtual and downloadable products. As for payment methods, all gateway / hosted methods meeting the requirements below are supported:
  1. hosted methods should be redirected from place order page
  2. if succeed, they should return to checkout/onepage/success page
  3. if fail, they should return to checkout/cart page

JMango360 plugin M2 is compatible with Magento Community/Enterprise 2.1 or later. You can install the plugin from Magento Marketplace or with Command Line. Below is how to install the plugin with Command Line.

You are recommended to back up all of themes and extensions in Magento before installation, especially when you are working on a live server. 

Pre-requisites

  • PHP version must support CLI.
  • All the settings need to be done in the shell access mode. PHP Composer (PHP packages manager) must be installed (download from https://getcomposer.org/download/). Please scroll to the bottom of this article to find the way to install PHP Composer.

Installation

Step 1: Configure the JMango360 repo for Composer. Copy the command lines below to Shell, then press Enter.

$ composer config repositories.jmango360 vcs https://gitlab.jmango360.com/m2repo/m2repo 
$ composer config repositories.jmango360-onepage vcs https://gitlab.jmango360.com/m2repo/m2onepage 

If these command lines do not work for you, please use the following:

$ composer config repositories.jmango360 vcs https://gitlab.jmango360.com/m2repo/m2repo.git 
$ composer config repositories.jmango360-onepage vcs https://gitlab.jmango360.com/m2repo/m2onepage.git 

Step 2: Add the module to Composer. Copy command line below to Shell, then press Enter.

$ composer require jmango360/api jmango360/onepage

Step 3: Installation/Upgrade. After the Composer downloads the module code, you need to enable the module first.
  • Copy the command line below to Shell, then press Enter.
$ php bin/magento module:enable Jmango360_Japi Jmango360_Onepage
  • To complete the setup, run the upgrade script below:
$ php bin/magento setup:upgrade
$ php bin/magento setup:di:compile

Step 4: Re-generate static files. Generate all static files for the theme "Magento/luma" (required) for all available languages used in the website. For instance:

$ php bin/magento setup:static-content:deploy -t Magento/luma [other themes] [other languages]

Step 5: If your website installs a new plugin, you need to reindex catalogsearch_fulltext to make it work.

Step 6: Configure in Magento Admin. Go to Stores > Configuration > Services > JMango360 Mobile.

Update

Step 1: To download new code, you need to update the Composer.

$ composer update jmango360/api jmango360/onepage

Step 2: Run the Magento upgrade script again.

$ php bin/magento setup:upgrade
$ php bin/magento setup:di:compile
 
Step 3: Re-generate static files. Generate all static files in the theme "Magento/luma" (required) for all available languages in the website. For instance:

$ php bin/magento setup:static-content:deploy -t Magento/luma [other themes] [other languages]

Step 4: If your website upgrades the plugin, you need to reindex catalogsearch_fulltext to make it work.

Did you know how to install PHP Composer?

1. Check if the PHP version supports CLI

  • Copy the command line below into Shell, then press Enter.
$ php -v
  • If the returned result matches the command line below, it means your PHP supports CLI.

PHP 7.0.16-1~dotdeb+8.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache
v7.0.16-1~dotdeb+8.1, Copyright (c) 1999-2017, by Zend Technologies

2. Check if PHP is installed correctly
  • Copy the command line below into Shell, then press Enter.
$ composer -V
  • If Composer is installed, the returned result will be the same as this one.
Composer version 1.4.2 2017-05-17 08:17:52

3. Composer error ‘The remote end hung up unexpectedly’
  1. This Git’s issue occurs when you clone with HTTPS. To solve it, you may need to clone with SSH. Please send your server’s SSH public key to our Support Team so we can import it to our server ‘gitlab.jmango360.com’.

    • Related Articles

    • Magento 2: Install JMango360 PWA plugin with COMMAND LINE

      To upgrade plugin from version lower than 1.8.5, please remove the current plugin before upgrading: $ php composer.phar remove jmango360/japi Compatibility: JMango360 plugin supports all product types, except virtual and downloadable products. As for ...
    • Magento 2: Install JMango360 plugin from Magento Marketplace

      From plugin version 2.1.19, we no longer support Magento 2.2.X. Compatibility: JMango360 plugin supports all product types, except virtual and downloadable products. As for payment methods, all gateway/hosted methods meeting the requirements below ...
    • Magento 1: Install JMango360 plugin by FTP

      Compatibility: JMango360 plugin supports all product types, except virtual and downloadable products. As for payment methods, all gateway/hosted methods meeting the requirements below are supported: hosted methods should be redirected from place ...
    • Magento 1: Install JMango360 plugin from Magento Marketplace

      Magento 1 will reach end of life on June 30, 2020. This M1 extension will be removed from the store on July 07, 2020. If you plan to keep this extension, we recommend that you download it as it will not be available in the Magento Repository after ...
    • Magento 1: Install JMango360 plugin using package file

      Compatibility: JMango360 plugin supports all product types, except virtual and downloadable products. As for payment methods, all gateway/hosted methods meeting the requirements below are supported: hosted methods should be redirected from place ...