默认环境下 zen cart 首页当 最新 保举 特价 商品数量大于背景配置的最大值时,
将以随机的方式发展透露表现,
原本这一展现方式是为了防范目前页面内容过于古老,从而低落搜索朋友程度为出发点.
但在实践应用中, 青菜辣椒 人尽所好 是各求纷歧.
zen cart中文社区 精华版下 真实早就提供过响应的修改方法:
详细可参见
http://www.zen-cart.cn/forum/topic44494.html
http://www.zen-cart.cn/forum/topic44494.html#p369974
除了下面传送门中提到的修改方法
也大概容易的使用下在的方法来静止住首页的随机体现的商品
相对修正也更容易些
静止首页最新商品
掀开 includes/modules/你的模板目录/new_products.php
查找
1
| if ($new_products_query != '') $new_products = $db->ExecuteRandomMulti($new_products_query, MAX_DISPLAY_NEW_PRODUCTS); |
将其修正成
1
| if ($new_products_query != '') $new_products = $db->Execute($new_products_query, MAX_DISPLAY_NEW_PRODUCTS); |
持续查找
1
| $new_products->MoveNextRandom(); |
将其批改成
1
| $new_products->MoveNext(); |
固定首页推荐商品
掀开 includes/modules/你的模板目录/featured_products.php
查找
1
| if ($featured_products_query != '') $featured_products = $db->ExecuteRandomMulti($featured_products_query, MAX_DISPLAY_NEW_PRODUCTS); |
将其修改成
1
| if ($featured_products_query != '') $featured_products = $db->Execute($featured_products_query, MAX_DISPLAY_NEW_PRODUCTS); |
持续查找
1
| $featured_products->MoveNextRandom(); |
将其修正为
1
| $featured_products->MoveNext(); |
固定首页特价商品
打开 includes/modules/你的模板目次/specials_index.php
查找
1
| if ($specials_index_query != '') $specials_index = $db->ExecuteRandomMulti($specials_index_query, MAX_DISPLAY_NEW_PRODUCTS); |
将其批改成
1
| if ($specials_index_query != '') $specials_index = $db->Execute($specials_index_query, MAX_DISPLAY_NEW_PRODUCTS); |
继续查找
1
| $specials_index->MoveNextRandom(); |
将其修正成
1
| $specials_index->MoveNext(); |
转载于:https://blog.51cto.com/wmrwx/1176639