From bc3e33dbb5314156ad558bb3877a0d91888ea2d0 Mon Sep 17 00:00:00 2001 From: Mark Moffat Date: Tue, 7 Jan 2020 21:21:03 +1030 Subject: [PATCH] Ability to inject custom JS --- config/baseSchema.json | 3 +++ config/settings.json | 1 + views/layouts/layout.hbs | 1 + 3 files changed, 5 insertions(+) diff --git a/config/baseSchema.json b/config/baseSchema.json index 19c9184..d4efe44 100644 --- a/config/baseSchema.json +++ b/config/baseSchema.json @@ -61,6 +61,9 @@ "googleAnalytics": { "type": "string" }, + "injectJs": { + "type": "string" + }, "customCss": { "type": "string" }, diff --git a/config/settings.json b/config/settings.json index 7ff5ef7..c3fac43 100644 --- a/config/settings.json +++ b/config/settings.json @@ -15,6 +15,7 @@ "menuTitle": "Menu", "footerHtml": "<h4 class="text-center">Powered by expressCart</h4>", "googleAnalytics": "", + "injectJs": "", "customCss": ".footer{padding-top: 5px;}", "currencySymbol": "£", "paymentGateway": "stripe", diff --git a/views/layouts/layout.hbs b/views/layouts/layout.hbs index 37bf70f..9e781bf 100644 --- a/views/layouts/layout.hbs +++ b/views/layouts/layout.hbs @@ -1,6 +1,7 @@ + {{#if config.injectJs}}{{{config.injectJs}}}{{/if}} {{config.cartTitle}} - {{title}}