|
@@ -24,7 +24,7 @@ import { mapState } from 'vuex'
|
|
// require('theme/assets/styles/main.scss');
|
|
// require('theme/assets/styles/main.scss');
|
|
import 'theme/assets/styles/main.scss'
|
|
import 'theme/assets/styles/main.scss'
|
|
|
|
|
|
-(function(Drupal, drupalSettings) {
|
|
|
|
|
|
+(function(Drupal, drupalSettings, drupalDecoupled) {
|
|
|
|
|
|
var MaterioTheme = function(){
|
|
var MaterioTheme = function(){
|
|
|
|
|
|
@@ -33,6 +33,7 @@ import 'theme/assets/styles/main.scss'
|
|
, _v_main_content;
|
|
, _v_main_content;
|
|
var _is_front = drupalSettings.path.isFront;
|
|
var _is_front = drupalSettings.path.isFront;
|
|
|
|
|
|
|
|
+
|
|
console.log('drupalSettings', drupalSettings);
|
|
console.log('drupalSettings', drupalSettings);
|
|
|
|
|
|
// ___ _ _
|
|
// ___ _ _
|
|
@@ -44,14 +45,22 @@ import 'theme/assets/styles/main.scss'
|
|
initVues()
|
|
initVues()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ function checkNoVuePages(){
|
|
|
|
+ return drupalDecoupled.sys_path != '/cart'
|
|
|
|
+ && drupalDecoupled.sys_path.indexOf('checkout') != 1;
|
|
|
|
+ }
|
|
|
|
+
|
|
function initVues(){
|
|
function initVues(){
|
|
- initVRouter();
|
|
|
|
- initVSiteBrandingBlock()
|
|
|
|
- initVPagetitleBlock()
|
|
|
|
- initVUserBlock()
|
|
|
|
- initVHeaderMenu()
|
|
|
|
- initVMainContent()
|
|
|
|
- initVSearchBlock()
|
|
|
|
|
|
+ // only launch views if we are not in commerce pages
|
|
|
|
+ if(checkNoVuePages()){
|
|
|
|
+ initVRouter();
|
|
|
|
+ initVSiteBrandingBlock()
|
|
|
|
+ initVPagetitleBlock()
|
|
|
|
+ initVUserBlock()
|
|
|
|
+ initVHeaderMenu()
|
|
|
|
+ initVMainContent()
|
|
|
|
+ initVSearchBlock()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
function initVRouter(){
|
|
function initVRouter(){
|
|
@@ -252,4 +261,4 @@ import 'theme/assets/styles/main.scss'
|
|
|
|
|
|
var materiotheme = new MaterioTheme();
|
|
var materiotheme = new MaterioTheme();
|
|
|
|
|
|
-})(Drupal, drupalSettings);
|
|
|
|
|
|
+})(Drupal, drupalSettings, drupalDecoupled);
|