GithubHelp home page GithubHelp logo

qpc-github / pos-app-sdk-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shopify/pos-app-sdk-example

1.0 2.0 0.0 385 KB

Sample embedded app for Shopify POS for the iPad https://docs.shopify.com/api/sdks/shopify-pos-app-sdk

JavaScript 17.18% Ruby 41.42% CSS 12.63% HTML 28.77%

pos-app-sdk-example's Introduction

README

This is an example application for building Shopify Embedded Applications for Shopify POS (Point of Sale). Your application credentials need to have embedded access make this example work locally.

The example uses Ruby on Rails as a backend framework but the Shopify Embedded API is JavaScript based, so it is backend language/framework agnostic. Use this as a reference.

The usage of the Shopify POS App SDK is contained within /app/assets/javascripts/cart.js and used in each of the app/views/home/*.erb files. Our CSS may be used and remixed as you wish, available within /app/assets/stylesheets.

Getting Started

  1. Add your api_key, secret and scope to config/initializers/shopify_app.rb.

  2. In your partner dashboard, enable Shopify POS in the Embedded Settings.

  3. Use the root path for Application URL (e.g., https://1234abcd.ngrok.io/) and /auth/shopify/callback for Redirection URL (e.g., https://1234abcd.ngrok.io/auth/shopify/callback). We highly recommend using ngrok when running the app locally and connecting for use in Shopify and POS.

  4. Add Shop POS links for actions. The list of actions available in this sample app are broken down by integration point and URL. You can try out modal or fullscreen view types listed here, shown as path to add along with your hosted URL (e.g., https://1234abcd.ngrok.io/cart). The available integration points to add in your Partner dashboard are:

    • /cart - Edit Cart action
    • /random-product - Add to Cart action
    • /loyalty - Order Completed action
    • /discounts - Edit Cart action
    • /customer - Edit Cart action
  5. Prepare the app by running bundle install, and bundle exec rails server. The app runs by default at localhost:3000.

  6. For more information, see the documentation for the shopify_app ruby gem.

pos-app-sdk-example's People

Contributors

jahfer avatar joshubrown avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.