我在我的magento商店上传了我的产品的csv.在CSV中,我的产品名称包含ä等特殊字符.但在前端,这些角色正在显示一些像
"ä" 这样的html标签.我想避免这样的特征.有没有办法解决这个问题.
谢谢...
尝试这样可能会帮助你在你想要显示产品名称的地方
<?php
html_entity_decode(htmlentities(utf8_decode(strip_tags($_newProduct['name']))));
// where $_newProduct is the collection of product
?>
Run Code Online (Sandbox Code Playgroud)
或者尝试这样的事情
这些问题的解决方案是添加
AddDefaultCharset Off
Run Code Online (Sandbox Code Playgroud)
在 magento 根目录的 .htaccess 文件中。如果您仍然遇到问题,请升级至此:
AddDefaultCharset UTF-8
Run Code Online (Sandbox Code Playgroud)
或者
转到 .htaccess 文件并从中删除 #
AddDefaultCharset UTF-8
Run Code Online (Sandbox Code Playgroud)
和
打开 .txt 格式的 csv 文件并在 UTF-8 下另存为,然后将数据导入到 magento 中
您的特殊字符也将导入到 magento admin 中,不会出现任何错误
希望对你有帮助
归档时间: |
|
查看次数: |
12965 次 |
最近记录: |