由于新进商品的数量可能比页面上能显示的数量多,所以采用的是随机显示的方式。如果想改为按时间顺序显示,可以按照radnows提供的 方法修改。(记住使用文件替代)
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()

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

WebStorm Mac version
Useful JavaScript development tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Atom editor mac version download
The most popular open source editor