对于某些订单,在Magento管理页面的订单详情页面上没有显示任何详细信息,尽管邮件已正确发送给客户并抄送到我们的电子邮件ID。
管理员订单详情页面截图:
![enter image description here](https://istack.dev59.com/qmy8X.webp)
![enter image description here](https://istack.dev59.com/kqWCS.webp)
您可以尝试以下方法,这对我很有效(来源:https://magentary.com/kb/php-syntax-error-after-supee-7405-unexpected/):
Problem description
After SUPEE-7405 patch Sales Order Management screen in Magento Backend is blank or the following error is reported in PHP error log:
PHP Parse error: syntax error, unexpected '[' in app/code/core/Mage/Adminhtml/Helper/Sales.php on line 124
Cause
SUPEE-7405 is prepared with PHP 5.4 in mind, older PHP versions are incompatible with new language constructions used.
Solution
Change line 124 in app/code/core/Mage/Adminhtml/Helper/Sales.php from
$links = [];
to$links = array();
:
--- app/code/core/Mage/Adminhtml/Helper/Sales.php +++ app/code/core/Mage/Adminhtml/Helper/Sales.php @@ -121,7 +121,7 @@ public function escapeHtmlWithLinks($data, $allowedTags = null) { if (!empty($data) && is_array($allowedTags) && in_array('a', $allowedTags)) { - $links = []; + $links = array(); $i = 1; $data = str_replace('%', '%%', $data);
<li > <a href="#" id="sales_order_view_tabs_order_info" name="order_info" title="Order Information" class="tab-item-link "> <span><span class="changed" title="The information in this tab has been changed."></span><span class="error" title="This tab contains invalid data. Please solve the problem before saving."></span>Information</span> </a>
- Pankaj Upadhyay如果 SUPEE-7405 补丁导致此问题,请检查您的系统是否未运行在 PHP 5.3 上。
该补丁破坏了 PHP 5.3 的兼容性,因为它引入了 app/code/core/Mage/Adminhtml/Helper/Sales.php(第124行)中数组字面量的使用,这是自 PHP 5.4 版本以来可用的,因此在应用该补丁后,所需的最低 PHP 版本是 PHP 5.4:
// patched app/code/core/Mage/Adminhtml/Helper/Sales.php lines 121-124
public function escapeHtmlWithLinks($data, $allowedTags = null)
{
if (!empty($data) && is_array($allowedTags) && in_array('a', $allowedTags)) {
$links = [];
// patched and fixed app/code/core/Mage/Adminhtml/Helper/Sales.php lines 121-124
public function escapeHtmlWithLinks($data, $allowedTags = null)
{
if (!empty($data) && is_array($allowedTags) && in_array('a', $allowedTags)) {
$links = array();
我相信这个问题是由于Magento的默认设置引起的,因为这些文件没有指向任何第三方的结账扩展程序。
当我用我的原始文件替换
app/design/adminhtml/default/default/template/sales/order/totals
中的tax.phtml
文件时,我解决了这个问题。你也可以试试。
我禁用了所有插件。在我的情况下,似乎是Apptha一步结帐插件造成了这个问题。
将服务器上的PHP 5.3更改为5.6,注销并重新登录。刷新缓存。 它会运行。 适用于版本1.9.2.3的Magento。
系统 > 配置 > 高级 > 开发人员 > 日志设置
并启用日志记录。然后前往订单查看页面。接着检查var/exception.log
或var/system.log
。 - Sergii Stotskyi