zen cart新进商品的随机排序修改方法_php技巧

WBOY
Release: 2016-05-17 09:23:19
Original
818 people have browsed it

zencart新进商品的随机排序修改方法第一步:首先,新进商品可以自己定义时间段:商店设置-最大值-新进商品的定义

zencart新进商品的随机排序修改方法第二步
修改首页上新进商品:
/includes/modules/new_products.php

在$new_products_query里增加相应ORDER BY xxx

例:select distinct p.products_id, p.products_image,p.products_tax_class_id, pd.products_name, p.products_date_added,p.products_price, p.products_type, p.master_categories_id fromzen_products p, zen_products_description pd where p.products_id =pd.products_id and pd.language_id = '1' and p.products_status = 1order by pd.products_name

zencart新进商品的随机排序修改方法第三步
修改边框中新进商品:
/includes/modules/sideboxes/whats_new.php

$random_whats_new_sidebox_product =zen_random_select($random_whats_new_sidebox_product_query);
改为
$random_whats_new_sidebox_product =$db->Execute($random_whats_new_sidebox_product_query);

zencart新进商品的随机排序修改方法第四步

然后将/includes/modules /new_products.php 文件中的:
$db->ExecuteRandomMulti
改为
$db->Execute

MoveNextRandom()
改 为
MoveNext()

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template