步骤: 1.去马根托管理。2.在path内容中上载电子邮件徽标-> Configuration -> Transactional -> logo图像3.保存
预期结果-新的电子邮件标志应该显示在新的顺序(全部)电子邮件
实际结果- Logo在path内容、->配置、->事务处理、电子邮件、->、Logo图像下中断。
发布于 2017-06-03 11:16:06
找到了解决这个问题的方法:
我已经创建了一个自定义模块(Ct_EmailLogo),它覆盖了Magento\Theme\Model\Design\Backend\Logo,因此,基本上,我们需要两个主要文件:
<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <preference for="Magento\Theme\Model\Design\Backend\Logo" type="Ids\EmailLogo\Model\Design\Backend\Logo"/> </config>
名称空间Ids\EmailLogo\Model\Design\后端;
类Logo扩展\Magento\主题\模型\设计\后端\Logo{
/**
* The tail part of directory path for uploading
*
*/
const UPLOAD_DIR = 'email/logo';
/**
* Return path to directory for upload file
*
* @return string
* @throw \Magento\Framework\Exception\LocalizedException
*/
protected function _getUploadDir() {
return $this->_mediaDirectory->getRelativePath($this->_appendScopeInfo(self::UPLOAD_DIR));
}
/**
* Makes a decision about whether to add info about the scope.
*
* @return boolean
*/
protected function _addWhetherScopeInfo() {
return true;
}
/**
* Getter for allowed extensions of uploaded files.
*
* @return string[]
*/
public function getAllowedExtensions() {
return ['jpg', 'jpeg', 'gif', 'png', 'svg'];
}}
本模块所需的其他文件将是基本的。
\app\code\Ids\EmailLogo\registration.php和\app\code\Ids\EmailLogo\etc\module.xml
就这样..。编码愉快:)
发布于 2017-05-09 10:18:23
此问题的发生是由于文件夹权限,基本上您需要给予您的文件夹777适当的权限。此外,您还可以检查检查元素,目录中没有图像。希望这个答案适合你。
发布于 2019-04-20 09:43:26
这是众所周知的问题。
最好的解决方案是使用主题上传您的徽标:
{{logo_width}width=“{var logo_width}}”{width=}“200”{/if}{如果logo_height}height=“{var logo_height}”{{width=}} height="100“{{/if}}
https://stackoverflow.com/questions/43862795
复制相似问题