request = $request; $this->scopeConfig = $scopeConfig; } /** * @param Gallery $subject * @param Closure $proceed * @param string $name * @param string|null $module * * @return string|false */ public function aroundGetVar( Gallery $subject, Closure $proceed, $name, $module = null ) { $result = $proceed($name, $module); $isEnabled = $this->getSystemValue('olegnax_quickview/general/enable'); if (!$isEnabled || $this->request->getFullActionName() != 'ox_quickview_catalog_product_view') { return $result; } switch ($name) { case "gallery/navdir" : $result = 'horizontal'; break; /* Disable the image fullscreen on quickview*/ case "gallery/allowfullscreen" : $result = false; break; } return $result; } public function getSystemValue($path, $storeCode = null) { return $this->scopeConfig->getValue($path, ScopeInterface::SCOPE_STORE, $storeCode); } }