The random sort modification method of new products in Zen Cart _php tutorial

Source: Internet
Author: User
Tags zen cart
Zencart The method of random sort modification of new products in the first step: First, the new product can define its own time period: Store Settings-Maximum value-the definition of new products

the method of random ordering modification of new products in Zencart the second step
Modify new products on the homepage:
/includes/modules/new_products.php

Add corresponding order by XXX in $new_products_query

Example: 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

the method of random ordering modification of Zencart new products The third step
Modify the new product in the border:
/includes/modules/sideboxes/whats_new.php
Will
$random _whats_new_sidebox_product =zen_random_select ($random _whats_new_sidebox_product_query);
Switch
$random _whats_new_sidebox_product = $db->execute ($random _whats_new_sidebox_product_query);

The fourth step of the random ordering modification method of Zencart new products

Then add the following in the/includes/modules/new_products.php file:
$db->executerandommulti
Switch
$db->execute

Movenextrandom ()
Switch
MoveNext ()

http://www.bkjia.com/PHPjc/322389.html www.bkjia.com true http://www.bkjia.com/PHPjc/322389.html techarticle Zencart The method of random sort modification of new products The first step: first, the new product can define its own time period: Store Settings-Maximum value-the definition of new products Zencart new products with ...

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.