Getting Started

Getting Started

Setup ionic environment - to know more about ionic environment setup see, ionic framework official document - https://ionicframework.com/docs/intro/installation/

Unzip downloaded files

Change your details in app/config.xml. Change id, name, description, author, email, href

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.grocery.binjara" version="0.0.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Grocery Ecommerce</name>
    <description>An awesome Ionic/Cordova app.</description>
    <author email="hi@ionicframework.com" href="http://ionicframework.com/">Ionic Framework Team</author>

CD app

$ cd wooapp

add android and ios platform

$ ionic cordova platform add android
$ ionic cordova platform add ios

WooCommerce API

  1. Visit WooCommerce > Settings > Advanced > REST API tab and tick the Enable REST API Checkbox

  2. Go to API WooCommerce > Settings > Advanced > REST API > Keys/Apps > Add Key

Select the user in user field and add a description. Choose level of access Read/Write. then select the button Generate API Key and WooCommerce will generate API keys for that user.

Now you should see two new keys, These two keys are your Consumer Key and Consumer Secret

Add url, api keys in src/app/envioronments/envioronment.ts file.

Also, change production envioronment file in src/app/envioronments/envioronment.prod.ts

  apiurl:'API_URL',
  consumer_key:'CONSUMER_KEY',
  consumer_secret:'CONSUMER_SECRET',

Now you can run your app -

ionic serve
ionic cordova build android
 ionic cordova build ios

Debug apk may take time to load on some android devices. you need to build --prod to load faster

ionic cordova build android --prod
ionic cordova build ios --prod

Last updated