【问题标题】:How can i fix X-cart product page ? Product page is blank如何修复 X-cart 产品页面?产品页面为空白
【发布时间】:2019-05-21 14:33:18
【问题描述】:

我有一个运行了 4 年的 x-cart 网站,突然产品页面无法正常工作。我们没有做任何改变。

X-Cart DB Version: 4.1.9 GOLD

产品页面网址:https://www.test.com/product.php?productid=40&cat=0&page=1&featured

我可以在日志文件"x-errors_php-190521.php" 中看到以下错误

PHP 致命错误:

Call to undefined function func_get_categories_list() in public_html/include/common.php on line 76

if (
                !isset($cat)
                || $config['Appearance']['root_categories'] == 'Y'
            ) {

            $categories = func_get_categories_list(0, false);

        } else {

Line No 76: =>>>            $categories = func_get_categories_list($cat, false);

        }

所以帮助我们解决这个问题

【问题讨论】:

    标签: x-cart


    【解决方案1】:

    1) 尝试添加

    x_load('category'); 
    

    之后的 include/common.php 中
    case 'C':
    

    2) 尝试将您的 product.php 与默认的进行比较并定位问题。

    3) 尝试将您的 include/common.php 与默认的进行比较并定位问题。

    4) 尝试将您的 include/categories.php 与默认的进行比较并定位问题。

    5) 尝试将x_load('category');移到代码switch ($current_area) {之前

    6) 尝试在代码switch ($current_area) {前添加代码include_once $xcart_dir . '/include/func/func.category.php';

    重点说明:

    • 在 X-Cart 4.4.0 中添加了include/common.php

    • func_get_categories_list 函数定义在 X-Cart 4.1.9 中的 include/categories.php 文件

    • func_get_categories_list 函数定义在 X-Cart 4.4.0 中的 include/func/func.category.php 文件

    • 为比较定义文件的确切版本会很有帮助 文件如 include/func/func.core.php cart.php include/func/func.category.php include/func/func.order.php 和默认文件。

    【讨论】:

    • 谢谢,我已经签入了版本文件,该文件位于 x-cart 版本 4.1.9 的根文件夹中,并且在 include/common.php 文件中已经存在“x_load('category');”代码可用
    • 你有文件 include/func/func.category.php 吗?
    • 是的,我在 /public_html/include/func/func.category.php 文件中有这个文件
    猜你喜欢
    • 2015-03-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-08-23
    • 2017-06-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多