https://github.com/mastermindg/shoppinglist
App that allows scanning of products and adding to a shopping list
https://github.com/mastermindg/shoppinglist
Last synced: 17 days ago
JSON representation
App that allows scanning of products and adding to a shopping list
- Host: GitHub
- URL: https://github.com/mastermindg/shoppinglist
- Owner: mastermindg
- Created: 2014-07-14T15:06:40.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-07-15T00:55:00.000Z (almost 12 years ago)
- Last Synced: 2025-11-19T10:22:26.852Z (8 months ago)
- Language: JavaScript
- Size: 293 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Shopping List
This is a Cordova application that integrates Drupal services with the ZXing Barcode Scanner plugin to allow users to create personal shopping lists and add products by scanning them with their phone.
Creating with Cordova
Step 1: Create Cordova Scaffolding
cordova create myApp
cd myApp
cordova platform add android
cordova plugins add https://github.com/wildabeast/BarcodeScanner.git
This will create the default folders/files that you'll need to get started.
Step 2: Pull this repo into the newly created myApp folder
git fetch --all
git reset --hard origin/master
Step 3: Setup Drupal 7 for authentication
These instructions are a condensed version of Tyler Frankensteins tutorial on integrating Drupal with PhoneGap.
Drupal & PhoneGap - Mobile Application with Drupal 7 Services, PhoneGap & JQuery Mobile for Android - Example
This configuration is using an older version of the Drupal Services module - 7.x.3.2
Download Services 7.x.3.2 here
Install the module by uploading or copying the path of the link and installing locally via Update Manager.
Enable Service and the REST server.
Add a Service

Setup Service Resources

The resources you'll need to enable are:
node -> retrieve,create,update,delete
system -> connect
user -> login,logout
Enable REST Server Response Formatters & Request Parsing
Switch to the 'Server' tab and make sure the following are enabled:
Response formatters
json
Request parsing
application/json
application/x-www-form-urlencoded
Feel free to test your webservice using Tyler Frankenstein's tutorial
Step 4: Create EAN account and enable data feed
This app uses EANData to pull product data from a UPC.
Create an account with EAN here:
EANData
Activate Data feeds here:
EANData Data Feed Activate
Step 5: Fill in the Settings.js file
TTHIS FILE WILL NEED TO BE CREATED AS IT IS NOT STORED IN THIS REPOSITORY - FOR SECURITY REASONS.
Application settings are stored in www/settings.js.
Here you'll need to enter your Drupal 7 webiste address (the root of the site, i.e. http://example.com/drupal)
You'll also need to enter your EANData keycode which is used for querying the barcodes.
Step 6: Build your app!
cordova run
cordova emulate android