Magento 2: Install JMango360 PWA plugin with COMMAND LINE

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:
  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 PWA plugin M2 is compatible with Magento Community/Enterprise 2.1 or later. You can install the PWA plugin from Magento Marketplace or with Command Line. Below is how to install the PWA 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

  1. PHP version must support CLI.
  2. All the settings need to be done in the shell access mode. PHP Composer (PHP packages manager) must be installed (download frohttps://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 PWA repo for Composer. Copy the command lines below to Shell, then press Enter.

$ composer config repositories.jmango360-pwa vcs https://gitlab.jmango360.com/m2repo/m2pwa 
$ 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-pwa vcs https://gitlab.jmango360.com/m2repo/m2pwa.git 
$ 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 the command line below to Shell, then press Enter.

$ composer require jmango360/pwa

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 Jmango360_Pwa
  • To complete the setup, run the upgrade script below:
$ php bin/magento setup:upgrade
$ php bin/magento setup:di:compile

Step 4Re-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 5: 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/pwa

Step 2 : Run the Magento upgrade script again.
$ php bin/magento setup:upgrade
$ php bin/magento setup:di:compile

Step 3: Regenerate 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]

Did you know how to install PHP Composer?

1. Check if the PHP version supports CLI
  • Copy the command line below to 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 to 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’

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 will import it to our server ‘gitlab.jmango360.com’.

    • Related Articles

    • 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: $ php composer.phar remove jmango360/japi Compatibility: JMango360 plugin supports all product types, except virtual and downloadable products. As for ...
    • Video Tutorials - Create Your Integrated PWA

      Create a Magento 2 PWA Create a BigCommerce PWA Create a PrestaShop 1.7 PWA Create a PrestaShop 1.6 PWA
    • 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: Configure the PWA plugin

      After you install the JMango360 PWA plugin successfully on your Magento webshop, please go to Magento Admin > JMango360 > Settings to configure the PWA plugin. Connection Credentials Version: The version of the PWA plugin. User Name: The API username ...
    • Magento 1: Install JMango360 PWA 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 ...