产品网格 4 列和某些页面 5 列两行完整产品,怎么样?
我正在使用产品网格,某些页面需要 4 列,在某些页面上有两行 8 个产品,在其他页面上需要 5 列,每行两行 10 个产品。
我可以获得不同的列,但无法更改管理区域中设置的产品数量。如何覆盖 5 栏页面每页 8 个产品的默认设置?
I am using a product grid and certain pages need 4 columns with two rows of 8 products on certain pages and 5 columns of two rows of 10 products on other pages.
I can get different columns, but not change the number of products that are set in the admin area. How would I override the default of 8 products per a page for my 5 column pages?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
克里斯,
你的问题不是很清楚:)
您想要更改每行的产品数量和/或每页的产品总数吗?
如果您想更改每行的产品数量,以下内容应该足够了
对于您想要每行显示 10 个产品的每个类别:
1- 转到后端的类别并进行编辑。
2- 转到“自定义设计”选项卡,然后在“自定义布局更新”字段中添加以下内容:
如果您想更改每页的产品总数
在下面的内容中,如果您有在管理员中设置的每页默认产品计数,并且您仍然希望它在前端的分页器选择中显示,您必须将其添加到布局更新中。在以下示例中,默认产品数量为 10,我们希望在给定类别中显示 20 个产品。
对于您想要每页显示 20 个产品的每个类别:
1- 转到后端的类别并对其进行编辑。
2- 转到“自定义设计”选项卡,然后在“自定义布局更新”字段中添加以下内容:
现在,让我们混合使用
我们希望在每页 10 列上显示 20 个产品(因此 2每行 10 个产品)
请注意...
...您必须调整 CSS/主题以确保 10 列 ul>足够宽以包围 10 <力>将生成此布局更新。
Chris,
Your question is not very clear :)
Do you want to change the number of products per row and/or the total number of products per page ?
If you want to change the number of products per row, the following should be enough
For each category where you want to display 10 products per row :
1- go the category in the backend and edit it.
2- go to the "Custom Design" tab and add the following in the "Custom Layout Update" field :
If you want to change the total number of products per page
In the following, if you have a default products count per page set up in the admin and you still want it to be diplayed in the pager select on the frontend, you must add it to the layout update. In the following example, the default products count is 10 and we want to display 20 products on given categories.
For each category where you want to display 20 products per page :
1- go the category in the backend and edit it.
2- go to the "Custom Design" tab and add the following in the "Custom Layout Update" field :
Now, let's mix both
We want to display 20 products per page, on 10 columns (so 2 rows of 10 products each)
Please note...
... that you must adapt your CSS / theme in order to make sure the 10 column < ul > is wide enough to enclose the 10 < li > this layout update will generate.
app\code\core\Mage\Catalog\Block\Product\Abstract.php
第 66 行
更改
为
app\code\core\Mage\Catalog\Block\Product\Abstract.php
line no 66
change
to
克里斯,您能检查一下以下文件吗?有一个参数是
DEFAULT_PRODUCTS_COUNT
app/code/core/Mage/Catalog/Block/Product/New.php
Chris, could you please check the following file? There is a parameter which is
DEFAULT_PRODUCTS_COUNT
app/code/core/Mage/Catalog/Block/Product/New.php