├── .editorconfig ├── .gitignore ├── .io-config.json ├── LICENSE ├── README.md ├── config.xml ├── ionic.config.json ├── package.json ├── resources ├── android │ ├── icon │ │ ├── drawable-hdpi-icon.png │ │ ├── drawable-ldpi-icon.png │ │ ├── drawable-mdpi-icon.png │ │ ├── drawable-xhdpi-icon.png │ │ ├── drawable-xxhdpi-icon.png │ │ └── drawable-xxxhdpi-icon.png │ └── splash │ │ ├── drawable-land-hdpi-screen.png │ │ ├── drawable-land-ldpi-screen.png │ │ ├── drawable-land-mdpi-screen.png │ │ ├── drawable-land-xhdpi-screen.png │ │ ├── drawable-land-xxhdpi-screen.png │ │ ├── drawable-land-xxxhdpi-screen.png │ │ ├── drawable-port-hdpi-screen.png │ │ ├── drawable-port-ldpi-screen.png │ │ ├── drawable-port-mdpi-screen.png │ │ ├── drawable-port-xhdpi-screen.png │ │ ├── drawable-port-xxhdpi-screen.png │ │ └── drawable-port-xxxhdpi-screen.png ├── icon.png ├── ios │ ├── icon │ │ ├── icon-40.png │ │ ├── icon-40@2x.png │ │ ├── icon-40@3x.png │ │ ├── icon-50.png │ │ ├── icon-50@2x.png │ │ ├── icon-60.png │ │ ├── icon-60@2x.png │ │ ├── icon-60@3x.png │ │ ├── icon-72.png │ │ ├── icon-72@2x.png │ │ ├── icon-76.png │ │ ├── icon-76@2x.png │ │ ├── icon-83.5@2x.png │ │ ├── icon-small.png │ │ ├── icon-small@2x.png │ │ ├── icon-small@3x.png │ │ ├── icon.png │ │ └── icon@2x.png │ └── splash │ │ ├── Default-568h@2x~iphone.png │ │ ├── Default-667h.png │ │ ├── Default-736h.png │ │ ├── Default-Landscape-736h.png │ │ ├── Default-Landscape@2x~ipad.png │ │ ├── Default-Landscape~ipad.png │ │ ├── Default-Portrait@2x~ipad.png │ │ ├── Default-Portrait~ipad.png │ │ ├── Default@2x~iphone.png │ │ └── Default~iphone.png ├── splash.png └── wp8 │ ├── icon │ ├── ApplicationIcon.png │ └── Background.png │ └── splash │ └── SplashScreenImage.png ├── src ├── app │ ├── app.component.ts │ ├── app.module.ts │ ├── app.scss │ ├── app.template.html │ └── main.ts ├── assets │ ├── data │ │ └── data.json │ ├── i18n │ │ ├── en.json │ │ └── es.json │ ├── icon │ │ └── favicon.ico │ └── img │ │ ├── appicon.png │ │ ├── appicon.svg │ │ ├── banner-1.webp │ │ ├── banner-2.webp │ │ ├── banner-3.webp │ │ ├── cat-1.webp │ │ ├── cat-2.webp │ │ ├── cat-3.webp │ │ ├── cat-4.webp │ │ ├── ica-slidebox-img-1.png │ │ ├── ica-slidebox-img-2.png │ │ ├── ica-slidebox-img-3.png │ │ ├── ica-slidebox-img-4.png │ │ ├── ico-database.png │ │ ├── ionic-logo-white.svg │ │ ├── products │ │ ├── alphabet.png │ │ ├── birthday.webp │ │ ├── christmas.webp │ │ ├── clip-heart.jpg │ │ ├── clips.jpg │ │ └── enamel.png │ │ ├── pwa-slidebox-img-3.png │ │ ├── ring.svg │ │ ├── speakers │ │ ├── bear.jpg │ │ ├── cheetah.jpg │ │ ├── duck.jpg │ │ ├── eagle.jpg │ │ ├── elephant.jpg │ │ ├── giraffe.jpg │ │ ├── iguana.jpg │ │ ├── kitten.jpg │ │ ├── lion.jpg │ │ ├── mouse.jpg │ │ ├── puppy.jpg │ │ ├── rabbit.jpg │ │ └── turtle.jpg │ │ └── vPlanetCommerce.jpg ├── declarations.d.ts ├── filters │ └── ordinal.ts ├── index.html ├── manifest.json ├── pages │ ├── about │ │ ├── about.html │ │ ├── about.scss │ │ └── about.ts │ ├── account │ │ ├── account.html │ │ ├── account.scss │ │ └── account.ts │ ├── categories │ │ ├── categories.html │ │ ├── categories.scss │ │ └── categories.ts │ ├── checkout │ │ ├── checkout.html │ │ ├── checkout.scss │ │ └── checkout.ts │ ├── home │ │ ├── home.html │ │ ├── home.scss │ │ └── home.ts │ ├── login │ │ ├── login.html │ │ ├── login.scss │ │ └── login.ts │ ├── popover │ │ └── popover.ts │ ├── product-detail │ │ ├── product-detail.html │ │ ├── product-detail.scss │ │ └── product-detail.ts │ ├── products-filter │ │ ├── products-filter.html │ │ ├── products-filter.scss │ │ └── products-filter.ts │ ├── products │ │ ├── products.html │ │ ├── products.scss │ │ └── products.ts │ ├── search │ │ ├── search.html │ │ ├── search.scss │ │ └── search.ts │ ├── settings │ │ ├── settings.html │ │ ├── settings.scss │ │ └── settings.ts │ ├── showcart │ │ ├── showcart.html │ │ ├── showcart.scss │ │ └── showcart.ts │ ├── signup │ │ ├── signup.html │ │ ├── signup.scss │ │ └── signup.ts │ ├── support │ │ ├── support.html │ │ ├── support.scss │ │ └── support.ts │ ├── walkthrough │ │ ├── walkthrough.html │ │ ├── walkthrough.scss │ │ └── walkthrough.ts │ └── wishlist │ │ ├── wishlist.html │ │ ├── wishlist.scss │ │ └── wishlist.ts ├── providers │ ├── constants.ts │ ├── data-service.ts │ └── user-service.ts ├── service-worker.js └── theme │ └── variables.scss ├── tsconfig.json └── tslint.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs 2 | # editorconfig.org 3 | 4 | root = true 5 | 6 | [*] 7 | indent_style = space 8 | indent_size = 2 9 | 10 | # We recommend you to keep these unchanged 11 | end_of_line = lf 12 | charset = utf-8 13 | trim_trailing_whitespace = true 14 | insert_final_newline = true 15 | 16 | [*.md] 17 | trim_trailing_whitespace = false -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Specifies intentionally untracked files to ignore when using Git 2 | # http://git-scm.com/docs/gitignore 3 | 4 | *~ 5 | *.sw[mnpcod] 6 | *.log 7 | *.tmp 8 | *.tmp.* 9 | log.txt 10 | *.sublime-project 11 | *.sublime-workspace 12 | .vscode/ 13 | npm-debug.log* 14 | *.apk 15 | *.keystore 16 | 17 | .idea/ 18 | .sass-cache/ 19 | .tmp/ 20 | .versions/ 21 | coverage/ 22 | dist/ 23 | node_modules/ 24 | tmp/ 25 | temp/ 26 | hooks/ 27 | platforms/ 28 | plugins/ 29 | plugins/android.json 30 | plugins/ios.json 31 | www/ 32 | $RECYCLE.BIN/ 33 | 34 | .DS_Store 35 | Thumbs.db 36 | UserInterfaceState.xcuserstate 37 | -------------------------------------------------------------------------------- /.io-config.json: -------------------------------------------------------------------------------- 1 | {"app_id":"f8fec798","api_key":"5b22e545f83d56218789f86f7ce1a2318303eedd3e59e68e"} -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ionic-ecommerce-app 2 | Ionic 3 E-commerce application 3 | -------------------------------------------------------------------------------- /config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | vplanet-commerce 4 | An awesome Ionic/Cordova app. 5 | Ionic Framework Team 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /ionic.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vplanet-commerce", 3 | "app_id": "f8fec798", 4 | "v2": true, 5 | "typescript": true 6 | } 7 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vplanet-commerce", 3 | "author": "Gaurav Saini", 4 | "homepage": "http://vplanetcommerce.com", 5 | "private": true, 6 | "scripts": { 7 | "clean": "ionic-app-scripts clean", 8 | "build": "ionic-app-scripts build", 9 | "ionic:build": "ionic-app-scripts build", 10 | "ionic:serve": "ionic-app-scripts serve" 11 | }, 12 | "dependencies": { 13 | "@angular/common": "4.0.0", 14 | "@angular/compiler": "4.0.0", 15 | "@angular/compiler-cli": "4.0.0", 16 | "@angular/core": "4.0.0", 17 | "@angular/forms": "4.0.0", 18 | "@angular/http": "4.0.0", 19 | "@angular/platform-browser": "4.0.0", 20 | "@angular/platform-browser-dynamic": "4.0.0", 21 | "@ionic-native/core": "3.4.2", 22 | "@ionic-native/app-rate": "3.4.2", 23 | "@ionic-native/call-number": "3.4.2", 24 | "@ionic-native/camera": "3.4.2", 25 | "@ionic-native/card-io": "3.4.2", 26 | "@ionic-native/deeplinks": "3.4.2", 27 | "@ionic-native/google-analytics": "3.4.2", 28 | "@ionic-native/push": "3.4.2", 29 | "@ionic-native/social-sharing": "3.4.2", 30 | "@ionic-native/splash-screen": "3.4.2", 31 | "@ionic-native/status-bar": "3.4.2", 32 | "@ionic-native/text-to-speech": "3.4.2", 33 | "@ionic/cloud-angular": "^0.12.0", 34 | "@ionic/storage": "2.0.1", 35 | "ionic-angular": "3.0.1", 36 | "ionic2-rating": "^1.1.0", 37 | "ionicons": "3.0.0", 38 | "ng2-translate": "^5.0.0", 39 | "rxjs": "5.1.1", 40 | "sw-toolbox": "3.4.0", 41 | "zone.js": "^0.8.4" 42 | }, 43 | "devDependencies": { 44 | "@ionic/app-scripts": "1.3.0", 45 | "@ionic/cli-plugin-cordova": "0.0.12", 46 | "@ionic/cli-plugin-ionic-angular": "0.0.6", 47 | "typescript": "~2.2.1" 48 | }, 49 | "cordovaPlugins": [ 50 | "cordova-plugin-whitelist", 51 | "cordova-plugin-console", 52 | "cordova-plugin-statusbar", 53 | "cordova-plugin-device", 54 | "cordova-plugin-splashscreen", 55 | "ionic-plugin-keyboard", 56 | "cordova-sqlite-storage", 57 | "cordova-plugin-camera", 58 | "cordova-plugin-compat", 59 | { 60 | "id": "ionic-plugin-deeplinks", 61 | "locator": "ionic-plugin-deeplinks", 62 | "variables": { 63 | "URL_SCHEME": "vplanet", 64 | "DEEPLINK_SCHEME": "https", 65 | "DEEPLINK_HOST": "vplanetcommerce.com" 66 | } 67 | }, 68 | "cordova-plugin-email", 69 | "cordova-plugin-x-socialsharing", 70 | "cordova-plugin-apprate", 71 | "cordova-plugin-dialogs", 72 | "cordova-plugin-globalization", 73 | "cordova-plugin-tts", 74 | "cordova-plugin-google-analytics", 75 | "card.io.cordova.mobilesdk", 76 | "cordova-plugin-email-composer", 77 | { 78 | "id": "phonegap-plugin-push", 79 | "locator": "phonegap-plugin-push", 80 | "variables": { 81 | "SENDER_ID": "762350093850" 82 | } 83 | } 84 | ], 85 | "cordovaPlatforms": [ 86 | { 87 | "platform": "android", 88 | "version": "", 89 | "locator": "android" 90 | } 91 | ], 92 | "description": "vplanet-commerce: An Ionic project" 93 | } 94 | -------------------------------------------------------------------------------- /resources/android/icon/drawable-hdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/android/icon/drawable-hdpi-icon.png -------------------------------------------------------------------------------- /resources/android/icon/drawable-ldpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/android/icon/drawable-ldpi-icon.png -------------------------------------------------------------------------------- /resources/android/icon/drawable-mdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/android/icon/drawable-mdpi-icon.png -------------------------------------------------------------------------------- /resources/android/icon/drawable-xhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/android/icon/drawable-xhdpi-icon.png -------------------------------------------------------------------------------- /resources/android/icon/drawable-xxhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/android/icon/drawable-xxhdpi-icon.png -------------------------------------------------------------------------------- /resources/android/icon/drawable-xxxhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/android/icon/drawable-xxxhdpi-icon.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-hdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/android/splash/drawable-land-hdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-ldpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/android/splash/drawable-land-ldpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-mdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/android/splash/drawable-land-mdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-xhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/android/splash/drawable-land-xhdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-xxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/android/splash/drawable-land-xxhdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-xxxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/android/splash/drawable-land-xxxhdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-hdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/android/splash/drawable-port-hdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-ldpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/android/splash/drawable-port-ldpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-mdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/android/splash/drawable-port-mdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-xhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/android/splash/drawable-port-xhdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-xxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/android/splash/drawable-port-xxhdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-xxxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/android/splash/drawable-port-xxxhdpi-screen.png -------------------------------------------------------------------------------- /resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/icon.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/icon/icon-40.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/icon/icon-40@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/icon/icon-40@3x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/icon/icon-50.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/icon/icon-50@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/icon/icon-60.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/icon/icon-60@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/icon/icon-60@3x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/icon/icon-72.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/icon/icon-72@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/icon/icon-76.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/icon/icon-76@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/icon/icon-83.5@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/icon/icon-small.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/icon/icon-small@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/icon/icon-small@3x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/icon/icon.png -------------------------------------------------------------------------------- /resources/ios/icon/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/icon/icon@2x.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-568h@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/splash/Default-568h@2x~iphone.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-667h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/splash/Default-667h.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-736h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/splash/Default-736h.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Landscape-736h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/splash/Default-Landscape-736h.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Landscape@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/splash/Default-Landscape@2x~ipad.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Landscape~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/splash/Default-Landscape~ipad.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Portrait@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/splash/Default-Portrait@2x~ipad.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Portrait~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/splash/Default-Portrait~ipad.png -------------------------------------------------------------------------------- /resources/ios/splash/Default@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/splash/Default@2x~iphone.png -------------------------------------------------------------------------------- /resources/ios/splash/Default~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/ios/splash/Default~iphone.png -------------------------------------------------------------------------------- /resources/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/splash.png -------------------------------------------------------------------------------- /resources/wp8/icon/ApplicationIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/wp8/icon/ApplicationIcon.png -------------------------------------------------------------------------------- /resources/wp8/icon/Background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/wp8/icon/Background.png -------------------------------------------------------------------------------- /resources/wp8/splash/SplashScreenImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/resources/wp8/splash/SplashScreenImage.png -------------------------------------------------------------------------------- /src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, ViewChild } from '@angular/core'; 2 | import { TranslateService } from 'ng2-translate/ng2-translate'; 3 | import { Events, MenuController, AlertController, Nav, Platform } from 'ionic-angular'; 4 | import { Storage } from '@ionic/storage'; 5 | import { Deploy } from '@ionic/cloud-angular'; 6 | 7 | import { SplashScreen } from '@ionic-native/splash-screen'; 8 | import { Deeplinks } from '@ionic-native/deeplinks'; 9 | import { TextToSpeech } from '@ionic-native/text-to-speech'; 10 | import { AppRate } from '@ionic-native/app-rate'; 11 | import { GoogleAnalytics } from '@ionic-native/google-analytics'; 12 | import { Push, PushObject, PushOptions } from '@ionic-native/push'; 13 | 14 | import { HomePage } from '../pages/home/home'; 15 | import { CategoriesPage } from '../pages/categories/categories'; 16 | import { ProductsPage } from '../pages/products/products'; 17 | import { ProductDetailPage } from '../pages/product-detail/product-detail'; 18 | import { WishlistPage } from '../pages/wishlist/wishlist'; 19 | import { ShowcartPage } from '../pages/showcart/showcart'; 20 | import { AboutPage } from '../pages/about/about'; 21 | import { AccountPage } from '../pages/account/account'; 22 | import { LoginPage } from '../pages/login/login'; 23 | import { SignupPage } from '../pages/signup/signup'; 24 | import { SettingsPage } from '../pages/settings/settings'; 25 | import { WalkThroughPage } from '../pages/walkthrough/walkthrough'; 26 | import { SupportPage } from '../pages/support/support'; 27 | import { UserService } from '../providers/user-service'; 28 | 29 | export interface PageInterface { 30 | title: string; 31 | component: any; 32 | icon: string; 33 | logsOut?: boolean; 34 | index?: number; 35 | tabComponent?: any; 36 | } 37 | 38 | @Component({ 39 | templateUrl: 'app.template.html', 40 | providers: [TranslateService] 41 | }) 42 | 43 | export class vPlanetApp { 44 | // the root nav is a child of the root app component 45 | // @ViewChild(Nav) gets a reference to the app's root nav 46 | @ViewChild(Nav) nav: Nav; 47 | 48 | // List of pages that can be navigated to from the left menu 49 | // the left menu only works after login 50 | // the login page disables the left menu 51 | appPages: PageInterface[] = [ 52 | { title: 'home', component: HomePage, icon: 'home' }, 53 | { title: 'categories', component: CategoriesPage, index: 1, icon: 'list' }, 54 | { title: 'cart', component: ShowcartPage, index: 2, icon: 'cart' }, 55 | { title: 'wishlist', component: WishlistPage, index: 3, icon: 'heart' } 56 | ]; 57 | loggedInPages: PageInterface[] = [ 58 | { title: 'account', component: AccountPage, icon: 'person' }, 59 | { title: 'logout', component: HomePage, icon: 'log-out', logsOut: true } 60 | ]; 61 | loggedOutPages: PageInterface[] = [ 62 | { title: 'login', component: LoginPage, icon: 'log-in' }, 63 | { title: 'signup', component: SignupPage, icon: 'person-add' } 64 | ]; 65 | 66 | otherPages: PageInterface[] = [ 67 | { title: 'about', component: AboutPage, icon: 'cube' }, 68 | { title: 'settings', component: SettingsPage, icon: 'settings' }, 69 | { title: 'feedback', component: SupportPage, icon: 'mail-open' } 70 | ] 71 | rootPage: any; 72 | 73 | constructor( 74 | public events: Events, 75 | public userService: UserService, 76 | public menu: MenuController, 77 | public platform: Platform, 78 | public storage: Storage, 79 | public translate: TranslateService, 80 | public deploy: Deploy, 81 | public alertCtrl: AlertController, 82 | private splashScreen: SplashScreen, 83 | private deeplinks: Deeplinks, 84 | private appRate: AppRate, 85 | private ga: GoogleAnalytics, 86 | private push: Push, 87 | private tts: TextToSpeech 88 | ) { 89 | 90 | // Check if the user has already seen the walkthrough 91 | this.storage.get('hasSeenWalkThrough').then((hasSeenWalkThrough) => { 92 | if (hasSeenWalkThrough) { 93 | this.rootPage = HomePage; 94 | } else { 95 | this.rootPage = WalkThroughPage; 96 | } 97 | this.platformReady(); 98 | }) 99 | 100 | // decide which menu items should be hidden by current login status stored in local storage 101 | this.userService.isAuthenticated().then((isAuthenticated) => { 102 | this.enableMenu(isAuthenticated === true); 103 | }); 104 | 105 | this.listenToLoginEvents(); 106 | 107 | this.initializeTranslateServiceConfig(); 108 | 109 | // checks if new snapshot available 110 | if (this.platform.is('cordova')) { 111 | this.deploy.check().then((snapshotAvailable: boolean) => { 112 | if (snapshotAvailable) { 113 | let alert = this.alertCtrl.create({ 114 | title: 'Update Available !', 115 | message: 'Do you want to update the application now ?', 116 | buttons: [ 117 | { 118 | text: 'Cancel', 119 | role: 'cancel', 120 | handler: () => { 121 | console.log('Cancel clicked'); 122 | } 123 | }, 124 | { 125 | text: 'Update', 126 | handler: () => { 127 | this.deploy.download().then(() => { 128 | this.deploy.extract() 129 | }).then(() => { 130 | this.deploy.load() 131 | }); 132 | } 133 | } 134 | ] 135 | }); 136 | alert.present(); 137 | } 138 | }); 139 | } 140 | } 141 | 142 | initializeTranslateServiceConfig() { 143 | // var userLang = navigator.language.split('-')[0]; 144 | // userLang = /(en|es)/gi.test(userLang) ? userLang : 'en'; 145 | // this.translate.setDefaultLang(userLang); 146 | // this.translate.use(userLang); 147 | } 148 | 149 | openPage(page: PageInterface) { 150 | // the nav component was found using @ViewChild(Nav) 151 | // reset the nav to remove previous pages and only have this page 152 | // we wouldn't want the back button to show in this scenario 153 | if (page.index) { 154 | this.nav.setRoot(page.component, { tabIndex: page.index }); 155 | 156 | } else { 157 | this.nav.setRoot(page.component).catch(() => { 158 | console.log("Didn't set nav root"); 159 | }); 160 | } 161 | 162 | if (page.logsOut === true) { 163 | // Give the menu time to close before changing to logged out 164 | setTimeout(() => { 165 | this.userService.logout(); 166 | }, 1000); 167 | } 168 | } 169 | 170 | listenToLoginEvents() { 171 | this.events.subscribe('user:login', () => { 172 | this.enableMenu(true); 173 | }); 174 | 175 | this.events.subscribe('user:logout', () => { 176 | this.enableMenu(false); 177 | }); 178 | } 179 | 180 | enableMenu(loggedIn: boolean) { 181 | this.menu.enable(loggedIn, 'loggedInMenu'); 182 | this.menu.enable(!loggedIn, 'loggedOutMenu'); 183 | } 184 | 185 | platformReady() { 186 | // Call any initial plugins when ready 187 | this.platform.ready().then(() => { 188 | this.splashScreen.hide(); 189 | 190 | // Convenience to route with a given nav 191 | this.deeplinks.route({ 192 | '/about-us': AboutPage, 193 | '/categories': CategoriesPage, 194 | '/wishlist': WishlistPage, 195 | '/cart': ShowcartPage, 196 | '/login': LoginPage, 197 | '/settings': SettingsPage, 198 | '/categories/:categoryId':ProductsPage, 199 | '/products/:productId': ProductDetailPage 200 | }).subscribe((match) => { 201 | console.log('Successfully routed', match); 202 | }, (nomatch) => { 203 | console.warn('Unmatched Route', nomatch); 204 | }); 205 | 206 | 207 | if (this.platform.is('cordova')) { 208 | // App rate plugin 209 | this.appRate.preferences.customLocale = { 210 | title: "Rate vPlanet Commerce", 211 | message: "Would you mind taking a moment to rate it? It won’t take more than a minute. Thanks for your support!", 212 | cancelButtonLabel: "No, Thanks", 213 | laterButtonLabel: "Remind Me Later", 214 | rateButtonLabel: "Rate It Now" 215 | }; 216 | this.appRate.preferences.storeAppURL = { 217 | android: 'market://details?id=com.vplanetcommerce.demoionicpwa' 218 | }; 219 | this.appRate.promptForRating(false); 220 | 221 | // Initiate Push 222 | this.initPushNotification(); 223 | } 224 | 225 | // Google Analytics 226 | return this.ga.startTrackerWithId("UA-92660667-1") 227 | .then(() => { 228 | console.log('Google analytics is ready now'); 229 | return this.ga.enableUncaughtExceptionReporting(true) 230 | }).then((_success) => { 231 | console.log("startTrackerWithId success") 232 | }).catch((_error) => { 233 | console.log("enableUncaughtExceptionReporting", _error) 234 | }) 235 | }); 236 | } 237 | 238 | isActive(page: PageInterface) { 239 | if (this.nav.getActive() && this.nav.getActive().component === page.component) { 240 | return 'primary'; 241 | } 242 | return; 243 | } 244 | 245 | initPushNotification() { 246 | // to initialize push notifications 247 | 248 | const options: PushOptions = { 249 | android: { 250 | senderID: '12345679' 251 | }, 252 | ios: { 253 | alert: 'true', 254 | badge: true, 255 | sound: 'false' 256 | }, 257 | windows: {} 258 | }; 259 | 260 | const pushObject: PushObject = this.push.init(options); 261 | 262 | let self = this; 263 | 264 | pushObject.on('notification').subscribe((data: any) => { 265 | 266 | console.log('Received a notification', data) 267 | self.tts.speak({text: data.message, locale: 'en-IN', rate: 0.75}) 268 | .then(() => console.log('Success')) 269 | .catch((reason: any) => console.log(reason)); 270 | 271 | if (data.additionalData.foreground) { 272 | // if application open, show alert 273 | alert(data.message); 274 | } 275 | //if user NOT using app and push notification comes 276 | // for demo purpose for every push message we push to AboutPage 277 | // Although you can applu logic and according to API data 278 | // you can push to specific page 279 | self.nav.push(AboutPage, {message: data.message}); 280 | 281 | // Not working in Ionic Native 3 282 | // pushObject.finish(function() { 283 | // console.log("processing of push data is finished"); 284 | // }, function() { 285 | // console.log("something went wrong with push.finish for ID = " + data.additionalData.notId) 286 | // }, data.additionalData.notId); 287 | 288 | }); 289 | 290 | pushObject.on('registration').subscribe((registration: any) => console.log('Device registered', registration)); 291 | 292 | pushObject.on('error').subscribe(error => console.error('Error with Push plugin', error)); 293 | 294 | } 295 | } -------------------------------------------------------------------------------- /src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule, ErrorHandler } from '@angular/core'; 3 | import { APP_BASE_HREF } from '@angular/common'; 4 | import { IonicApp, IonicModule, IonicErrorHandler, DeepLinkConfig } from 'ionic-angular'; 5 | import { TranslateModule, TranslateLoader, TranslateStaticLoader } from 'ng2-translate/ng2-translate'; 6 | import { HttpModule, Http } from '@angular/http'; 7 | import { CloudSettings, CloudModule } from '@ionic/cloud-angular'; 8 | import { IonicStorageModule } from '@ionic/storage'; 9 | import { vPlanetApp } from './app.component'; 10 | 11 | import { AboutPage } from '../pages/about/about'; 12 | import { PopoverPage } from '../pages/popover/popover'; 13 | import { AccountPage } from '../pages/account/account'; 14 | import { LoginPage } from '../pages/login/login'; 15 | import { SignupPage } from '../pages/signup/signup'; 16 | import { WalkThroughPage } from '../pages/walkthrough/walkthrough'; 17 | import { HomePage } from '../pages/home/home'; 18 | import { CategoriesPage } from '../pages/categories/categories'; 19 | import { ProductsPage } from '../pages/products/products'; 20 | import { ProductDetailPage } from '../pages/product-detail/product-detail'; 21 | import { WishlistPage } from '../pages/wishlist/wishlist'; 22 | import { ShowcartPage } from '../pages/showcart/showcart'; 23 | import { CheckoutPage } from '../pages/checkout/checkout'; 24 | import { ProductsFilterPage } from '../pages/products-filter/products-filter'; 25 | import { SupportPage } from '../pages/support/support'; 26 | import { SettingsPage } from '../pages/settings/settings'; 27 | import { SearchPage } from '../pages/search/search'; 28 | import { UserService } from '../providers/user-service'; 29 | import { DataService } from '../providers/data-service'; 30 | import { OrdinalPipe } from '../filters/ordinal'; 31 | 32 | // 3rd party modules 33 | import { Ionic2RatingModule } from 'ionic2-rating'; 34 | 35 | import { SplashScreen } from '@ionic-native/splash-screen'; 36 | import { Deeplinks } from '@ionic-native/deeplinks'; 37 | import { TextToSpeech } from '@ionic-native/text-to-speech'; 38 | import { AppRate } from '@ionic-native/app-rate'; 39 | import { GoogleAnalytics } from '@ionic-native/google-analytics'; 40 | import { Camera } from '@ionic-native/camera'; 41 | import { CallNumber } from '@ionic-native/call-number'; 42 | import { SocialSharing } from '@ionic-native/social-sharing'; 43 | import { Push } from '@ionic-native/push'; 44 | 45 | export function createTranslateLoader(http: Http) { 46 | return new TranslateStaticLoader(http, './assets/i18n', '.json'); 47 | } 48 | 49 | // Configure database priority 50 | // export function provideStorage() { 51 | // return new Storage(['sqlite', 'indexeddb', 'localstorage'], { name: 'vplanet' }) 52 | // } 53 | 54 | const cloudSettings: CloudSettings = { 55 | 'core': { 56 | 'app_id': 'f8fec798' 57 | }, 58 | 'push': { 59 | 'sender_id': '762350093850', 60 | 'pluginConfig': { 61 | 'ios': { 62 | 'badge': true, 63 | 'sound': true 64 | }, 65 | 'android': { 66 | 'iconColor': '#343434' 67 | } 68 | } 69 | } 70 | }; 71 | 72 | // Deeplink Configuration 73 | export const deepLinkConfig: DeepLinkConfig = { 74 | links: [ 75 | { component: HomePage, name: 'Home Page', segment: '' }, 76 | { component: CategoriesPage, name: 'Categories Page', segment: 'categories' }, 77 | { component: ProductsPage, name: 'Categories Product Page', segment: 'categories/:categoryId' }, 78 | { component: ProductDetailPage, name: 'Product Details Page', segment: 'products/:productId' }, 79 | { component: WishlistPage, name: 'Wishlist Page', segment: 'wishlist' }, 80 | { component: ShowcartPage, name: 'Showcart Page', segment: 'cart' }, 81 | { component: SupportPage, name: 'Support Page', segment: 'feedback' }, 82 | { component: SettingsPage, name: 'About Page', segment: 'settings' }, 83 | { component: AboutPage, name: 'About Page', segment: 'about' }, 84 | { component: LoginPage, name: 'Login Page', segment: 'login' }, 85 | { component: SignupPage, name: 'Signup Page', segment: 'signup' }, 86 | { component: AccountPage, name: 'Account Page', segment: 'account' } 87 | ] 88 | }; 89 | 90 | @NgModule({ 91 | declarations: [ 92 | vPlanetApp, 93 | AboutPage, 94 | AccountPage, 95 | LoginPage, 96 | PopoverPage, 97 | SignupPage, 98 | WalkThroughPage, 99 | HomePage, 100 | CategoriesPage, 101 | ProductsPage, 102 | ProductsFilterPage, 103 | ProductDetailPage, 104 | SearchPage, 105 | WishlistPage, 106 | ShowcartPage, 107 | CheckoutPage, 108 | SettingsPage, 109 | SupportPage, 110 | OrdinalPipe, 111 | ], 112 | imports: [ 113 | BrowserModule, 114 | HttpModule, 115 | IonicModule.forRoot(vPlanetApp, {locationStrategy: 'hash'}, deepLinkConfig), 116 | Ionic2RatingModule, 117 | TranslateModule.forRoot({ 118 | provide: TranslateLoader, 119 | useFactory: createTranslateLoader, 120 | deps: [HttpModule] 121 | }), 122 | IonicStorageModule.forRoot(), 123 | // IonicStorageModule.forRoot({ useFactory: provideStorage }), 124 | CloudModule.forRoot(cloudSettings) 125 | ], 126 | bootstrap: [IonicApp], 127 | entryComponents: [ 128 | vPlanetApp, 129 | AboutPage, 130 | AccountPage, 131 | LoginPage, 132 | PopoverPage, 133 | SignupPage, 134 | WalkThroughPage, 135 | HomePage, 136 | CategoriesPage, 137 | ProductsPage, 138 | ProductsFilterPage, 139 | ProductDetailPage, 140 | SearchPage, 141 | WishlistPage, 142 | ShowcartPage, 143 | CheckoutPage, 144 | SettingsPage, 145 | SupportPage 146 | ], 147 | providers: [ 148 | SplashScreen, 149 | Deeplinks, 150 | TextToSpeech, 151 | AppRate, 152 | GoogleAnalytics, 153 | Camera, 154 | CallNumber, 155 | SocialSharing, 156 | Push, 157 | { provide: ErrorHandler, useClass: IonicErrorHandler}, 158 | { provide: APP_BASE_HREF, useValue: '/'}, 159 | UserService, 160 | DataService 161 | ] 162 | }) 163 | 164 | export class AppModule {} 165 | -------------------------------------------------------------------------------- /src/app/app.scss: -------------------------------------------------------------------------------- 1 | // http://ionicframework.com/docs/v2/theming/ 2 | 3 | 4 | // App Global Sass 5 | // -------------------------------------------------- 6 | // Put style rules here that you want to apply globally. These 7 | // styles are for the entire app and not just one component. 8 | // Additionally, this file can be also used as an entry point 9 | // to import other Sass files to be included in the output CSS. 10 | // 11 | // Shared Sass variables, which can be used to adjust Ionic's 12 | // default Sass variables, belong in "theme/variables.scss". 13 | // 14 | // To declare rules for a specific mode, create a child rule 15 | // for the .md, .ios, or .wp mode classes. The mode class is 16 | // automatically applied to the element in the app. 17 | 18 | .center { 19 | text-align: center; 20 | } -------------------------------------------------------------------------------- /src/app/app.template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{'menu' | translate}} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | {{'navigate' | translate}} 17 | 18 | 22 | 23 | 24 | 25 | 26 | {{'account' | translate}} 27 | 28 | 32 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | Menu 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | {{'navigate' | translate}} 55 | 56 | 60 | 61 | 62 | 63 | 64 | {{'account' | translate}} 65 | 66 | 70 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /src/app/main.ts: -------------------------------------------------------------------------------- 1 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 2 | 3 | import { AppModule } from './app.module'; 4 | 5 | platformBrowserDynamic().bootstrapModule(AppModule); 6 | -------------------------------------------------------------------------------- /src/assets/data/data.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | "schedule": [{ 4 | "date": "2047-05-17", 5 | "groups": [{ 6 | "time": "8:00 am", 7 | "sessions": [{ 8 | "name": "Breakfast", 9 | "timeStart": "8:00 am", 10 | "timeEnd": "9:00 am", 11 | "location": "Main hallway", 12 | "tracks": ["Food"] 13 | }] 14 | }, { 15 | "time": "9:00 am", 16 | "sessions": [{ 17 | "name": "Introduction to Appcamp.io", 18 | "location": "Room 2203", 19 | "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with Angular, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and Angular.", 20 | "speakerNames": ["Ellie Elephant"], 21 | "timeStart": "9:00 am", 22 | "timeEnd": "9:30 am", 23 | "tracks": ["Ionic"] 24 | }, { 25 | "name": "Getting started with Ionic", 26 | "location": "Room 2202", 27 | "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with Angular, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and Angular.", 28 | "speakerNames": ["Ted Turtle"], 29 | "timeStart": "9:30 am", 30 | "timeEnd": "9:45 am", 31 | "tracks": ["Ionic"] 32 | }, { 33 | "name": "Tooling for Ionic", 34 | "location": "Room 2201", 35 | "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with Angular, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and Angular.", 36 | "speakerNames": ["Rachel Rabbit"], 37 | "timeStart": "9:45 am", 38 | "timeEnd": "10:00 am", 39 | "tracks": ["Tooling"] 40 | }] 41 | }, { 42 | "time": "10:00 am", 43 | "sessions": [{ 44 | "name": "Migrating to Ionic2", 45 | "location": "Room 2201", 46 | "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with Angular, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and Angular.", 47 | "speakerNames": ["Eva Eagle", "Lionel Lion"], 48 | "timeStart": "10:00 am", 49 | "timeEnd": "10:15 am", 50 | "tracks": ["Ionic"] 51 | }, { 52 | "name": "The evolution of Ionicons", 53 | "location": "Room 2202", 54 | "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with Angular, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and Angular.", 55 | "speakerNames": ["Isabella Iguana", "Eva Eagle"], 56 | "timeStart": "10:15 am", 57 | "timeEnd": "10:30 am", 58 | "tracks": ["Design"] 59 | }, { 60 | "name": "Ionic.io Services", 61 | "location": "Room 2202", 62 | "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with Angular, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and Angular.", 63 | "speakerNames": ["Charlie Cheetah"], 64 | "timeStart": "10:30 am", 65 | "timeEnd": "11:00 am", 66 | "tracks": ["Services"] 67 | }] 68 | }, { 69 | "time": "11:00 am", 70 | "sessions": [{ 71 | "name": "Ionic Workshop", 72 | "location": "Room 2201", 73 | "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with Angular, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and Angular.", 74 | "speakerNames": ["Karl Kitten", "Lionel Lion"], 75 | "timeStart": "11:00 am", 76 | "timeEnd": "11:45 am", 77 | "tracks": ["Workshop"] 78 | }, { 79 | "name": "Community Interaction", 80 | "location": "Room 2203", 81 | "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with Angular, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and Angular.", 82 | "speakerNames": ["Lionel Lion", "Gino Giraffe"], 83 | "timeStart": "11:30 am", 84 | "timeEnd": "11:50 am", 85 | "tracks": ["Communication"] 86 | }, { 87 | "name": "Navigation in Ionic", 88 | "location": "Room 2203", 89 | "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with Angular, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and Angular.", 90 | "speakerNames": ["Rachel Rabbit", "Eva Eagle"], 91 | "timeStart": "11:30 am", 92 | "timeEnd": "12:00 pm", 93 | "tracks": ["Navigation"] 94 | }] 95 | }, { 96 | "time": "12:00 pm", 97 | "sessions": [{ 98 | "name": "Lunch", 99 | "location": "Auditorium", 100 | "description": "Come grab lunch with all the Ionic fanatics and talk all things Ionic", 101 | "timeStart": "12:00 pm", 102 | "timeEnd": "1:00 pm", 103 | "tracks": ["Food"] 104 | }] 105 | }, { 106 | "time": "1:00 pm", 107 | "sessions": [{ 108 | "name": "Ionic in the Enterprise", 109 | "location": "Room 2201", 110 | "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with Angular, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and Angular.", 111 | "speakerNames": ["Paul Puppy"], 112 | "timeStart": "1:00 pm", 113 | "timeEnd": "1:15 pm", 114 | "tracks": ["Communication"] 115 | }, { 116 | "name": "Ionic Worldwide", 117 | "location": "Room 2201", 118 | "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with Angular, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and Angular.", 119 | "speakerNames": ["Gino Giraffe"], 120 | "timeStart": "1:15 pm", 121 | "timeEnd": "1:30 pm", 122 | "tracks": ["Communication"] 123 | }, { 124 | "name": "The Ionic package service", 125 | "location": "Room 2203", 126 | "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with Angular, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and Angular.", 127 | "speakerNames": ["Molly Mouse", "Burt Bear"], 128 | "timeStart": "1:30 pm", 129 | "timeEnd": "2:00 pm", 130 | "tracks": ["Services"] 131 | }] 132 | }, { 133 | "time": "2:00 pm", 134 | "sessions": [{ 135 | "name": "Push Notifications in Ionic", 136 | "location": "Room 2202", 137 | "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with Angular, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and Angular.", 138 | "speakerNames": ["Burt Bear", "Charlie Cheetah"], 139 | "timeStart": "2:00 pm", 140 | "timeEnd": "2:30 pm", 141 | "tracks": ["Services"] 142 | }, { 143 | "name": "Ionic Documentation", 144 | "location": "Room 2202", 145 | "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with Angular, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and Angular.", 146 | "speakerNames": ["Donald Duck"], 147 | "timeStart": "2:30 pm", 148 | "timeEnd": "2:45 pm", 149 | "tracks": ["Documentation"] 150 | }, { 151 | "name": "UX planning in Ionic", 152 | "location": "Room 2203", 153 | "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with Angular, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and Angular.", 154 | "speakerNames": ["Isabella Iguana", "Ellie Elephant"], 155 | "timeStart": "2:45 pm", 156 | "timeEnd": "3:00 pm", 157 | "tracks": ["Design"] 158 | }] 159 | }, { 160 | "time": "3:00", 161 | "sessions": [{ 162 | "name": "Directives in Ionic", 163 | "location": "Room 2201", 164 | "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with Angular, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and Angular.", 165 | "speakerNames": ["Ted Turtle"], 166 | "timeStart": "3:00 pm", 167 | "timeEnd": "3:30 pm", 168 | "tracks": ["Angular"] 169 | }, { 170 | "name": "Mobile States", 171 | "location": "Room 2202", 172 | "description": "Mobile devices and browsers are now advanced enough that developers can build native-quality mobile apps using open web technologies like HTML5, Javascript, and CSS. In this talk, we’ll provide background on why and how we created Ionic, the design decisions made as we integrated Ionic with Angular, and the performance considerations for mobile platforms that our team had to overcome. We’ll also review new and upcoming Ionic features, and talk about the hidden powers and benefits of combining mobile app development and Angular.", 173 | "speakerNames": ["Rachel Rabbit"], 174 | "timeStart": "3:30 pm", 175 | "timeEnd": "3:45 pm", 176 | "tracks": ["Navigation"] 177 | }] 178 | }] 179 | }], 180 | 181 | 182 | "speakers": [{ 183 | "name": "Burt Bear", 184 | "profilePic": "assets/img/speakers/bear.jpg", 185 | "twitter": "ionicframework", 186 | "about": "Burt is a Bear.", 187 | "location": "Everywhere", 188 | "email": "burt@example.com", 189 | "phone": "+1-541-754-3010" 190 | }, { 191 | "name": "Charlie Cheetah", 192 | "profilePic": "assets/img/speakers/cheetah.jpg", 193 | "twitter": "ionicframework", 194 | "about": "Charlie is a Cheetah.", 195 | "location": "Everywhere", 196 | "email": "charlie@example.com", 197 | "phone": "+1-541-754-3010" 198 | }, { 199 | "name": "Donald Duck", 200 | "profilePic": "assets/img/speakers/duck.jpg", 201 | "twitter": "ionicframework", 202 | "about": "Donald is a Duck.", 203 | "location": "Everywhere", 204 | "email": "donald@example.com", 205 | "phone": "+1-541-754-3010" 206 | }, { 207 | "name": "Eva Eagle", 208 | "profilePic": "assets/img/speakers/eagle.jpg", 209 | "twitter": "ionicframework", 210 | "about": "Eva is an Eagle.", 211 | "location": "Everywhere", 212 | "email": "eva@example.com", 213 | "phone": "+1-541-754-3010" 214 | }, { 215 | "name": "Ellie Elephant", 216 | "profilePic": "assets/img/speakers/elephant.jpg", 217 | "twitter": "ionicframework", 218 | "about": "Ellie is an Elephant.", 219 | "location": "Everywhere", 220 | "email": "ellie@example.com", 221 | "phone": "+1-541-754-3010" 222 | }, { 223 | "name": "Gino Giraffe", 224 | "profilePic": "assets/img/speakers/giraffe.jpg", 225 | "twitter": "ionicframework", 226 | "about": "Gino is a Giraffe.", 227 | "location": "Everywhere", 228 | "email": "gino@example.com", 229 | "phone": "+1-541-754-3010" 230 | }, { 231 | "name": "Isabella Iguana", 232 | "profilePic": "assets/img/speakers/iguana.jpg", 233 | "twitter": "ionicframework", 234 | "about": "Isabella is an Iguana.", 235 | "location": "Everywhere", 236 | "email": "isabella@example.com", 237 | "phone": "+1-541-754-3010" 238 | }, { 239 | "name": "Karl Kitten", 240 | "profilePic": "assets/img/speakers/kitten.jpg", 241 | "twitter": "ionicframework", 242 | "about": "Karl is a Kitten.", 243 | "location": "Everywhere", 244 | "email": "karl@example.com", 245 | "phone": "+1-541-754-3010" 246 | }, { 247 | "name": "Lionel Lion", 248 | "profilePic": "assets/img/speakers/lion.jpg", 249 | "twitter": "ionicframework", 250 | "about": "Lionel is a Lion.", 251 | "location": "Everywhere", 252 | "email": "lionel@example.com", 253 | "phone": "+1-541-754-3010" 254 | }, { 255 | "name": "Molly Mouse", 256 | "profilePic": "assets/img/speakers/mouse.jpg", 257 | "twitter": "ionicframework", 258 | "about": "Molly is a Mouse.", 259 | "location": "Everywhere", 260 | "email": "molly@example.com", 261 | "phone": "+1-541-754-3010" 262 | }, { 263 | "name": "Paul Puppy", 264 | "profilePic": "assets/img/speakers/puppy.jpg", 265 | "twitter": "ionicframework", 266 | "about": "Paul is a Puppy.", 267 | "location": "Everywhere", 268 | "email": "paul@example.com", 269 | "phone": "+1-541-754-3010" 270 | }, { 271 | "name": "Rachel Rabbit", 272 | "profilePic": "assets/img/speakers/rabbit.jpg", 273 | "twitter": "ionicframework", 274 | "about": "Rachel is a Rabbit.", 275 | "location": "Everywhere", 276 | "email": "rachel@example.com", 277 | "phone": "+1-541-754-3010" 278 | }, { 279 | "name": "Ted Turtle", 280 | "profilePic": "assets/img/speakers/turtle.jpg", 281 | "twitter": "ionicframework", 282 | "about": "Ted is a Turtle.", 283 | "location": "Everywhere", 284 | "email": "ted@example.com", 285 | "phone": "+1-541-754-3010" 286 | }], 287 | 288 | 289 | "map": [{ 290 | "name": "Monona Terrace Convention Center", 291 | "lat": 43.071584, 292 | "lng": -89.380120, 293 | "center": true 294 | }, { 295 | "name": "Ionic HQ", 296 | "lat": 43.074395, 297 | "lng": -89.381056 298 | }, { 299 | "name": "Afterparty - Brocach Irish Pub", 300 | "lat": 43.07336, 301 | "lng": -89.38335 302 | }] 303 | 304 | } 305 | -------------------------------------------------------------------------------- /src/assets/i18n/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "menu": "Menu", 3 | "home": "Home", 4 | "navigate":"Navigate", 5 | "categories":"Categories", 6 | "cart":"Shopping Cart", 7 | "wishlist":"Wishlist", 8 | "about": "About", 9 | "categories":"Categories", 10 | "login": "Login", 11 | "logout":"Logout", 12 | "account":"Account", 13 | "signup":"Signup", 14 | "popular":"Popular Products", 15 | "settings":"Settings", 16 | "feedback":"Feedback" 17 | } 18 | -------------------------------------------------------------------------------- /src/assets/i18n/es.json: -------------------------------------------------------------------------------- 1 | { 2 | "menu": "Menú", 3 | "home": "Casa", 4 | "navigate":"Navegar", 5 | "categories":"Categorías", 6 | "cart":"Carrito de compras", 7 | "wishlist":"Lista de deseos", 8 | "about": "Acerca de", 9 | "categories":"Categorías", 10 | "login": "Iniciar sesión", 11 | "logout":"Cerrar sesión", 12 | "account":"Cuenta", 13 | "signup":"Regístrate", 14 | "popular":"Productos Populares", 15 | "settings":"Ajustes", 16 | "feedback":"Realimentación" 17 | } 18 | -------------------------------------------------------------------------------- /src/assets/icon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/icon/favicon.ico -------------------------------------------------------------------------------- /src/assets/img/appicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/appicon.png -------------------------------------------------------------------------------- /src/assets/img/appicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 11 | 12 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/assets/img/banner-1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/banner-1.webp -------------------------------------------------------------------------------- /src/assets/img/banner-2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/banner-2.webp -------------------------------------------------------------------------------- /src/assets/img/banner-3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/banner-3.webp -------------------------------------------------------------------------------- /src/assets/img/cat-1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/cat-1.webp -------------------------------------------------------------------------------- /src/assets/img/cat-2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/cat-2.webp -------------------------------------------------------------------------------- /src/assets/img/cat-3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/cat-3.webp -------------------------------------------------------------------------------- /src/assets/img/cat-4.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/cat-4.webp -------------------------------------------------------------------------------- /src/assets/img/ica-slidebox-img-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/ica-slidebox-img-1.png -------------------------------------------------------------------------------- /src/assets/img/ica-slidebox-img-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/ica-slidebox-img-2.png -------------------------------------------------------------------------------- /src/assets/img/ica-slidebox-img-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/ica-slidebox-img-3.png -------------------------------------------------------------------------------- /src/assets/img/ica-slidebox-img-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/ica-slidebox-img-4.png -------------------------------------------------------------------------------- /src/assets/img/ico-database.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/ico-database.png -------------------------------------------------------------------------------- /src/assets/img/ionic-logo-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 13 | 16 | 17 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/assets/img/products/alphabet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/products/alphabet.png -------------------------------------------------------------------------------- /src/assets/img/products/birthday.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/products/birthday.webp -------------------------------------------------------------------------------- /src/assets/img/products/christmas.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/products/christmas.webp -------------------------------------------------------------------------------- /src/assets/img/products/clip-heart.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/products/clip-heart.jpg -------------------------------------------------------------------------------- /src/assets/img/products/clips.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/products/clips.jpg -------------------------------------------------------------------------------- /src/assets/img/products/enamel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/products/enamel.png -------------------------------------------------------------------------------- /src/assets/img/pwa-slidebox-img-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/pwa-slidebox-img-3.png -------------------------------------------------------------------------------- /src/assets/img/ring.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/img/speakers/bear.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/speakers/bear.jpg -------------------------------------------------------------------------------- /src/assets/img/speakers/cheetah.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/speakers/cheetah.jpg -------------------------------------------------------------------------------- /src/assets/img/speakers/duck.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/speakers/duck.jpg -------------------------------------------------------------------------------- /src/assets/img/speakers/eagle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/speakers/eagle.jpg -------------------------------------------------------------------------------- /src/assets/img/speakers/elephant.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/speakers/elephant.jpg -------------------------------------------------------------------------------- /src/assets/img/speakers/giraffe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/speakers/giraffe.jpg -------------------------------------------------------------------------------- /src/assets/img/speakers/iguana.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/speakers/iguana.jpg -------------------------------------------------------------------------------- /src/assets/img/speakers/kitten.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/speakers/kitten.jpg -------------------------------------------------------------------------------- /src/assets/img/speakers/lion.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/speakers/lion.jpg -------------------------------------------------------------------------------- /src/assets/img/speakers/mouse.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/speakers/mouse.jpg -------------------------------------------------------------------------------- /src/assets/img/speakers/puppy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/speakers/puppy.jpg -------------------------------------------------------------------------------- /src/assets/img/speakers/rabbit.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/speakers/rabbit.jpg -------------------------------------------------------------------------------- /src/assets/img/speakers/turtle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/speakers/turtle.jpg -------------------------------------------------------------------------------- /src/assets/img/vPlanetCommerce.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/assets/img/vPlanetCommerce.jpg -------------------------------------------------------------------------------- /src/declarations.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Declaration files are how the Typescript compiler knows about the type information(or shape) of an object. 3 | They're what make intellisense work and make Typescript know all about your code. 4 | 5 | A wildcard module is declared below to allow third party libraries to be used in an app even if they don't 6 | provide their own type declarations. 7 | 8 | To learn more about using third party libraries in an Ionic app, check out the docs here: 9 | http://ionicframework.com/docs/v2/resources/third-party-libs/ 10 | 11 | For more info on type definition files, check out the Typescript docs here: 12 | https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html 13 | */ 14 | declare module '*'; -------------------------------------------------------------------------------- /src/filters/ordinal.ts: -------------------------------------------------------------------------------- 1 | import { Pipe, PipeTransform } from '@angular/core'; 2 | 3 | @Pipe({name: 'ordinal'}) 4 | 5 | export class OrdinalPipe implements PipeTransform { 6 | transform(value: number, args: string[]): any { 7 | 8 | if (!value) return value; 9 | 10 | if(isNaN(value) || value < 1) { 11 | return value; 12 | } else { 13 | var lastDigit = value % 10; 14 | 15 | if(lastDigit === 1) { 16 | return value + 'st' 17 | } else if(lastDigit === 2) { 18 | return value + 'nd' 19 | } else if (lastDigit === 3) { 20 | return value + 'rd' 21 | } else if (lastDigit > 3) { 22 | return value + 'th' 23 | } 24 | 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | vPlanet Commerce 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vPlanet Commerce", 3 | "short_name": "vPlanet", 4 | "start_url": "index.html", 5 | "display": "standalone", 6 | "icons": [{ 7 | "src": "assets/imgs/logo.png", 8 | "sizes": "512x512", 9 | "type": "image/png" 10 | }], 11 | "background_color": "#4e8ef7", 12 | "theme_color": "#4e8ef7" 13 | } -------------------------------------------------------------------------------- /src/pages/about/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | About 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | 23 | 24 |
25 | 26 |
27 |
28 |

