Merge branch 'master' of https://github.com/mrvautin/expressCart
commit
a03f1ef6e7
|
@ -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,8 +178,13 @@ 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
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
exports.getThemes = () => {
|
||||
|
|
|
@ -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));
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue