Code Monkey home page Code Monkey logo

shop's Introduction

Shop

Shop

This project contains the code behind the single-page store at Stripe Shop. We ported the backend to Parse's Code Cloud so you can easily launch and modify your own copy. (Also, we didn't want to open-source the photo of Kat and Thairu, so we decided to take a replacement.)

Feel free to take whatever pieces you find useful! We ask only that you don't use it to sell actual Stripe T-shirts ☺. Improvements are welcome — just open a pull request.

The details

We have a running live demo of the app. It's running in Stripe's test mode, so you'll have to use 4242-4242-4242-4242 as the card (and we won't actually send you a shirt, sorry!).

Getting up and running

To get your own instance of Shop up and running, you'll need to do the following:

  1. Create a new Parse app.
  2. Copy config/global.json to config/local.json.
  3. Add the Application ID and Master Key to config/local.json.
  4. Set up the parse command line utility (you may find their docs helpful).
  5. Create a parseapp.com subdomain for your app. The same docs should be helpful.
  6. Run parse deploy. You now have a running Shop!

Not required to get the app running, but you'll probaby also want to:

  1. Create your own Stripe account and puts its keys into cloud/config.js. (By default, Shop uses a fixed test account.)
  2. Put your Google analytics tracking information into public/assets/js/ga.js.

Contributors

shop's People

Contributors

gdb avatar joebonham avatar pc avatar snoble avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shop's Issues

Different priced items

We are trying to configure to have 2 items with different prices, they add and total in the cart correctly but the description price stays the same.

SKU 1 is correct at $14/each
SKU 2 should be shown as $18/each

capture

How can we modify the code to achieve this?

I also noticed that the total that is passed thru to stripe is also incorrect...

unwanted modal closing onblur

There is too trigger-happy onblur(?) events that cause unwanted closing of the modal and worse, resetting the form (requiring re-entering address data, ugh!). In general this modal is basically unusable on mobile safari and somewhat unusable on chrome mac osx (where I had to go after failing 3 times on iPhone).

One caveat is I used the modal with a free "gift" shirt and looking at the demo, https://shop-demo.parseapp.com/, I'm not seeing the same onblur issues.

Demo site is down

https://shop-demo.parseapp.com/ is responding with

This site can’t be reached
shop-demo.parseapp.com’s server IP address could not be found.

This repo hasn't been modified in 5 years. If it's deprecated - it might help potential stripe users if you mark it clearly as such.

Error syntax

In /cloud/model.js line 22 states the field should be longer than max_length, rather than shorter.

Line 21 - 23:

if (spec.max_length && value.length > spec.max_length) {
    return name + ' must be at least ' + value.length + ' characters long.';
  }

Uncaught ReferenceError: _ is not defined

After changing cloud/views/index.ejs file to use non minified shop.js

<script src="/assets/js/shop.min.js?1377809478"></script>
to 
<script src="/assets/js/shop.js"></script>

Getting Uncaught ReferenceError on below line

var itemTemplate = _.template($('#item-template').html());

in here

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.