默認環境下 zen cart 首頁當 最新 保舉 特價 商品數量大於背景配置的最大值時,php
將以隨機的方式發展透露表現,
本來這一展示方式是爲了防範目前頁面內容過於古老,從而低落搜索朋友程度爲出發點.
但在實踐應用中, 青菜辣椒 人盡所好 是各求紛歧.html
zen cart中文社區 精華版下 真實早就提供過響應的修改方法:
詳細可參見dom
http://www.zen-cart.cn/forum/topic44494.htmlide
http://www.zen-cart.cn/forum/topic44494.html#p369974spa
除了下面傳送門中提到的修改方法
也大概容易的使用下在的方法來靜止住首頁的隨機體現的商品
相對修正也更容易些code
靜止首頁最新商品
掀開 includes/modules/你的模板目錄/new_products.phporm
查找htm
1 |
if ($new_products_query != '') $new_products = $db->ExecuteRandomMulti($new_products_query, MAX_DISPLAY_NEW_PRODUCTS); |
將其修正成ci
1 |
if ($new_products_query != '') $new_products = $db->Execute($new_products_query, MAX_DISPLAY_NEW_PRODUCTS); |
持續查找it
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(); |