dhvanit dave
dhvanit dave

Reputation: 1

How can i fix X-cart product page ? Product page is blank

I have x-cart site which is running from 4 years and suddenly product page is not working. we have not done any changes.

X-Cart DB Version: 4.1.9 GOLD

product page url : https://www.test.com/product.php?productid=40&cat=0&page=1&featured

I can see bellow error in log file "x-errors_php-190521.php"

PHP Fatal error:

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);

        }

so help us to solve this issue

Upvotes: 0

Views: 204

Answers (1)

Ildar Amankulov
Ildar Amankulov

Reputation: 526

1) Try to add the

x_load('category'); 

in the include/common.php right after the

case 'C':

line

2) Try to compare your product.php with the default one and localize the problem.

3) Try to compare your include/common.php with the default one and localize the problem.

4) Try to compare your include/categories.php with the default one and localize the problem.

5) Try to move x_load('category'); before the code switch ($current_area) {

6) Try to add the code include_once $xcart_dir . '/include/func/func.category.php'; before the code switch ($current_area) {

Key notes:

  • include/common.php was added in X-Cart 4.4.0

  • The func_get_categories_list function is defined in include/categories.php file in X-Cart 4.1.9

  • The func_get_categories_list function is defined in include/func/func.category.php file in X-Cart 4.4.0

  • It will be helpful to define the exact version of your files for that compare files like include/func/func.core.php cart.php include/func/func.category.php include/func/func.order.php with the default ones.

Upvotes: 0

Related Questions