From a2a5923acd2390703a9760af590b99300011648f Mon Sep 17 00:00:00 2001 From: Mark Moffat Date: Sun, 7 Jan 2018 19:34:20 +0100 Subject: [PATCH] Changed paths of payment providers and updated readme --- README.md | 10 ++++++++++ app.js | 4 ++-- routes/{ => payments}/paypal.js | 0 routes/{ => payments}/stripe.js | 0 views/layouts/layout.hbs | 2 +- 5 files changed, 13 insertions(+), 3 deletions(-) rename routes/{ => payments}/paypal.js (100%) rename routes/{ => payments}/stripe.js (100%) diff --git a/README.md b/README.md index 5f7ea8e..cf61515 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,8 @@ Themes are a set of handlebars views and a stylesheet file. See `Cloth` theme as Themes are loaded from `/public/themes/`. +It would be great to have some themes contributed back for others to use. + ##### Number of Products per page You can set the number of products per page by changing the `Products per page` value to a whole number of your choice. You may want to ensure @@ -228,3 +230,11 @@ You can re-order menu items by clicking and dragging the arrows icon and placing You may want to create a static page to show contact details, about us, shipping information etc. New static pages are setup via `/admin/settings/pages`. + +## Contributing + +I'm looking for contributors of any kind. I'm working on turning the admin panel into something more modern and using Vue.js. The frontend part of the website will always be a normal webapp with no SPA frameworks as I believe eCommerce apps should have SEO as top priority. + +Contributing payment providers and themes would be much appreciated. Payment providers are added by simply adding the payment provider file to `/routes/payments/providerName.js`, then adding the route to the `app.js` file by adding `const providerName = require('./routes/payments/{providerName}');` and mounting the route `app.use('/providerName', providerName);`. + +If you see current code which could be enhanced (note: parts of the code is quite old but new to Github) you are welcome to submit a PR. diff --git a/app.js b/app.js index e0d8f12..9f2ae2a 100644 --- a/app.js +++ b/app.js @@ -18,8 +18,8 @@ let handlebars = require('express-handlebars'); // require the routes const index = require('./routes/index'); const admin = require('./routes/admin'); -const paypal = require('./routes/paypal'); -const stripe = require('./routes/stripe'); +const paypal = require('./routes/payments/paypal'); +const stripe = require('./routes/payments/stripe'); const app = express(); diff --git a/routes/paypal.js b/routes/payments/paypal.js similarity index 100% rename from routes/paypal.js rename to routes/payments/paypal.js diff --git a/routes/stripe.js b/routes/payments/stripe.js similarity index 100% rename from routes/stripe.js rename to routes/payments/stripe.js diff --git a/views/layouts/layout.hbs b/views/layouts/layout.hbs index d00ccf7..0be2ea9 100644 --- a/views/layouts/layout.hbs +++ b/views/layouts/layout.hbs @@ -111,7 +111,7 @@ {{/if}} - +
{{#unless admin}}