无法生成 prestashop 错误 500 发票
Unable to generate a prestashop error 500 invoice
我来找你是因为我的 prestashop 有问题,当我在购买后尝试生成发票时,该网站返回错误 500,我无法恢复我的发票,怎么办?
站点在生产模式下返回给我的错误:
Oops! An Error Occurred
The server returned a "500 Internal Server Error".
Something is broken. Please let us know what you were doing when Ibis error occurred. We will fur it as soon as possible. Sorry for any inconvenience caused.
网站在开发模式下返回给我的错误:
ClassNotFoundException
Attempted to load class "DpTools" from the global namespace. Did you forget a "use" statement?
in override/classes/order/OrderInvolce.php (line 52)
$products = parent::getProducts($products, $selected_products, $selected_pty);
if (is_array($products)))
{
foreach ($products as $index => $product)
{
if ((int)$product['id_product'] == DpTools::getSpecialProduct())//<< error Line
unset($products[$index])
}
}
return $products;
}
此错误意味着您的 Prestashop OrderInvoice.php 文件已被模块覆盖,它不是原始文件。
尝试检查
override/classes/order/OrderInvoice.php
在您的 FTP 中 - 您应该能够在评论中找到导致覆盖的模块名称。
然后尝试禁用或卸载该模块,看看问题是否仍然存在。
否则您可以尝试重命名 override/classes/order/OrderInvoice.php 并清空缓存以便使用原来的缓存,不过这可能会干扰该模块的功能。
我来找你是因为我的 prestashop 有问题,当我在购买后尝试生成发票时,该网站返回错误 500,我无法恢复我的发票,怎么办?
站点在生产模式下返回给我的错误:
Oops! An Error Occurred
The server returned a "500 Internal Server Error".
Something is broken. Please let us know what you were doing when Ibis error occurred. We will fur it as soon as possible. Sorry for any inconvenience caused.
网站在开发模式下返回给我的错误:
ClassNotFoundException
Attempted to load class "DpTools" from the global namespace. Did you forget a "use" statement?
in override/classes/order/OrderInvolce.php (line 52)
$products = parent::getProducts($products, $selected_products, $selected_pty);
if (is_array($products)))
{
foreach ($products as $index => $product)
{
if ((int)$product['id_product'] == DpTools::getSpecialProduct())//<< error Line
unset($products[$index])
}
}
return $products;
}
此错误意味着您的 Prestashop OrderInvoice.php 文件已被模块覆盖,它不是原始文件。
尝试检查
override/classes/order/OrderInvoice.php
在您的 FTP 中 - 您应该能够在评论中找到导致覆盖的模块名称。
然后尝试禁用或卸载该模块,看看问题是否仍然存在。
否则您可以尝试重命名 override/classes/order/OrderInvoice.php 并清空缓存以便使用原来的缓存,不过这可能会干扰该模块的功能。