zen cart 中仅出现产品描述的第一个字母
我正在这个禅宗购物车网站上工作。 爱至尊店 无论我使用自定义模板还是默认模板,在新的精选列表中都只会显示产品描述的第一个字母。我使用的是 1.3.9,但数据来自 1.3.0 站点。
当产品描述显示在所有产品上时,它们显示得很好。 描述是否被错误地放入数组中并且仅显示数组的第一个元素?
I'm working on this zen cart site. A Love Supreme Shop
In new and featured listings only the first letter of the product description appears whether I use a custom template or the default. I'm using 1.3.9 but the data has come from a 1.3.0 site.
When product descriptions are shown on all products they show up fine.
Is the description being put into an array incorrectly and only the first element of the array being displayed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
进入管理->配置->新列表,查看显示产品描述的值。我想知道你的是否是0。它应该是120或150。如果你没有看到这个设置,你的数据库缺少值。
如果失败,请查看文件
include/templates/YOUR_TEMPLATE/templates/tpl_modules_products_new_listing.php
并查看描述是如何处理的。
Go to admin->configuration->new listing, and look at the value of Display Product Description. I wonder if yours is 0. It should be 120 or 150. If you don't see this setting, your database is missing values.
Failing that look at the file
includes/templates/YOUR_TEMPLATE/templates/tpl_modules_products_new_listing.php
and see how description is being handled.
感谢斯科特帮助我找到了问题的根源:
在我的管理->配置->新列表->显示产品描述页面上,没有文本框可以更改显示的字符数。
只有一个问题:
您想显示产品描述 - 前 150 个字符吗?
接下来是选项 0 = 关闭和 1 = 开启,
我检查了在另一台服务器上运行的另一个 zen cart,它具有用于更改字符数的文本框。
我按照您的说明查看:
includes/templates/YOUR_TEMPLATE/templates/tpl_modules_products_new_listing.php
我编辑了显示产品描述的代码,将值 PRODUCT_NEW_LIST_DESCRIPTION 替换为 150。
这有效。
然而,根本问题在这里得到了解决:
Zen Cart 论坛上的解决方案
选择 *
来自
配置
WHERE
configuration_title
= '显示产品说明';这将返回 4 条记录
将配置值从 1 更改为 150
更改配置描述:
您想要显示产品描述 - 前 150 条
人物?
to :
是否要显示产品说明?
0= OFF
150= 建议长度,或输入要显示的最大字符数
并更改 set_function from :
zen_cfg_select_option(array('0' ,'1'),
至:
NULL
感谢@Scott Wilson 的帮助。
仍然不知道问题的路线原因。可能没有正确迁移数据库。
Thanks Scott that helped me get to the root of the problem :
On my admin->configuration->new listing->Display Product Description page there is no textbox to change the number of characters displayed.
There is only a question :
Do you want to display the Product Description - First 150 characters?
Followed by the options 0 = off and 1 = on
I checked another zen cart running on another server and it has the textbox to change the number of characters.
I followed your instructions to look at :
includes/templates/YOUR_TEMPLATE/templates/tpl_modules_products_new_listing.php
I edited the code that displays the product description replacing the value PRODUCT_NEW_LIST_DESCRIPTION with 150.
This worked.
However the underlying problem is solved here :
Solution on Zen Cart Forum
SELECT *
FROM
configuration
WHERE
configuration_title
= 'display product description';This returns 4 records
Changing configuration_value from 1 to 150
Changing configuration_description from :
Do you want to display the Product Description - First 150
characters?
to :
Do you want to display the Product Description?
0= OFF
150= Suggested Length, or enter the maximum number of characters to display
and changing the set_function from :
zen_cfg_select_option(array('0', '1'),
to :
NULL
Thanks for the assistance @Scott Wilson.
Still don't know the route cause of the problem. Probably not migrating the database properly.