Home php教程 php手册 zen cart新进商品的随机排序修改方法

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

Jun 06, 2016 pm 08:35 PM
merchandise random order

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

,服务器空间
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to identify the authenticity of Dewu products? Methods to identify authenticity How to identify the authenticity of Dewu products? Methods to identify authenticity Mar 12, 2024 pm 12:16 PM

When we use this platform to make various choices, some of the products we buy, especially the shoes we buy, are bought with our own money. We are not sure whether they are fakes, so in order to make ourselves To feel more at ease, you can only conduct some appraisals of some products so that you can know whether they are genuine or fake. This makes you feel more at ease when buying. It also means that you can spend money more securely, at least you don’t have to wear fakes. No, so today in order to let more users know how to identify products, today the editor will explain some of the above content information to everyone, so friends who have ideas must not If you missed it, hurry up and take a look with the editor. Distinguish authenticity

How to design the product table structure of the mall in MySQL? How to design the product table structure of the mall in MySQL? Oct 31, 2023 am 08:14 AM

How to design the product table structure of the mall in MySQL? MySQL is a commonly used relational database management system that is widely used in various types of websites and applications. When designing the product table structure of the mall, factors such as product attributes, classification, and inventory need to be taken into consideration. The following will introduce in detail how to design the product table structure of the mall in MySQL and give specific code examples. Basic information of the product table: When designing the structure of the product table, you first need to determine the basic information of the product, such as product name, price, description, and pictures.

How to add Meituan e-commerce products to the shopping cart_The specific steps for adding Meituan e-commerce products to the shopping cart How to add Meituan e-commerce products to the shopping cart_The specific steps for adding Meituan e-commerce products to the shopping cart Mar 27, 2024 pm 09:50 PM

1. First open the [Meituan] APP software, on the [E-commerce] page, click on a favorite [Product] option to enter the [Product Details] page. 2. Then on the [Product Details] page, click the [Add to Cart] button in the bottom function bar. 3. Then in the option list, click the [Specifications] option you like, and click the [Confirm] button to successfully add it to the shopping cart.

Will shuffling the order of PHP array affect the reference or address of the array? Will shuffling the order of PHP array affect the reference or address of the array? Apr 30, 2024 pm 03:48 PM

No, shuffling a PHP array order will not affect element references or addresses, since the elements and their keys remain unchanged. After shuffling, the contents of the array (elements and keys) remain unchanged, only the order of the keys changes.

PHP data processing tips: How to randomly sort array elements using the shuffle function PHP data processing tips: How to randomly sort array elements using the shuffle function Jul 29, 2023 pm 05:54 PM

PHP data processing skills: How to use the shuffle function to randomly sort array elements. In PHP development, you often encounter the need to randomly sort arrays. For example, when developing a personalized recommendation system, you need to randomly disrupt the user-related product list. to increase the diversity of recommendations. In this case, the shuffle function is a very useful tool, which can help us quickly and randomly sort the array elements. Introduction to shuffle function The shuffle function is an array function that comes with PHP.

What should I do if my Xiaohongshu products are frozen? How to deal with it? What should I do if my Xiaohongshu products are frozen? How to deal with it? Mar 07, 2024 pm 04:04 PM

What should merchants who open Xiaohongshu stores do if their products are frozen? What are the reasons for product freezing? How to deal with frozen goods? 1. Introduction to the reasons for product freezing. The reasons for violations here are only examples. The actual reasons for violations are subject to the notification on the system site. 2. Product freezing process 1. Log in to Xiaohongshu Qianfan PC 2. Click [Store] - [Violation Management] 3 .Click [View Details] to view the specific frozen products, reasons for freezing, rectification opinions, etc. 4. If you have no objection to the penalty results, read and understand, do not publish similar products again, and self-examine and self-correct the published products to avoid If you violate the rules again, click [Return to List] 5. If you have any objection to the penalty result, click [Initiate Appeal] to be reminded: If the violation notice includes an appeal channel (such as an appeal email address), then

Douyin releases announcement on product performance information management Douyin releases announcement on product performance information management Mar 07, 2024 pm 03:28 PM

A recent investigation by the Douyin platform found that some merchants illegally filled in logistics commitment information in product SKUs, such as promised delivery time, delivery time, shipping logistics provider, free shipping information, etc. This behavior is considered illegal filling in of SKU information. situation, there is a risk of misleading consumers. Starting from January 22, 2024, the platform will conduct special governance on such issues. The specific content of the special rectification: In order to deal with the situation where the promised logistics information in the SKU information is untrue, the platform will increase the intensity of review and take measures such as removing the offending products from the shelves and banning them according to the specific circumstances. If the logistics information promised in the SKU information is not fulfilled truthfully, we will take measures such as illegal points control and store authority restrictions to deal with it. For those who have not made corrections in time after being punished multiple times, it appears that

How to implement the product paging display function in PHP Developer City How to implement the product paging display function in PHP Developer City Jun 29, 2023 pm 05:34 PM

How to implement the paging display function of products in the PHP developer mall. With the development of the Internet and the rise of e-commerce platforms, more and more mall websites have begun to use PHP as the development language. In a shopping mall website, product display is a very important part, and the paginated display of products is an important function to improve user experience and optimize website performance. This article will introduce how to implement the product paging display function in PHP Developer City. 1. Before starting Before implementing the product paging display function, we need to clarify some basic concepts and steps. first,

See all articles