From 8e797d7cf319127cea73a0ad07930e3cfea6043d Mon Sep 17 00:00:00 2001 From: nishankkumar1994 Date: Thu, 13 Jul 2017 10:56:18 +0530 Subject: [PATCH] Hotfix: Context::getLocaleResolver() not found fix --- Block/Display.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Block/Display.php b/Block/Display.php index a170502..baafecd 100644 --- a/Block/Display.php +++ b/Block/Display.php @@ -79,7 +79,8 @@ public function __construct( array $data = [] ) { $this->chatHelper = $context->getChatHelper(); - $this->localeResolver = $context->getLocaleResolver(); + // ToDo: this needs to fix + // $this->localeResolver = $context->getLocaleResolver(); $this->customerSession = $customerSession; $this->filesystem = $context->getFilesystem(); $this->coreFileStorageDatabase = $coreFileStorageDatabase; @@ -200,10 +201,10 @@ public function getLanguage() if ($this->chatHelper->getLanguage() == 'auto') { return null; } - - if ($this->chatHelper->getLanguage() == 'md') { - return "\$zopim.livechat.setLanguage('" . substr($this->localeResolver->getLocale(), 0, 2) . "');" . "\n"; - } + // ToDo: this needs to fix + // if ($this->chatHelper->getLanguage() == 'md') { + // return "\$zopim.livechat.setLanguage('" . substr($this->localeResolver->getLocale(), 0, 2) . "');" . "\n"; + // } return "\$zopim.livechat.setLanguage('" . $this->chatHelper->getLanguage() . "');" . "\n"; }