From 4739b59c1fb975a6bb974911a9200f22e0d96e7c Mon Sep 17 00:00:00 2001 From: Asad Akram Date: Tue, 22 Jan 2019 14:07:32 +0500 Subject: [PATCH 1/2] in cart; on product quantity update, change the value too. --- public/javascripts/expressCart.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/javascripts/expressCart.js b/public/javascripts/expressCart.js index 7e668e0..9c530d0 100644 --- a/public/javascripts/expressCart.js +++ b/public/javascripts/expressCart.js @@ -142,6 +142,12 @@ $(document).ready(function (){ cartUpdate(qtyElement); }); + + $(document).on('change', '.cart-product-quantity', function (e) { + + cartUpdate(e.target); + }); + $(document).on('click', '.btn-delete-from-cart', function(e){ deleteFromCart($(e.target)); }); From 1c09c0f7d44143aa910313bd1301a61810bfe5b2 Mon Sep 17 00:00:00 2001 From: Shreyas Date: Sun, 23 Dec 2018 15:03:09 +0530 Subject: [PATCH 2/2] This is minor fix for image upload issue if multiple sub directories to be created based on permaLink of product --- lib/common.js | 6 ++++++ 1 file changed, 6 insertions(+) mode change 100644 => 100755 lib/common.js diff --git a/lib/common.js b/lib/common.js old mode 100644 new mode 100755 index fb230d8..7ffc4d7 --- a/lib/common.js +++ b/lib/common.js @@ -10,6 +10,7 @@ const async = require('async'); const nodemailer = require('nodemailer'); const sanitizeHtml = require('sanitize-html'); const escape = require('html-entities').AllHtmlEntities; +const mkdirp = require('mkdirp'); let ObjectId = require('mongodb').ObjectID; const restrictedRoutes = [ @@ -177,7 +178,12 @@ exports.checkDirectorySync = (directory) => { try{ fs.statSync(directory); }catch(e){ + try{ fs.mkdirSync(directory); + } + catch(err){ + mkdirp.sync(directory);//error : directory & sub directories to be newly created + } } };