LearningSalesForceCommerceC.../the_learning_cartridge/cartridge/controllers/SimpleBasket.js

20 lines
379 B
JavaScript

'use strict';
var server = require('server');
//Basket Manager will get all the users basket information
var BasketMgr = require('dw/order/BasketMgr');
server.get('List', function (req, res, next) {
var viewData = {
'basket': BasketMgr.getCurrentOrNewBasket()
};
res.render('simplebasket', viewData);
next();
});
module.exports = server.exports();