vPlanet Commerce

29 | 30 | 31 | 32 | 33 | Date 34 | 35 | 36 | 37 | 38 |

39 | vPlanet Commerce is a hosted m-commerce solution in Cloud for online merchants. vPlanet Commerce lowers the barriers to entry into online business for start up and small business and at the same time provide the scalability of enterprise solution while they grow into bigger businesses. 40 |

41 |
42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 61 | 62 |
63 | -------------------------------------------------------------------------------- /src/pages/about/about.scss: -------------------------------------------------------------------------------- 1 | .about-info p { 2 | color: #697072; 3 | text-align: left; 4 | font-size:20px 5 | } 6 | 7 | .about-info ion-icon { 8 | color: color($colors, primary); 9 | width: 20px; 10 | } 11 | 12 | .md, 13 | .wp { 14 | .about-info [text-right] { 15 | margin-right: 0; 16 | } 17 | } 18 | 19 | .ios .about-info { 20 | text-align: center; 21 | } 22 | 23 | .ios .about-info ion-icon { 24 | width: auto; 25 | margin-right: 10px; 26 | } 27 | -------------------------------------------------------------------------------- /src/pages/about/about.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { PopoverController } from 'ionic-angular'; 3 | import { PopoverPage } from '../popover/popover'; 4 | import { CallNumber } from '@ionic-native/call-number'; 5 | import { SocialSharing } from '@ionic-native/social-sharing'; 6 | 7 | @Component({ 8 | selector: 'page-about', 9 | templateUrl: 'about.html' 10 | }) 11 | export class AboutPage { 12 | conferenceDate = '2047-05-17'; 13 | 14 | constructor( 15 | public popoverCtrl: PopoverController, 16 | private call: CallNumber, 17 | private socialSharing: SocialSharing) { } 18 | 19 | presentPopover(event: Event) { 20 | let popover = this.popoverCtrl.create(PopoverPage); 21 | popover.present({ ev: event }); 22 | } 23 | 24 | callNow() { 25 | this.call.callNumber("+919989887765", true) 26 | .then(() => console.log('Launched dialer!')) 27 | .catch(() => console.log('Error launching dialer')); 28 | } 29 | 30 | shareViaFacebook() { 31 | // recommended to use canShareVia before using shareVia 32 | this.socialSharing.canShareVia("facebook", "Veloice:Intelligent Business Telephony", "Real time Voice", "http://veloice.com/images/banner.png", "http://veloice.com").then(() => { 33 | this.socialSharing.shareViaFacebook("Veloice:Intelligent Business Telephony", "http://veloice.com/images/banner.png", "http://veloice.com"); 34 | }).catch(() => { 35 | alert("Cannot share on Facebook"); 36 | }); 37 | } 38 | 39 | shareViaWhatsApp() { 40 | // recommended to use canShareVia before using shareVia 41 | this.socialSharing.canShareVia("whatsapp", "Veloice:Intelligent Business Telephony", "Real time Voice", "http://veloice.com/images/banner.png", "http://veloice.com").then(() => { 42 | this.socialSharing.shareViaWhatsApp("Veloice:Intelligent Business Telephony", "http://veloice.com/images/banner.png", "http://veloice.com"); 43 | }).catch(() => { 44 | alert("Cannot share on Whatsapp"); 45 | }); 46 | } 47 | 48 | shareViaEmail() { 49 | // recommended to use canShareVia before using shareVia 50 | this.socialSharing.canShareViaEmail().then(() => { 51 | this.socialSharing.shareViaEmail( 52 | 'Veloice:Intelligent Business Telephony', // Message 53 | 'Veloice', // Email Subject 54 | ['toperson@xyz.com', 'tosecond@xyz.com'], // TO: must be null or an array 55 | ['cc@xyz.com'], // CC: must be null or an array 56 | null, // BCC: must be null or an array 57 | ['http://veloice.com/images/banner.png'] // FILES: can be null, a string, or an array 58 | ); 59 | }).catch(() => { 60 | alert("Cannot share on Email"); 61 | }); 62 | } 63 | 64 | 65 | share() { 66 | this.socialSharing.share("Veloice:Intelligent Business Telephony", "Real time Voice", "http://veloice.com/images/banner.png", "http://veloice.com"); 67 | } 68 | 69 | 70 | updateFeed(refresher: any) { 71 | setTimeout(() => { 72 | console.log('Async operation has ended'); 73 | refresher.complete(); 74 | }, 2000); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/pages/account/account.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | Account 7 | 8 | 9 | 10 | 11 | Profile 12 | 13 | 14 | Orders 15 | 16 | 17 | Wallet 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 |
27 | profileImage 28 |

{{username}}

29 | 30 | 31 | 32 | 33 | 34 | 35 |
36 | 37 |
38 | // Order List data to be shown here 39 |
40 | 41 |
42 | // Wallet statement and transaction here. 43 |
44 | 45 |
46 |
47 | -------------------------------------------------------------------------------- /src/pages/account/account.scss: -------------------------------------------------------------------------------- 1 | page-account img { 2 | max-width: 140px; 3 | border-radius: 50%; 4 | } 5 | -------------------------------------------------------------------------------- /src/pages/account/account.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | import { AlertController, NavController } from 'ionic-angular'; 4 | 5 | import { LoginPage } from '../login/login'; 6 | import { SupportPage } from '../support/support'; 7 | import { UserService } from '../../providers/user-service'; 8 | 9 | import { User } from '@ionic/cloud-angular'; 10 | import { Camera } from '@ionic-native/camera'; 11 | 12 | @Component({ 13 | selector: 'page-account', 14 | templateUrl: 'account.html' 15 | }) 16 | export class AccountPage { 17 | birthdate: string; 18 | account: string = "profile"; 19 | base64Image: any = "http://www.gravatar.com/avatar?d=mm&s=140"; 20 | 21 | constructor( 22 | public alertCtrl: AlertController, 23 | public nav: NavController, 24 | public user: User, 25 | public userService: UserService, 26 | public camera: Camera) { 27 | } 28 | 29 | ngAfterViewInit() { 30 | 31 | } 32 | 33 | updatePicture() { 34 | let options = { 35 | quality:100, // Specify quality in number 0-100 36 | destinationType: this.camera.DestinationType.DATA_URL, 37 | sourceType: this.camera.PictureSourceType.CAMERA, // camera or gallery 38 | allowEdit: true, 39 | encodingType: this.camera.EncodingType.JPEG, 40 | targetWidth: 100, 41 | targetHeight: 100, 42 | saveToPhotoAlbum: true, 43 | correctOrientation:true, 44 | cameraDirection: 0// BACK 0, FRONT 1 45 | }; 46 | 47 | this.camera.getPicture(options).then((imageData) => { 48 | console.log(imageData); 49 | this.base64Image = 'data:image/jpeg;base64,' + imageData; 50 | 51 | }, (err) => { 52 | // Handle error 53 | }); 54 | console.log('Clicked to update picture'); 55 | } 56 | 57 | // Present an alert for adding date of birth 58 | // clicking OK will update the DOB 59 | // clicking Cancel will close the alert and do nothing 60 | addDOB() { 61 | let alert = this.alertCtrl.create({ 62 | title: 'Add Date of Birth', 63 | buttons: [ 64 | 'Cancel' 65 | ] 66 | }); 67 | alert.addInput({ 68 | name: 'birthdate', 69 | value: this.birthdate, 70 | placeholder: 'birthdate', 71 | type: 'date' 72 | }); 73 | alert.addButton({ 74 | text: 'Ok', 75 | handler: (data: any) => { 76 | this.user.set('birthdate', data.birthdate); 77 | this.user.save(); 78 | } 79 | }); 80 | 81 | alert.present(); 82 | } 83 | 84 | changePassword() { 85 | console.log('Clicked to change password'); 86 | } 87 | 88 | logout() { 89 | this.userService.logout(); 90 | this.nav.setRoot(LoginPage); 91 | } 92 | 93 | support() { 94 | this.nav.push(SupportPage); 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /src/pages/categories/categories.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | {{ 'categories' | translate }} 7 | 8 | 9 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | Fetching Categories .... 25 | 26 | 27 | 28 | {{cat.name}} 29 | 30 | 31 | 32 | 33 | 34 |

{{subCat.name}}

35 |

{{subCat.description}}

36 | 37 |
38 | 39 |
40 | 41 |
42 | -------------------------------------------------------------------------------- /src/pages/categories/categories.scss: -------------------------------------------------------------------------------- 1 | .categories { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /src/pages/categories/categories.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { NavController, PopoverController } from 'ionic-angular'; 3 | import { ShowcartPage } from '../showcart/showcart'; 4 | import { SearchPage } from '../search/search'; 5 | import { ProductsPage } from '../products/products'; 6 | import { DataService } from '../../providers/data-service'; 7 | 8 | @Component({ 9 | templateUrl: 'categories.html', 10 | }) 11 | export class CategoriesPage { 12 | 13 | public categoryList: Array; 14 | 15 | constructor(public navCtrl: NavController, 16 | public popoverCtrl: PopoverController, 17 | public data: DataService) { 18 | 19 | this.data.getCategories().subscribe((data) => { 20 | for (var i = 0; i < data.categories.length; ++i) { 21 | let p_id = data.categories[i].parent_id; 22 | for (var j = 0; j < data.parent_categories.length; ++j) { 23 | if(data.parent_categories[j].id == p_id) 24 | { 25 | data.parent_categories[j].child.push(data.categories[i]) 26 | } 27 | } 28 | } 29 | this.categoryList = data.parent_categories; 30 | }, (error) => { 31 | console.error(error); 32 | }); 33 | } 34 | 35 | goToCart() { 36 | this.navCtrl.push(ShowcartPage); 37 | } 38 | 39 | goToProducts(id:String) { 40 | // go to the ProductsPage 41 | // and pass in the category id 42 | this.navCtrl.push(ProductsPage, id); 43 | } 44 | 45 | search() { 46 | this.navCtrl.push(SearchPage); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/pages/checkout/checkout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Checkout 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | Credit / Debit / ATM Card 16 | 17 | 18 | 19 | 20 | Net Banking 21 | 22 | 23 | 24 | 25 | Cash on Delivery 26 | 27 | 28 | 29 | 30 | EMI (Easy Installments) 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |

PRICE DETAILS

40 |
41 | 54 | 55 |
56 |
57 | 58 |
59 | -------------------------------------------------------------------------------- /src/pages/checkout/checkout.scss: -------------------------------------------------------------------------------- 1 | .checkout { 2 | 3 | .scroll-content { 4 | margin-top: 56px !important; 5 | padding-left: 0 !important; 6 | padding-right: 0 !important; 7 | } 8 | 9 | .card-ios{ 10 | margin-right: 0px; 11 | margin-left: 0px; 12 | width:100% !important; 13 | } 14 | 15 | .card-content-md{ 16 | padding-left: 0px; 17 | padding-right: 0px; 18 | padding-bottom: 0px; 19 | } 20 | 21 | .card-md{ 22 | margin-right: 0px; 23 | margin-left: 0px; 24 | width:100% !important; 25 | } 26 | 27 | .item-md{ 28 | border-bottom: 1px solid #e0e0e0; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/pages/checkout/checkout.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { NavController } from 'ionic-angular'; 3 | 4 | /* 5 | Generated class for the CheckoutPage page. 6 | 7 | See http://ionicframework.com/docs/v2/components/#navigation for more info on 8 | Ionic pages and navigation. 9 | */ 10 | @Component({ 11 | templateUrl: 'checkout.html', 12 | }) 13 | export class CheckoutPage { 14 | 15 | constructor(private navCtrl: NavController) { 16 | 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/pages/home/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | vPlanet Commerce 7 | 8 | 9 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |

{{ 'categories' | translate }}

29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |

{{ 'popular' | translate }}

45 | 46 |
47 | 48 |
49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | {{product.productName}} 58 | 59 | 60 | 61 | {{product.price | currency }}   {{product.listPrice | currency}} 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 |
71 | -------------------------------------------------------------------------------- /src/pages/home/home.scss: -------------------------------------------------------------------------------- 1 | .home { 2 | ion-scroll { 3 | white-space: nowrap; 4 | height: 150px; 5 | } 6 | 7 | ion-scroll img { 8 | height: 140px; 9 | width: inherit; 10 | margin: 10px; 11 | display: inline-block; 12 | } 13 | 14 | .card-title-ios, .card-title-md { 15 | white-space: nowrap; 16 | overflow: hidden; 17 | text-overflow: ellipsis; 18 | font-size: 18px; 19 | padding: 8px 10px 8px 10px; 20 | } 21 | 22 | .discount { 23 | font-size: 12px; 24 | text-decoration: line-through; 25 | } 26 | 27 | .img-center { 28 | margin-left: 46%; 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /src/pages/home/home.ts: -------------------------------------------------------------------------------- 1 | import { Component, ViewChild } from '@angular/core'; 2 | 3 | import { NavController, MenuController, Slides,Platform } from 'ionic-angular'; 4 | 5 | import { ProductsPage } from '../products/products'; 6 | import { ShowcartPage } from '../showcart/showcart'; 7 | import { SearchPage } from '../search/search'; 8 | 9 | import { UserService } from '../../providers/user-service'; 10 | import { DataService } from '../../providers/data-service'; 11 | import { GoogleAnalytics } from '@ionic-native/google-analytics'; 12 | 13 | @Component({ 14 | templateUrl: 'home.html' 15 | }) 16 | 17 | export class HomePage { 18 | 19 | // products: Product; 20 | @ViewChild('adSlider') slider: Slides; 21 | 22 | products: Array; 23 | banners: String[]; 24 | 25 | constructor( 26 | public userService: UserService, 27 | public navCtrl: NavController, 28 | public menu: MenuController, 29 | public data: DataService, 30 | public platform: Platform, 31 | private ga: GoogleAnalytics) { 32 | 33 | this.platform.ready().then(() => { 34 | this.ga.trackView("Home Page"); 35 | }); 36 | 37 | console.log(userService.userData) 38 | 39 | this.banners = [ 40 | 'assets/img/banner-1.webp', 41 | 'assets/img/banner-2.webp', 42 | 'assets/img/banner-3.webp' 43 | ] 44 | 45 | this.data.getPopularProducts().subscribe((popular) => { 46 | this.products = popular; 47 | console.log(this.products) 48 | }, (error) => { 49 | console.error(error); 50 | }); 51 | 52 | } 53 | 54 | // arrayToMatrix(list, lengthSubArray) { 55 | // let matrix = [], i, k; 56 | 57 | // for (i = 0, k = -1; i < list.length; i++) { 58 | // if (i % lengthSubArray === 0) { 59 | // k++; 60 | // matrix[k] = []; 61 | // } 62 | // matrix[k].push(list[i]); 63 | // } 64 | 65 | // return matrix; 66 | // } 67 | 68 | trackEvent() { 69 | let active = this.slider.getActiveIndex(); 70 | this.platform.ready().then(() => { 71 | this.ga.trackEvent("Slider", "Slider-Changed", "Label", active); 72 | }); 73 | } 74 | 75 | goToProducts(productData:Object) { 76 | // go to the product detail page 77 | // and pass in the product data 78 | // this.navCtrl.push(ProductsPage, sessionData); 79 | this.navCtrl.push(ProductsPage, productData); 80 | } 81 | 82 | goToCart() { 83 | this.navCtrl.push(ShowcartPage).catch(()=> console.log('should I stay or should I go now')); 84 | } 85 | 86 | search() { 87 | this.navCtrl.push(SearchPage); 88 | } 89 | 90 | } 91 | -------------------------------------------------------------------------------- /src/pages/login/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | Login 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | Email 16 | 18 | 19 | 20 |

21 | Email is required 22 |

23 | 24 | 25 | Password 26 | 27 | 28 | 29 |

30 | Password is required 31 |

32 |
33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 |
43 | 44 |
45 | -------------------------------------------------------------------------------- /src/pages/login/login.scss: -------------------------------------------------------------------------------- 1 | // Styles for all of the user pages: 2 | // Login, Signup, Support 3 | 4 | page-user { 5 | .logo { 6 | padding: 20px 0; 7 | min-height: 200px; 8 | text-align: center; 9 | 10 | img { 11 | max-width: 150px; 12 | } 13 | } 14 | 15 | .list { 16 | margin-bottom: 0; 17 | } 18 | } -------------------------------------------------------------------------------- /src/pages/login/login.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { NgForm } from '@angular/forms'; 3 | import { NavController, LoadingController, ToastController, Events } from 'ionic-angular'; 4 | import { SignupPage } from '../signup/signup'; 5 | import { HomePage } from '../home/home'; 6 | 7 | import { Auth, IDetailedError, Push, PushToken } from '@ionic/cloud-angular'; 8 | import { UserService } from '../../providers/user-service'; 9 | 10 | @Component({ 11 | selector: 'page-user', 12 | templateUrl: 'login.html' 13 | }) 14 | export class LoginPage { 15 | login: {email?: string, password?: string} = {}; 16 | 17 | submitted = false; 18 | 19 | constructor(public navCtrl: NavController, 20 | public loadingCtrl: LoadingController, 21 | public auth: Auth, 22 | public userService: UserService, 23 | public toastCtrl: ToastController, 24 | public events: Events, 25 | public push: Push) { } 26 | 27 | onLogin(form: NgForm) { 28 | this.submitted = true; 29 | 30 | if (form.valid) { 31 | // start Loader 32 | let loading = this.loadingCtrl.create({ 33 | content: "Login wait...", 34 | duration: 20 35 | }); 36 | loading.present(); 37 | 38 | this.auth.login('basic', this.login).then((result) => { 39 | // user is now registered 40 | this.navCtrl.setRoot(HomePage); 41 | this.events.publish('user:login'); 42 | loading.dismiss(); 43 | this.showToast(undefined); 44 | // Push Notification register 45 | this.push.register().then((data: PushToken) => { 46 | return this.push.saveToken(data); 47 | }).then((data: PushToken) => { 48 | console.log('Token saved:', data.token); 49 | }); 50 | }, (err: IDetailedError) => { 51 | console.log(err); 52 | loading.dismiss(); 53 | this.showToast(err) 54 | }); 55 | } 56 | } 57 | 58 | showToast(response_message:any) { 59 | let toast = this.toastCtrl.create({ 60 | message: (response_message ? response_message : "Log In Successfully"), 61 | duration: 1500 62 | }); 63 | toast.present(); 64 | } 65 | 66 | onSignup() { 67 | this.navCtrl.push(SignupPage); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/pages/popover/popover.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { ViewController, NavController, App, ModalController } from 'ionic-angular'; 3 | 4 | import { SupportPage } from '../support/support'; 5 | import { SettingsPage } from '../settings/settings'; 6 | 7 | 8 | @Component({ 9 | template: ` 10 | 11 | 12 | 13 | 14 | 15 | ` 16 | }) 17 | export class PopoverPage { 18 | 19 | classes: any; 20 | 21 | constructor( 22 | public viewCtrl: ViewController, 23 | public navCtrl: NavController, 24 | public app: App, 25 | public modalCtrl: ModalController 26 | ) { 27 | 28 | this.classes = { 29 | 'SettingsPage': SettingsPage, 30 | 'SupportPage': SupportPage 31 | } 32 | 33 | } 34 | 35 | goToPage(page:any) { 36 | // Navigting from Overlay Components 37 | // https://ionicframework.com/docs/v2/api/navigation/NavController/ 38 | // If you simply push it will freeze the UI 39 | this.viewCtrl.dismiss(); 40 | this.app.getRootNav().push(this.classes[page]); 41 | } 42 | 43 | close(url: string) { 44 | window.open(url, '_blank'); 45 | this.viewCtrl.dismiss(); 46 | } 47 | } -------------------------------------------------------------------------------- /src/pages/product-detail/product-detail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Product Detail 4 | 7 | 8 | 9 | 12 | 13 | 14 | 17 | 18 | 19 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |

Lenevo Vibe K5 Note

42 | Special Price 43 |

{{ 13499 | currency: 'INR' }}

44 | 4.1 45 | 340 ratings, 58 reviews 46 |
47 | 48 | 49 | Share 50 | 51 | 52 | Wishlist 53 | 54 | 55 |
56 | 57 | 58 | 59 | 60 | 61 | Details 62 | 63 |

Note

64 |
    65 | This Phone is Eligible for Jio Happy New Year Offer, to Avail this Offer Please Reach Out to your Nearest Brand Outlet. For more information please refer to http://dl. 66 |
67 |

Highlights

68 |
  • 4 GB RAM|32 GB ROM|Expandable Upto 128 GB
  • 69 |
  • 5.5 inch Full HD Display
  • 70 |
  • 13MP Primary Camera | 8MP Front
  • 71 |
    72 |
    73 | 74 | 75 | 76 | 77 | 78 | 79 | Ratings & Reviews 80 | 81 | 82 | 83 | 4.1 84 | 85 |
    86 | 385161 ratings 87 | , 20137 reviews 88 |
    89 | 90 | 91 | 92 |
    93 |
    94 |
    95 | 96 |
    97 | 98 | 99 | 100 | 101 | 102 | 103 | 106 | 107 | 108 | 109 | 110 | 113 | 114 | 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /src/pages/product-detail/product-detail.scss: -------------------------------------------------------------------------------- 1 | .product-detail { 2 | .content-md { 3 | background-color: #f4f4f4; 4 | } 5 | ion-header::after { 6 | background: transparent; 7 | background-image: none; 8 | } 9 | .toolbar { 10 | .toolbar-background{ 11 | background: transparent; 12 | } 13 | } 14 | 15 | scroll-content { 16 | margin-top: 5px !important; 17 | } 18 | 19 | .card-ios{ 20 | margin-right: 0px; 21 | margin-left: 0px; 22 | width:100% !important; 23 | } 24 | 25 | .card-md{ 26 | margin-right: 0px; 27 | margin-left: 0px; 28 | width:100% !important; 29 | } 30 | 31 | ion-col[width-50] { 32 | padding-top: 10px; 33 | text-align: center; 34 | max-width: 50%; 35 | color:#616161; 36 | font-size: large; 37 | border-right: 2px solid #f1f3f6; 38 | } 39 | 40 | 41 | ion-row { 42 | border-top: 1px solid #f1f3f6; 43 | } 44 | 45 | .detail{ 46 | font-size: large; 47 | border-top: 0; 48 | border-bottom: 1px solid #f1f3f6; 49 | } 50 | 51 | small{ 52 | color: #41b283; 53 | font-size: 80%; 54 | } 55 | 56 | 57 | /* rating-start-css*/ 58 | 59 | ul { 60 | padding: 0px; 61 | text-align:center; 62 | &.rating li { 63 | padding: 5px 10px; 64 | background: none; 65 | color: #ffb400; 66 | 67 | ion-icon { 68 | font-size: 35px; 69 | } 70 | } 71 | } 72 | /*Ends*/ 73 | 74 | 75 | } -------------------------------------------------------------------------------- /src/pages/product-detail/product-detail.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { NavController, PopoverController, ToastController, NavParams } from 'ionic-angular'; 3 | import { ShowcartPage } from '../showcart/showcart'; 4 | import { PopoverPage } from '../popover/popover'; 5 | import { SearchPage } from '../search/search'; 6 | import { CheckoutPage } from '../checkout/checkout'; 7 | 8 | @Component({ 9 | templateUrl: 'product-detail.html', 10 | }) 11 | export class ProductDetailPage { 12 | 13 | productId: number; 14 | 15 | constructor( 16 | public navCtrl: NavController, 17 | public popoverCtrl: PopoverController, 18 | public toastCtrl: ToastController, 19 | public _params:NavParams) { 20 | 21 | this.productId = _params.get('productId'); 22 | } 23 | 24 | goToCart() { 25 | this.navCtrl.push(ShowcartPage); 26 | } 27 | 28 | addToCart() { 29 | this.presentToast(); 30 | this.navCtrl.push(ShowcartPage); 31 | } 32 | 33 | buyNow() { 34 | this.navCtrl.push(CheckoutPage); 35 | } 36 | 37 | presentToast() { 38 | let toast = this.toastCtrl.create({ 39 | message: 'Added to cart successfully', 40 | duration: 1500 41 | }); 42 | toast.present(); 43 | } 44 | 45 | presentPopover(myEvent: Event) { 46 | console.log(myEvent); 47 | let popover = this.popoverCtrl.create(PopoverPage); 48 | popover.present({ 49 | ev: myEvent 50 | }); 51 | } 52 | 53 | search() { 54 | this.navCtrl.push(SearchPage); 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /src/pages/products-filter/products-filter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Filter Products 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | Filters 21 | 22 | 23 | 24 | {{filter.name}} 25 | 26 | 27 | 28 | 29 | 30 | 31 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/pages/products-filter/products-filter.scss: -------------------------------------------------------------------------------- 1 | 2 | .reset-filters { 3 | color: color($colors, danger); 4 | } 5 | 6 | 7 | //@each $track, $value in auxiliary-categories() { 8 | // 9 | // ion-item[track=#{$track}] .dot { 10 | // height: 10px; 11 | // display: inline-block; 12 | // width: 10px; 13 | // background-color: $value; 14 | // border-radius: 5px; 15 | // margin-right: 10px; 16 | // } 17 | 18 | //} 19 | -------------------------------------------------------------------------------- /src/pages/products-filter/products-filter.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | import { NavParams, ViewController } from 'ionic-angular'; 4 | 5 | @Component({ 6 | selector: 'page-products-filter', 7 | templateUrl: 'products-filter.html' 8 | }) 9 | export class ProductsFilterPage { 10 | filters: Array = []; 11 | 12 | constructor( 13 | public navParams: NavParams, 14 | public viewCtrl: ViewController 15 | ) { 16 | 17 | this.filters = [ 18 | { 19 | "name":"Free Shiping", 20 | "isChecked":false 21 | }, 22 | { 23 | "name":"Fulfilled by vPlanet", 24 | "isChecked":true 25 | }, 26 | { 27 | "name":"In Stock", 28 | "isChecked":true 29 | } 30 | ]; 31 | 32 | } 33 | 34 | resetFilters() { 35 | // reset all of the toggles to be checked 36 | this.filters.forEach(track => { 37 | track.isChecked = true; 38 | }); 39 | } 40 | 41 | applyFilters() { 42 | // Pass back a new array of track names to exclude 43 | this.dismiss(); 44 | } 45 | 46 | dismiss(data?: any) { 47 | // using the injected ViewController this page 48 | // can "dismiss" itself and pass back data 49 | this.viewCtrl.dismiss(data); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/pages/products/products.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | Products 7 | 8 | 11 | 12 | 13 | 16 | 17 | 18 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | Duplicate products for VirtualScroll demo 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 |

    {{product.name}}

    43 | 4.1 340 ratings 44 |

    {{ product.price | currency: 'INR' }}

    45 |
    46 | 47 | 51 | 55 | 56 |
    57 |
    58 | 59 |
    60 | 61 | 62 | 63 | 64 | 65 | 66 | 69 | 70 | 71 | 72 | 73 | 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /src/pages/products/products.scss: -------------------------------------------------------------------------------- 1 | .products { 2 | ion-row { 3 | border-bottom: solid 1px #d8d8d8; 4 | } 5 | .price { 6 | font-weight: bold; 7 | font-size: 18px; 8 | } 9 | .v-img { 10 | contain: none; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/pages/products/products.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { NavController, PopoverController, ModalController, AlertController } from 'ionic-angular'; 3 | import { ProductDetailPage } from '../product-detail/product-detail'; 4 | import { ProductsFilterPage } from '../products-filter/products-filter'; 5 | import { ShowcartPage } from '../showcart/showcart'; 6 | import { PopoverPage } from '../popover/popover'; 7 | import { SearchPage } from '../search/search'; 8 | 9 | interface Product { 10 | name: string; 11 | image: string; 12 | rating: number; 13 | price: number; 14 | } 15 | 16 | @Component({ 17 | templateUrl: 'products.html', 18 | }) 19 | 20 | export class ProductsPage { 21 | 22 | products: Product[]; 23 | 24 | constructor( 25 | public navCtrl: NavController, 26 | public popoverCtrl: PopoverController, 27 | public modalCtrl: ModalController, 28 | public alertCtrl: AlertController 29 | ) { 30 | 31 | 32 | this.products = []; 33 | 34 | for(let i = 0; i < 2000; i++){ 35 | 36 | let item = { 37 | name: 'Enamel Butterfly Charm', 38 | image: 'assets/img/products/clips.jpg', 39 | rating: 4.0, 40 | price: 520 41 | }; 42 | 43 | this.products.push(item); 44 | } 45 | 46 | } 47 | 48 | goToCart() { 49 | this.navCtrl.push(ShowcartPage); 50 | } 51 | 52 | presentPopover(myEvent:Event) { 53 | let popover = this.popoverCtrl.create(PopoverPage); 54 | popover.present({ 55 | ev: myEvent 56 | }); 57 | } 58 | 59 | search() { 60 | this.navCtrl.push(SearchPage); 61 | } 62 | 63 | goToProductDetail(data:any) { 64 | console.log(data); 65 | this.navCtrl.push(ProductDetailPage); 66 | } 67 | 68 | presentFilter() { 69 | let modal = this.modalCtrl.create(ProductsFilterPage); 70 | modal.present(); 71 | 72 | modal.onDidDismiss((data: any[]) => { 73 | if (data) { 74 | // play with data here 75 | } 76 | }); 77 | } 78 | 79 | sortBy() { 80 | let alert = this.alertCtrl.create(); 81 | alert.setTitle('Sort Options'); 82 | 83 | alert.addInput({ 84 | type: 'radio', 85 | label: 'Relevance', 86 | value: 'relevance', 87 | checked: true 88 | }); 89 | alert.addInput({ 90 | type: 'radio', 91 | label: 'Popularity', 92 | value: 'popular' 93 | }); 94 | alert.addInput({ 95 | type: 'radio', 96 | label: 'Low to High', 97 | value: 'lth' 98 | }); 99 | alert.addInput({ 100 | type: 'radio', 101 | label: 'High to Low', 102 | value: 'htl' 103 | }); 104 | alert.addInput({ 105 | type: 'radio', 106 | label: 'Newest First', 107 | value: 'newest' 108 | }); 109 | 110 | alert.addButton('Cancel'); 111 | 112 | alert.addButton({ 113 | text: 'OK', 114 | handler: (data: any) => { 115 | console.log(data); 116 | 117 | let navTransition = alert.dismiss(); 118 | 119 | // start some async method 120 | setTimeout(() => { 121 | navTransition.then(() => { 122 | this.navCtrl.push(ShowcartPage); 123 | }); 124 | }, 3000); 125 | 126 | // return false; 127 | } 128 | }); 129 | 130 | alert.present().then(() => { 131 | console.log("=====alert---present"); 132 | }); 133 | } 134 | 135 | } 136 | -------------------------------------------------------------------------------- /src/pages/search/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Hello 20 | 21 | 22 | test 23 | 24 | 25 | test 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/pages/search/search.scss: -------------------------------------------------------------------------------- 1 | .search { 2 | .searchbar-md .searchbar-search-icon { 3 | display:none; 4 | } 5 | .searchbar-md .searchbar-input { 6 | box-shadow: none; 7 | background-color: #f2f2f2; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/pages/search/search.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { NavController } from 'ionic-angular'; 3 | 4 | @Component({ 5 | templateUrl: 'search.html', 6 | }) 7 | export class SearchPage { 8 | 9 | queryText = ''; 10 | 11 | constructor(private navCtrl: NavController) { 12 | 13 | } 14 | 15 | updateSchedule() { 16 | console.log(this.queryText); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/pages/settings/settings.html: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 14 | Settings 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | Language 29 | 30 | English 31 | Spanish 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/pages/settings/settings.scss: -------------------------------------------------------------------------------- 1 | page-settings { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /src/pages/settings/settings.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { PopoverController, Events } from 'ionic-angular'; 3 | import { TranslateService } from 'ng2-translate/ng2-translate'; 4 | 5 | import { PopoverPage } from '../popover/popover'; 6 | 7 | @Component({ 8 | selector: 'page-settings', 9 | templateUrl: 'settings.html' 10 | }) 11 | export class SettingsPage { 12 | 13 | language:any; 14 | constructor( 15 | public popoverCtrl: PopoverController, 16 | public translate: TranslateService, 17 | public events: Events) { } 18 | 19 | presentPopover(event: Event) { 20 | let popover = this.popoverCtrl.create(PopoverPage); 21 | popover.present({ ev: event }); 22 | } 23 | 24 | setLanguage(lang:any) { 25 | this.translate.use(lang); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/pages/showcart/showcart.html: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | Showcart 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |

    Jwellary Charms beads

    23 |
    24 | 25 | 26 | Seller : SansarIndia 27 |

    {{ 499 | currency:'INR'}}{{ 1499 | currency:'INR'}}54 % off

    28 | 1 Offer Available 29 |

    Free delievery in 6-9 days

    30 |
    31 | 32 | 33 | 34 | 1 35 | 2 36 | 3 37 | 38 | 39 |
    40 |
    41 | 42 | 43 |

    MOVE TO WISHLIST

    44 |
    45 | 46 |

    REMOVE

    47 |
    48 |
    49 |
    50 | 51 | 52 | 53 | 54 | 55 |

    Jwellary Charms beads

    56 |
    57 | 58 | 59 | Seller : SansarIndia 60 |

    {{ 499 | currency:'INR'}}{{ 1499 | currency:'INR'}}54 % off

    61 | 1 Offer Available 62 |

    Free delievery in 6-9 days

    63 |
    64 | 65 | 66 | 67 | 68 | 1 69 | 2 70 | 3 71 | 72 | 73 | 74 |
    75 |
    76 | 77 | 78 |

    MOVE TO WISHLIST

    79 |
    80 | 81 |

    REMOVE

    82 |
    83 |
    84 |
    85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 |

    PRICE DETAILS

    94 |
    95 | 96 | 97 |

    Price(1 item)

    98 |

    Delievery

    99 |
    100 | 101 |

    {{ 499 | currency:'INR'}}

    102 |

    Free

    103 |
    104 |
    105 | 106 |
    107 |
    108 |
    109 | 110 | 111 | 112 | 113 |

    View Price Details

    114 |
    115 | 116 | 117 | 118 |
    119 |
    120 | -------------------------------------------------------------------------------- /src/pages/showcart/showcart.scss: -------------------------------------------------------------------------------- 1 | .showcart { 2 | 3 | 4 | .scroll-content { 5 | margin-top: 56px !important; 6 | padding-left: 0 !important; 7 | padding-right: 0 !important; 8 | } 9 | 10 | .card-ios{ 11 | margin-right: 0px; 12 | margin-left: 0px; 13 | width:100% !important; 14 | } 15 | 16 | .card-md{ 17 | margin-right: 0px; 18 | margin-left: 0px; 19 | width:100% !important; 20 | } 21 | 22 | .price{ 23 | font-size: 1.6rem !important; 24 | } 25 | 26 | .span-styling{ 27 | font-size: small; 28 | padding-left: 4px; 29 | color: #878787; 30 | text-decoration: line-through; 31 | } 32 | .discount-styling{ 33 | font-size: small; 34 | padding-left: 4px; 35 | color: #878787; 36 | } 37 | 38 | .row { 39 | border-top: 1px solid #f1f3f6; 40 | } 41 | 42 | ion-col[width-50] { 43 | padding-top: 10px; 44 | text-align: center; 45 | max-width: 50%; 46 | color:#616161; 47 | font-size: large; 48 | border-right: 2px solid #f1f3f6; 49 | } 50 | 51 | .detail-row{ 52 | border-bottom: 1px solid #f1f3f6; 53 | } 54 | 55 | .select{ 56 | 57 | border: 2px solid #e0e0e0; 58 | padding: 0px; 59 | } 60 | 61 | 62 | 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/pages/showcart/showcart.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { NavController } from 'ionic-angular'; 3 | import { CheckoutPage } from '../checkout/checkout'; 4 | /* 5 | Generated class for the ShowcartPage page. 6 | 7 | See http://ionicframework.com/docs/v2/components/#navigation for more info on 8 | Ionic pages and navigation. 9 | */ 10 | @Component({ 11 | templateUrl: 'showcart.html', 12 | }) 13 | export class ShowcartPage { 14 | quantity:any; 15 | constructor(private navCtrl: NavController) { 16 | this.quantity = 1; 17 | } 18 | 19 | goToCheckout() { 20 | this.navCtrl.push(CheckoutPage); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/pages/signup/signup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | Signup 7 | 8 | 9 | 10 | 52 | -------------------------------------------------------------------------------- /src/pages/signup/signup.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/pages/signup/signup.scss -------------------------------------------------------------------------------- /src/pages/signup/signup.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { NgForm } from '@angular/forms'; 3 | import { NavController } from 'ionic-angular'; 4 | import { LoginPage } from '../login/login'; 5 | import { UserService } from '../../providers/user-service'; 6 | import { Auth, User, UserDetails, IDetailedError } from '@ionic/cloud-angular'; 7 | 8 | @Component({ 9 | selector: 'page-user', 10 | templateUrl: 'signup.html' 11 | }) 12 | export class SignupPage { 13 | 14 | signup: {name?: string, email?: string, password?: string} = {}; 15 | 16 | details: UserDetails = { 17 | "name": this.signup.name, 18 | "email": this.signup.email, 19 | "password": this.signup.password 20 | }; 21 | 22 | submitted = false; 23 | 24 | constructor( 25 | public navCtrl: NavController, 26 | public userService: UserService, 27 | public user: User, 28 | public auth: Auth) {} 29 | 30 | onSignup(form: NgForm) { 31 | this.submitted = true; 32 | 33 | if (form.valid) { 34 | console.log(this.signup) 35 | this.auth.signup(this.signup).then(() => { 36 | // user is now registered 37 | // we can now use this.user to update further data if required 38 | this.navCtrl.push(LoginPage); 39 | }, (err: IDetailedError) => { 40 | for (let e of err.details) { 41 | if (e === 'conflict_email') { 42 | alert('Email already exists.'); 43 | } else { 44 | // handle other errors 45 | } 46 | } 47 | }); 48 | } 49 | } 50 | 51 | forgetPassword() { 52 | 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/pages/support/support.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | Support 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 |
    19 | 20 | 21 | Enter your support message below 22 | 23 | 24 | 25 | 26 |

    27 | Support message is required 28 |

    29 | 30 |
    31 | 32 |
    33 |
    34 | 35 |
    36 | -------------------------------------------------------------------------------- /src/pages/support/support.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravsaini03-zz/ionic3-ecommerce-app/cc6eda3d4ef014e19def2c50c7e9256ba6ff2f9f/src/pages/support/support.scss -------------------------------------------------------------------------------- /src/pages/support/support.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { NgForm } from '@angular/forms'; 3 | 4 | import { AlertController, NavController, ToastController } from 'ionic-angular'; 5 | 6 | 7 | @Component({ 8 | selector: 'page-user', 9 | templateUrl: 'support.html' 10 | }) 11 | export class SupportPage { 12 | 13 | submitted: boolean = false; 14 | supportMessage: string; 15 | 16 | constructor( 17 | public navCtrl: NavController, 18 | public alertCtrl: AlertController, 19 | public toastCtrl: ToastController 20 | ) { 21 | 22 | } 23 | 24 | ionViewDidEnter() { 25 | let toast = this.toastCtrl.create({ 26 | message: 'This does not actually send a support request.', 27 | duration: 3000 28 | }); 29 | toast.present(); 30 | } 31 | 32 | submit(form: NgForm) { 33 | this.submitted = true; 34 | 35 | if (form.valid) { 36 | this.supportMessage = ''; 37 | this.submitted = false; 38 | 39 | let toast = this.toastCtrl.create({ 40 | message: 'Your support request has been sent.', 41 | duration: 3000 42 | }); 43 | toast.present(); 44 | } 45 | } 46 | 47 | // If the user enters text in the support question and then navigates 48 | // without submitting first, ask if they meant to leave the page 49 | ionViewCanLeave(): boolean | Promise { 50 | // If the support message is empty we should just navigate 51 | if (!this.supportMessage || this.supportMessage.trim().length === 0) { 52 | return true; 53 | } 54 | 55 | return new Promise((resolve: any, reject: any) => { 56 | let alert = this.alertCtrl.create({ 57 | title: 'Leave this page?', 58 | message: 'Are you sure you want to leave this page? Your support message will not be submitted.' 59 | }); 60 | alert.addButton({ text: 'Stay', handler: reject }); 61 | alert.addButton({ text: 'Leave', role: 'cancel', handler: resolve }); 62 | 63 | alert.present(); 64 | }); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/pages/walkthrough/walkthrough.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    15 | Welcome to vPlanet Commerce 16 |

    17 |

    18 | vPlanet Commerce app is a practical preview of an e-commerce application in action. 19 |

    20 |
    21 | 22 | 23 | 24 |

    Built with IonicDb

    25 |

    vPlanet Commerce is built on top of Ionic backend services. It uses IonicDB, Ionic Auth and other cloud services.

    26 |
    27 | 28 | 29 | 30 |

    PWA Supported

    31 |

    vPlanet Commerce is also a progressive web app. With Ionic support for PWA we can now ship same mobile-app as a web application.

    32 |
    33 | 34 | 35 | 36 |

    Ready to Shop?

    37 | 41 |
    42 | 43 |
    44 |
    45 | -------------------------------------------------------------------------------- /src/pages/walkthrough/walkthrough.scss: -------------------------------------------------------------------------------- 1 | page-walkthrough { 2 | .toolbar-background { 3 | background: transparent; 4 | border-color: transparent; 5 | } 6 | 7 | .slide-zoom { 8 | height: 100%; 9 | } 10 | 11 | .slide-title { 12 | margin-top: 2.8rem; 13 | } 14 | 15 | .slide-image { 16 | max-height: 50%; 17 | max-width: 60%; 18 | margin: 36px 0; 19 | } 20 | 21 | b { 22 | font-weight: 500; 23 | } 24 | 25 | p { 26 | padding: 0 40px; 27 | font-size: 14px; 28 | line-height: 1.5; 29 | color: #60646B; 30 | 31 | b { 32 | color: #000000; 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/pages/walkthrough/walkthrough.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { MenuController, NavController, Slides } from 'ionic-angular'; 3 | import { Storage } from '@ionic/storage'; 4 | import { HomePage } from '../home/home'; 5 | 6 | @Component({ 7 | selector: 'page-walkthrough', 8 | templateUrl: 'walkthrough.html' 9 | }) 10 | 11 | export class WalkThroughPage { 12 | showSkip = true; 13 | 14 | constructor( 15 | public navCtrl: NavController, 16 | public menu: MenuController, 17 | public storage: Storage 18 | ) { } 19 | 20 | startApp() { 21 | this.navCtrl.setRoot(HomePage).then(() => { 22 | this.storage.set('hasSeenWalkThrough', 'true'); 23 | }) 24 | } 25 | 26 | onSlideChangeStart(slider: Slides) { 27 | this.showSkip = !slider.isEnd(); 28 | } 29 | 30 | ionViewDidEnter() { 31 | // the root left menu should be disabled on the walkthrough page 32 | this.menu.enable(false); 33 | } 34 | 35 | ionViewDidLeave() { 36 | // enable the root left menu when leaving the walkthrough page 37 | this.menu.enable(true); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/pages/wishlist/wishlist.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Wishlist 4 | 7 | 8 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 4 Items in your Wishlist (Swipe for options). 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |

    {{product.name}}

    32 |

    {{product.price | currency}}

    33 |

    {{product.rating}} stars and 420 reviews

    34 |
    35 | 36 | 40 | 44 | 45 |
    46 |
    47 | 48 | 70 | 71 |
    72 | -------------------------------------------------------------------------------- /src/pages/wishlist/wishlist.scss: -------------------------------------------------------------------------------- 1 | .wishlist { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /src/pages/wishlist/wishlist.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { NavController, PopoverController } from 'ionic-angular'; 3 | import { ShowcartPage } from '../showcart/showcart'; 4 | import { PopoverPage } from '../popover/popover'; 5 | 6 | interface Product { 7 | name: string; 8 | image: string; 9 | rating: number; 10 | price: number; 11 | } 12 | 13 | @Component({ 14 | templateUrl: 'wishlist.html', 15 | }) 16 | export class WishlistPage { 17 | 18 | products: Product[]; 19 | 20 | constructor(private navCtrl: NavController, private popoverCtrl: PopoverController) { 21 | 22 | this.products = [{ 23 | name: '9ct Silver Clips', 24 | image: 'assets/img/products/clips.jpg', 25 | rating: 4.5, 26 | price: 12 27 | },{ 28 | name: 'Alphabet Charms', 29 | image: 'assets/img/products/alphabet.png', 30 | rating: 4.8, 31 | price: 24 32 | },{ 33 | name: 'Christmas Charms', 34 | image: 'assets/img/products/christmas.webp', 35 | rating: 3.9, 36 | price: 25 37 | }]; 38 | 39 | // for(let i = 0; i < 3; i++){ 40 | 41 | // let item = { 42 | // name: '9ct Dimond Neclace', 43 | // image: 'img/products/clips.jpg', 44 | // rating: 4.0, 45 | // price: 520 46 | // }; 47 | 48 | // this.products.push(item); 49 | // } 50 | } 51 | 52 | goToCart() { 53 | this.navCtrl.push(ShowcartPage); 54 | } 55 | 56 | presentPopover(myEvent: Event) { 57 | let popover = this.popoverCtrl.create(PopoverPage); 58 | popover.present({ 59 | ev: myEvent 60 | }); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/providers/constants.ts: -------------------------------------------------------------------------------- 1 | export const APP_ID: string = 'f8fec798'; -------------------------------------------------------------------------------- /src/providers/data-service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Storage } from '@ionic/storage'; 3 | import { Database } from '@ionic/cloud-angular'; 4 | import { Observable } from 'rxjs/Observable'; 5 | 6 | import 'rxjs/add/operator/map'; 7 | import 'rxjs/add/operator/catch' 8 | 9 | @Injectable() 10 | export class DataService { 11 | 12 | cartItems: any[]; 13 | loading: any; 14 | 15 | constructor( 16 | public storage: Storage, 17 | public db: Database) { 18 | this.storage.get('cart').then((value) => { 19 | if (value === null) { 20 | this.cartItems = []; 21 | } else { 22 | this.cartItems = value; 23 | } 24 | }); 25 | this.db.connect(); 26 | } 27 | 28 | public getCategories(): Observable { 29 | const categories:any = this.db.aggregate({ 30 | name: "testing", 31 | categories: this.db.collection('categories'), 32 | parent_categories: this.db.collection('parent_categories') 33 | }) 34 | return categories.fetch(); 35 | } 36 | 37 | public getPopularProducts(): Observable { 38 | const popular_products:any = this.db.collection('popular_products'); 39 | return popular_products.order("price", "ascending").watch(); 40 | } 41 | 42 | public getProducts(): Observable { 43 | const products:any = this.db.collection('products'); 44 | return products.fetch(); 45 | } 46 | 47 | public addToCart(item: any): Promise { 48 | this.cartItems.push(item); 49 | return this.storage.set('cart', this.cartItems); 50 | } 51 | 52 | public clearCart(): Promise { 53 | this.cartItems = []; 54 | return this.storage.remove('cart'); 55 | } 56 | 57 | public getCart(): Promise { 58 | return this.storage.get('cart'); 59 | } 60 | 61 | } -------------------------------------------------------------------------------- /src/providers/user-service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | 3 | import { Events } from 'ionic-angular'; 4 | import { Storage } from '@ionic/storage'; 5 | import { APP_ID } from './constants'; 6 | 7 | import { Auth, Push } from '@ionic/cloud-angular'; 8 | 9 | @Injectable() 10 | export class UserService { 11 | USER_DATA = "ionic_user_" + APP_ID; 12 | AUTH_KEY = "ionic_auth_" + APP_ID; 13 | 14 | userData: any; 15 | db: any; 16 | is_authenticated: boolean; 17 | 18 | constructor( 19 | public events: Events, 20 | public storage: Storage, 21 | public auth: Auth, 22 | public push: Push 23 | ) { 24 | 25 | var self = this; 26 | 27 | let data = self.getUserData(); 28 | self.userData = JSON.parse(data); 29 | 30 | if(!self.userData || self.userData == '' || !self.userData.id ){ 31 | self.is_authenticated = false; 32 | } 33 | else{ 34 | self.is_authenticated = true; 35 | } 36 | 37 | } 38 | 39 | getUserData() { 40 | return localStorage.getItem(this.USER_DATA); 41 | } 42 | 43 | isAuthenticated() { 44 | // We can also call use this.auth.isAuthenticated() 45 | // But to save server calls we have managed it locally 46 | var self = this; 47 | return new Promise((resolve) => { 48 | resolve(self.is_authenticated); 49 | }) 50 | } 51 | 52 | logout() { 53 | this.auth.logout(); 54 | this.push.unregister(); 55 | this.events.publish('user:logout'); 56 | return true; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/service-worker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Check out https://googlechrome.github.io/sw-toolbox/docs/master/index.html for 3 | * more info on how to use sw-toolbox to custom configure your service worker. 4 | */ 5 | 6 | 7 | 'use strict'; 8 | importScripts('./build/sw-toolbox.js'); 9 | 10 | self.toolbox.options.cache = { 11 | name: 'ionic-cache' 12 | }; 13 | 14 | // pre-cache our key assets 15 | self.toolbox.precache( 16 | [ 17 | './build/main.js', 18 | './build/main.css', 19 | './build/polyfills.js', 20 | 'index.html', 21 | 'manifest.json' 22 | ] 23 | ); 24 | 25 | // dynamically cache any other local assets 26 | self.toolbox.router.any('/*', self.toolbox.cacheFirst); 27 | 28 | // for any other requests go to the network, cache, 29 | // and then only use that cached resource if your user goes offline 30 | self.toolbox.router.default = self.toolbox.networkFirst; -------------------------------------------------------------------------------- /src/theme/variables.scss: -------------------------------------------------------------------------------- 1 | // Ionic Variables and Theming. For more info, please see: 2 | // http://ionicframework.com/docs/v2/theming/ 3 | 4 | // Font path is used to include ionicons, 5 | // roboto, and noto sans fonts 6 | $font-path: "../assets/fonts"; 7 | 8 | @import "ionic.globals"; 9 | 10 | 11 | // Shared Variables 12 | // -------------------------------------------------- 13 | // To customize the look and feel of this app, you can override 14 | // the Sass variables found in Ionic's source scss files. 15 | // To view all the possible Ionic variables, see: 16 | // http://ionicframework.com/docs/v2/theming/overriding-ionic-variables/ 17 | 18 | $headings-font-weight: 300; 19 | 20 | 21 | // Named Color Variables 22 | // -------------------------------------------------- 23 | // Named colors makes it easy to reuse colors on various components. 24 | // It's highly recommended to change the default colors 25 | // to match your app's branding. Ionic uses a Sass map of 26 | // colors so you can add, rename and remove colors as needed. 27 | // The "primary" color is the only required color in the map. 28 | 29 | $colors: ( 30 | primary: #00497d, 31 | secondary: #32db64, 32 | danger: #f53d3d, 33 | light: #f4f4f4, 34 | dark: #222, 35 | favorite: #69BB7B, 36 | twitter: #1da1f4, 37 | google: #dc4a38, 38 | vimeo: #23b6ea, 39 | facebook: #3b5998 40 | ); 41 | 42 | 43 | // App iOS Variables 44 | // -------------------------------------------------- 45 | // iOS only Sass variables can go here 46 | 47 | 48 | 49 | // App Material Design Variables 50 | // -------------------------------------------------- 51 | // Material Design only Sass variables can go here 52 | 53 | // Use the primary color as the background for the toolbar-md-background 54 | $toolbar-md-background: color($colors, primary); 55 | 56 | // Change the color of the segment button text 57 | $toolbar-md-active-color: #fff; 58 | 59 | 60 | // App Windows Variables 61 | // -------------------------------------------------- 62 | // Windows only Sass variables can go here 63 | 64 | 65 | 66 | // App Theme 67 | // -------------------------------------------------- 68 | // Ionic apps can have different themes applied, which can 69 | // then be future customized. This import comes last 70 | // so that the above variables are used and Ionic's 71 | // default are overridden. 72 | 73 | @import "ionic.theme.default"; 74 | 75 | 76 | // Ionicons 77 | // -------------------------------------------------- 78 | // The premium icon font for Ionic. For more info, please see: 79 | // http://ionicframework.com/docs/v2/ionicons/ 80 | 81 | @import "ionic.ionicons"; 82 | 83 | 84 | // Fonts 85 | // -------------------------------------------------- 86 | // Roboto font is used by default for Material Design. Noto sans 87 | // is used by default for Windows. 88 | 89 | @import "roboto"; 90 | @import "noto-sans"; -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowSyntheticDefaultImports": true, 4 | "declaration": false, 5 | "emitDecoratorMetadata": true, 6 | "experimentalDecorators": true, 7 | "lib": [ 8 | "dom", 9 | "es2015" 10 | ], 11 | "module": "es2015", 12 | "moduleResolution": "node", 13 | "sourceMap": true, 14 | "target": "es5" 15 | }, 16 | "include": [ 17 | "src/**/*.ts" 18 | ], 19 | "exclude": [ 20 | "node_modules" 21 | ], 22 | "compileOnSave": false, 23 | "atom": { 24 | "rewriteTsconfig": false 25 | } 26 | } -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-duplicate-variable": true, 4 | "no-unused-variable": [ 5 | true 6 | ] 7 | }, 8 | "rulesDirectory": [ 9 | "node_modules/tslint-eslint-rules/dist/rules" 10 | ] 11 | } 12 | --------------------------------------------------------------------------------