diff --git a/routes/index.js b/routes/index.js index c38d41c..5adb7a2 100644 --- a/routes/index.js +++ b/routes/index.js @@ -58,7 +58,7 @@ router.get('/checkout', async (req, res, next) => { }); router.get('/pay', async (req, res, next) => { - let config = common.getConfig(); + const config = common.getConfig(); // if there is no items in the cart then render a failure if(!req.session.cart){ @@ -85,7 +85,9 @@ router.get('/pay', async (req, res, next) => { }); router.get('/cartPartial', (req, res) => { - res.render('partials/cart', { + const config = common.getConfig(); + + res.render(`${config.themeViews}cart`, { pageCloseBtn: common.showCartCloseBtn(req.query.path), page: req.query.path, layout: false, diff --git a/views/layouts/layout.hbs b/views/layouts/layout.hbs index c0f9bf9..1ffda57 100644 --- a/views/layouts/layout.hbs +++ b/views/layouts/layout.hbs @@ -38,6 +38,7 @@ + @@ -61,7 +62,11 @@ {{#if config.googleAnalytics}}{{{config.googleAnalytics}}}{{/if}} {{#if config.customCss}}{{/if}} + {{#if admin}} + + {{else}} {{#if config.theme}}{{/if}} + {{/if}} {{#if admin}} @@ -117,20 +122,16 @@ {{#unless admin}} {{#ifCond page '!=' 'checkout'}} {{#ifCond page '!=' 'pay'}} -
-
-
- {{> partials/cart}} -
+
+ {{> (getTheme 'cart')}}
-
{{/ifCond}} {{/ifCond}} {{/unless}}
{{#if admin}} -
+
{{{body}}}
{{else}} @@ -141,6 +142,7 @@ +
{{#if showFooter}}