This section will go through the basic setting from the app to connect your Wordpress website

Install Wordpress library

The product is requisite to install the Wordpress site with support Dokan plugin, so any template that support Dokan will be work with the MStore Multi Vendor mobile app.

Once you have install the template, following free Wordpress plugins should be install (click the title Link below to download the package):

  1. Mstore API plugin: Extends the JSON API User for RESTful user registration, authentication, support all Payment Gateway, SMS Login and Facebook Logins.
  2. Better Rest API Featured Image: for some reason the image is not populate correctly so that need to install this plugin to support to show the image.
  3. WPML to WP API: support multi language from WPML plugin (require WPML installed if you would like to use multi language feature from the app)
  4. Regenerate Thumbnails: allows you to regenerate all thumbnail sizes for one or more images that have been uploaded to your Media Library. This plugins is important to boost up your app performance and render the products image faster.

    • Go to SettingsMedia and config the size thumnail for the image, each image should have three size Small (300x300), Medium (600x600) and Large (1024x1024)
    • Go to ToolsGenerate Thumbnails: and click the button to generate the image.
  5. JWT Authentication for REST API: This plugin is important to secure your Login account, this is new plugins require after version v1.2. To enable the plugins you need to update 2 things:

    • Edit .haccess file and add follwing content:
    RewriteEngine on
    RewriteCond %{HTTP:Authorization} ^(.*)
    RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
    • Edit wp-config.php file and add this code at bottom, your-top-secret-key the the random key:
    define('JWT_AUTH_SECRET_KEY', 'your-top-secret-key');
    • The JWT needs a secret key to sign the token this secret key must be unique and never revealed.
    • Such as you must have add below code out of block

      SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
    • or add this code for uploading Media When createing a new Post

      <IfModule mod_headers.c>
      ​    Header set Access-Control-Allow-Origin "*"
      </IfModule>
  6. Install the Dokan Pro or WC Vendor Plugins to support for the Multi Vendor features.

1. Install Demo App

Since version v1.2, the Mstore Multi Vendor is support for both Dokan and WC Vendor plugins so you can use with any templates that support to work with these plugins.

Some recommend templates:

And the according Expo app demo:

The config for these demo is located at src/common/AppConfig_xxx.json file, to run these demo, you can copy the content and past to the src/common/AppConfig.json file

Go to Common Setting, change the URL to Post name, this is required for the setting otherwise some images could not loading.

img

Permalink URL setting

3. Membership registration:

Enable the option Anyone can register.

register

Membership registration

4. App config

Go the mstore project folder, open the file: src/common/AppConfig.js and follow 3 simple steps to setup the app.

  • Step 1: change to your website URL and the wooCommerce API consumeKey appconfig
  • Step 2: Setting Product Images open the file: src/common/Config.js config mmv
  • Step 3: Config image for the Payment Gateway open the file: src/common/Config.js config payments

5. Config Firebase & Chat

Step 1: Create Firebase App

  • Forward Database Tab, select Realtime Database (as image)

databaseFBApp

Step 2: Connect Firebase App To Your App

  • Go to Config folder, move to your Config.js file
  • Find a key with name general, you will see the key Firebase name fill in it

mapFBApp

  • apiKey : Go to Project Overview -> Project settings -> General tab

  • authDomain : Go to Database Tab -> find as below image (get prefix .firebaseio.com) example : listapp.firebaseio.com => your authDomain is listapp.firebaseapp.com
  • databaseURL : Go to Database Tab -> find as below image copy full URL paste into as below image

authDomain

  • storageBucket: yourFirebaseApp.appspot.com Example: your firebase app is listappMobile then storageBucket -> listappMobile.appspot.com
  • messagingSenderId: Go to Project Overview -> Project settings -> Cloud Messaging tab messagingSenderId

=> Done config for connect FireBase App such as your Chat. These steps are clarify from the config file, please follow the guide from these style for the customize config.