zencart v1.3.9h后台产品编辑时问题修改
来源:互联网 发布:手机必备软件 编辑:程序博客网 时间:2024/06/02 10:51
zencart v1.3.9h后台产品编辑时产品名,产品描述,产品型号信息未读出问题
Symptoms:
a) Using PHP version lower than 5.2.3(and 5.2.3 is LESS THAN 5.2.13, for example. ie: 3 is less than 13)
b) Zen Cart v1.3.9h
c) On admin "home" page you notice that your list of customers shows only dates, not names.
d) On admin product-edit screen you notice that the product name, description, and model number are empty when editing a product.
NOTE: If you're using such an old version of PHP, then your site is certainly not PCI-Compliant, and is thus likely to contain known security problems in PHP, and you should be upgrading your hosting to a newer version of PHP.
The following is ONLY a workaround for the symptoms mentioned above, and is NOT needed if you're using a current version of PHP.
Solution:
Strictly speaking, this is only necessary if you're using a PHP version lower than PHP 5.2.3
1. /admin/includes/functions/general.php
Line 39, change from:
Code:
return htmlspecialchars($string, ENT_COMPAT, CHARSET, FALSE);to:
Code:
return htmlspecialchars($string, ENT_COMPAT, CHARSET);2. /admin/includes/modules/product/collect_info.php
(and if you use the other product types too, then *those* collect_info.php files as well. See below for the list of filenames.)
Action: You have two choices:
either:
a) revert these files back to v1.3.9g versions (recommended, since it's simpler)
or
b) make similar edits in 3 places in each file, removing the ", TRUE" in each of these sections of code:
Approx line 299:
Code:
<td class="main"><?php echo zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . zen_draw_input_field('products_name[' . $languages[$i]['id'] . ']', (isset($products_name[$languages[$i]['id']]) ? htmlspecialchars(stripslashes($products_name[$languages[$i]['id']]), ENT_COMPAT, CHARSET, TRUE) : htmlspecialchars(zen_get_products_name($pInfo->products_id, $languages[$i]['id']), ENT_COMPAT, CHARSET, TRUE)), zen_set_field_length(TABLE_PRODUCTS_DESCRIPTION, 'products_name')); ?></td>Approx line 412:
Code:
echo zen_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '100%', '30', (isset($products_description[$languages[$i]['id']])) ? htmlspecialchars(stripslashes($products_description[$languages[$i]['id']]), ENT_COMPAT, CHARSET, TRUE) : htmlspecialchars(zen_get_products_description($pInfo->products_id, $languages[$i]['id']), ENT_COMPAT, CHARSET, TRUE)); //,'id="'.'products_description' . $languages[$i]['id'] . '"');Approx line 433:
Code:
<td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_input_field('products_model', htmlspecialchars(stripslashes($pInfo->products_model), ENT_COMPAT, CHARSET, TRUE), zen_set_field_length(TABLE_PRODUCTS, 'products_model')); ?></td>(NOTE: Line-numbers will vary depending on which product-type file you're editing.)
These are the additional product-type files which you may or may not be using:
- /admin/includes/modules/document_general/collect_info.php
- /admin/includes/modules/document_product/collect_info.php
- /admin/includes/modules/product_free_shipping/collect_info.php
- /admin/includes/modules/product_music/collect_info.php
3. includes/modules/pages/shopping_cart/header_php.php
Line 111, remove the ", TRUE":
Code:
$attr_value = htmlspecialchars($products[$i]['attributes_values'][$option], E
Code:
$attr_value = htmlspecialchars($products[$i]['attributes_values'][$option], ENT_COMPAT, CHARSET, TRUE);
如果产品名还是没有则把
zen_get_products_name($pInfo->products_id, $languages[$i]['id']), 直接换成产品名变量 $pInfo->products_name
$products_name[$languages[$i]['id']]) 直接换成产品名变量 $pInfo->products_name
其它类似
- zencart v1.3.9h后台产品编辑时问题修改
- 怎么修改zencart的后台密码
- zencart初始安装后台目录admin必须修改才能登录问题
- zencart初始安装后台目录admin必须修改才能登录问题 .
- Zencart畅销产品(bestsellers)与后台订单显示图片
- Zencart畅销产品(bestsellers)与后台订单显示图片
- zencart批量添加特价产品,修改特价产品价格
- 如何修改zencart后台管理的目录名?
- zencart产品属性设置
- zencart批量删除产品
- ZenCart后台基础设置
- ZenCart后台基础设置
- zencart 后台一个bug
- zencart后台汉化教程
- JSF<h:dataTable>分页,编辑,修改
- 修改后台产品列表 每页个数
- 转移zencart网站时,后台出现空白页面
- 关于<rich:popupPanel>中的<h:inputText>不能正确修改后台的值 的问题
- 基于折叠的FIR设计
- 专家访谈: WebSphere Commerce
- UbuntuHelp:AptGet/Howto/zh
- Magento的负载多少数据显示订单?
- asp.net 获取网站根目录的方法
- zencart v1.3.9h后台产品编辑时问题修改
- 学习成绩不好,也能考大学!
- mongoDB旅程
- 自动人脸识别基本原理
- Unable to locate the model you have specified: xxxx_model
- 理解C++的多态原理及实现
- 2011-5-25整理
- WCF架构入门-用VS2008构建WCF
- window.showModalDialog