scopeConfig = $scopeConfig; $this->coreRegistry = $registry; } /** * Return logo image path * * @return string|null */ public function getPath(): ?string { $storeId = null; $order = $this->coreRegistry->registry('current_order'); if ($order instanceof Order) { $storeId = $order->getStoreId(); } $scopeType = ScopeInterface::SCOPE_STORE; if ($this->scopeConfig->getValue('general/single_store_mode/enabled') === "1") { $scopeType = ScopeInterface::SCOPE_WEBSITE; } $salesLogoPath = $this->scopeConfig->getValue( 'sales/identity/logo_html', $scopeType, $storeId ); if ($salesLogoPath !== null) { return 'sales/store/logo_html/' . $salesLogoPath; } $headerLogoPath = $this->scopeConfig->getValue( 'design/header/logo_src', $scopeType, $storeId ); if ($headerLogoPath !== null) { return Logo::UPLOAD_DIR . '/' . $headerLogoPath; } return null; } }