zencart 1.5.1 ,使用了 Easy Populate 和 Ultimate URLs 插件,在 Easy Populate 工具下载csv时,出现错误提示如下.
Fatal error: Call to undefined function zen_get_info_page() in /home/wwwroot/xxxx.com/web/includes/classes/usu.php on line 324
从zen-cart官方终于找到了相关的fix debug方法如下
编辑后台 /admin/includes/functions/extra_functions/usu.php 文件,在最后面加入以下代码解决:
// This function is available for use on the catalog side of Zen Cart and
// needed on the admin side for Ultimate URLs to lookup the product_info page.
if(!function_exists('zen_get_info_page')) {
function zen_get_info_page($zf_product_id) {
global $db;
$sql = "select products_type from " . TABLE_PRODUCTS . " where products_id = '" . (int)$zf_product_id . "'";
$zp_type = $db->Execute($sql);
if ($zp_type->RecordCount() == 0) {
return 'product_info';
}
else {
$zp_product_type = $zp_type->fields['products_type'];
$sql = "select type_handler from " . TABLE_PRODUCT_TYPES . " where type_id = '" . (int)$zp_product_type . "'";
$zp_handler = $db->Execute($sql);
return $zp_handler->fields['type_handler'] . '_info';
}
}
}
